skip to Main Content

Flutter error: The body might complete normally, causing 'null' to be returned, but the return type, 'Widget', is a potentially non-nullable typ

import 'package:flutter/material.dart'; class LayOutBuilder extends StatelessWidget { const LayOutBuilder({super.key}); @override Widget build(BuildContext context) { return Scaffold( body: LayoutBuilder( builder: (context, p1) { if (p1.maxHeight < 400) { return Container(); } }, ), ); } } I dont know why it…

VIEW QUESTION

Dart – How to search JSON? – Flutter

I have a JSON code like this: final String response = await rootBundle.loadString('assets/Schools.json'); List data = await json.decode(response); print(data); /* output: [{ "city": "ISTANBUL", "districty": "Kagithane", "name": "Kagithane anadolu lisesi"}, { "city": "ISTANBUL", "districty": "Sisli", "name": "Aziz Sancar anadolu lisesi"},…

VIEW QUESTION
Back To Top
Search