back
loading skill details...
Make HTTP requests and encode / decode JSON in a Flutter app
flutter-http-json-networking Goal Manages HTTP networking and JSON data handling in Flutter applications. Implements secure, asynchronous REST API calls (GET, POST, PUT, DELETE) using the http package. Handles JSON serialization, background parsing via isolates for large datasets, and structured JSON schemas for AI model integrations. Assumes the http package is added to pubspec.yaml and the environment supports Dart 3 pattern matching and null safety. Decision Logic When implementing JSON parsing and serialization, evaluate the following decision tree: Payload Size: If the JSON payload is small, parse synchronously on the main thread. If the JSON payload is large (takes >16ms to parse), use background parsing via compute() to avoid UI jank. Model Complexity: If the data model is simple or a quick prototype, use manual serialization (dart:convert). If the data model is highly nested or part of a large production app, STOP AND ASK THE USER: "Should we configure json_serializable and build_runner for automated code generation?" Instructions 1. Configure Platform Permissions Before making network requests, ensure the target platforms have the required internet permissions.
don't have the plugin yet? install it then click "run inline in claude" again.