How to hide Android StatusBar in Flutter

SystemChrome.setEnabledSystemUIOverlays([]) should do what you want. You can bring it back with SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values). Import it using import ‘package:flutter/services.dart’; Update answer (from Flutter 2.5 or latest): SystemChrome.setEnabledSystemUIMode(SystemUiMode.leanBack); Or you can use another options like: SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [ SystemUiOverlay.bottom ]); // to hide only bottom bar Then when you need to re-show it (like when dispose) use … Read more

XMLHttpRequest error in flutter web [Enabling CORS AWS API gateway]

this worked for me, I added the below header on the lambda function return { statusCode: 200, headers: { “Access-Control-Allow-Origin”: “*”, // Required for CORS support to work “Access-Control-Allow-Credentials”: true, // Required for cookies, authorization headers with HTTPS “Access-Control-Allow-Headers”: “Origin,Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,locale”, “Access-Control-Allow-Methods”: “POST, OPTIONS” }, body: JSON.stringify(item) };

How to create GridView Layout in Flutter

Use whichever suits your need. GridView.count(…) GridView.count( crossAxisCount: 2, children: <Widget>[ FlutterLogo(), FlutterLogo(), FlutterLogo(), FlutterLogo(), ], ) GridView.builder(…) GridView.builder( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2), itemBuilder: (_, index) => FlutterLogo(), itemCount: 4, ) GridView(…) GridView( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2), children: <Widget>[ FlutterLogo(), FlutterLogo(), FlutterLogo(), FlutterLogo(), ], ) GridView.custom(…) GridView.custom( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2), childrenDelegate: SliverChildListDelegate( [ FlutterLogo(), FlutterLogo(), FlutterLogo(), FlutterLogo(), … Read more

Flutter plugin not installed error; When running ‘flutter doctor’

Safe fix for Mac (Android Studio 4.1+). It is in a different directory now, but the symbolic link helps. Just run this command in the Terminal: ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1 If you have a different Android Studio version or an installation folder, adjust the command accordingly.

Flutter: Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized

This problem is introduced when you upgrade Flutter. The reason behind this is you are waiting for some data or running an async function inside main(). I was initialising ScopedModel inside main() and inside that I was awaiting for some data. There is a very small fix. Just run WidgetsFlutterBinding.ensureInitialized() inside void main() , before … Read more