← Flutter & Dart learning path
Flutter & Dart · Module 8 of 10

Networking and data

Fetch APIs, parse JSON and store data locally.

📖 Key ideas

  1. Use http or dio packages: await http.get(Uri.parse(url)).
  2. Parse JSON with jsonDecode and model classes (fromJson).
  3. FutureBuilder shows loading, data and error states.
  4. Local storage: shared_preferences (small), sqflite/Hive/Isar (databases).
  5. Firebase via FlutterFire: Auth, Firestore, Storage.
💡 Real-life example: A Future is a token at a food stall: wait for your number, then collect the result.
FutureValue available later
async/awaitWrite async code simply
FutureBuilderBuilds UI from a Future
shared_preferencesSimple key-value storage