skip to Main Content

Unhandled Exception: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List<dynamic>' Flutter dart

Am getting this error in flutter, dart. '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'List' The Model used is, import 'dart:convert'; Areas areasFromJson(String str) => Areas.fromJson(json.decode(str)); String areasToJson(Areas data) => json.encode(data.toJson()); class Areas { bool success; Data data; String…

VIEW QUESTION

ListView.builder builds too many items – Flutter

I am trying to implement indefinite scrolling with ListView.build: import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatefulWidget { @override State<MyApp> createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { final entries = []; void addData(num ind) async {…

VIEW QUESTION

DiagnosticsProperty<BoxConstraints> – Flutter

Please I am having this error in my flutter code. Below is my code: return Scaffold( appBar: AppBar( backgroundColor: Colors.black, leading: IconButton( onPressed: () { Navigator.of(context).pop(); }, icon: const Icon(Icons.arrow_back_ios)), title: const Text('Categories'), ), body: Container( color: Colors.black, height: double.infinity,…

VIEW QUESTION
Back To Top
Search