← Flutter & Dart learning pathFlutter & Dart · Module 8 of 10
Networking and data
Fetch APIs, parse JSON and store data locally.
📖 Key ideas
- Use http or dio packages: await http.get(Uri.parse(url)).
- Parse JSON with jsonDecode and model classes (fromJson).
- FutureBuilder shows loading, data and error states.
- Local storage: shared_preferences (small), sqflite/Hive/Isar (databases).
- 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