Could not find a generator for route

I´m newbie to flutter and reveice one exception about route and paginator in Flutter. EXCEPTION CAUGHT BY GESTURE The following assertion was thrown while handling a gesture: Could not find a...

Flutter Error: MediaQuery.of() called with a context that does not contain a MediaQuery

I have been trying to get the size of the whole context view in Flutter. But every time I try I'm getting the above mentioned error. Here's my code: import 'package:flutter/material.dart'; void...

How to customize a date picker

I’m using the showDatePicker() method to display a date picker in my flutter application. How do I customize the colors of the date picker? Here is my theme's code: class CustomTheme extends...

Flutter ListView.Builder() in scrollable Column with other widgets

I have a TabBarView() with an amount of different views. I want of them to be a Column with a TextField at top and a ListView.Builder() below, but both widgets should be in the same scrollable...

Window is Full error in Flutter

When loading data from Firestore into a listview, i receive this warning W/CursorWindow(15035): Window is full: requested allocation 483 bytes, free space 274 bytes, window size 2097152 bytes I...

Another exception was thrown: type 'MyApp' is not a subtype of type 'StatelessWidget'

I have just started using Flutter and i'm having this problem while running my code "Another exception was thrown: type 'MyApp' is not a subtype of type 'StatelessWidget'". And the interesting...

Change color of DataTable rows and columns

I have a small data table and i want to change the column and row background color. But unfortunately there is no property in DataColumn or DataRow to achieve this. The only way i found is through...

Flutter charts PanAndZoomBehavior does not zoom on the center of the gesture

I used https://github.com/google/charts inside my flutter app. It works great. But when i zoom on chart, the zoom happens but in the wrong place! It starts expanding keeping the left static. The...

AppBar in Flutter doesn't show

I'm trying to implement an AppBar to a page of my app, and it doesn't show. I've tried dabbling with the styles.xml file and the Android Manifest, but to no avail. I'm guessing there's a different...

How to wait for the future object before proceeding in flutter?

I am writing a code in flutter in which I am using an SQFlite database. I want to insert image widget from the assets, and I am getting the name of the image from database. @override Widget...

No MaterialLocalizations found - MyApp widgets require MaterialLocalizations to be provided by a Localizations widget ancestor

I was just trying to create an app with button which shows an alert message when the button is pressed. But it gives me this error(Mentioned below). I wrote this code by taking reference of this...

How to change OutlinedButton border color?

Flutter widget, I tried to change the OutlineButton border color by using BorderSide(color : Colors.blue). The OutlineButton always with grey color border no matter which color is set, but width...

Flutter DataTable truncates text

I am writing a flutter app and am trying to insert a DataTable. I am having issues with the text getting truncated though and not overflowing to a new line. It will do 2 lines but not 3 on the...

Using flutter, my CircleAvatar with a MemoryImage flickers every time I reload a ListView

I am rendering a base64 image using MemoryImage in a CircleAvatar's backgroundImage property and reloading a ListView every so often and every time the ListView reloads, a very obvious flicker in...

White flash when image is repainted [flutter]

I'm trying to build a grid of images with a given width and height, wrapping them inside Containers and using fit: BoxFit.fill to be able to set a border if the image is selected (i don't care to...

flutter listview with radio not showing in alertDialog

This is the code. code: class ThemeChangerWidget extends StatelessWidget { final List<String> string = ['Light', 'Dark', 'Amoled']; @override Widget build(BuildContext context) { final...

Future builder not firing

I can't seem to get my future builder to update. The api response is working fine I can see it in my logs. (model.getSuburbs). but it doesn't seem like my my future in the FutureBuilder suburbs is...

After changing Application language showTimePicker dialog comes with 24 hour in flutter

I am using showTimePicker in my application. Also, I am using Internationalizing for my flutter app with two languages(English 'en' & Spanish 'es'). Code for present showTimePicker: Padding( ...

Flutter Bloc state change is not updated UI with get_it

I've been building a login/authentication feature using a combination of this login tutorial and the resocoder clean architecture tutorials. It's 99% working perfectly, but it is not responding...

RangeError (index): Invalid value: Valid value range is empty: 0 in flutter while getting contacts

I am trying to get contacts from mobile using the contact services of flutter i am getting count of all contacts right but it is not showing the contacts on ListView. It giving me the following...

getSelectedText on inactive InputConnection flutter

I have this weird problem,When i try to enter value to textfield the keyboard comes up when i try to type the the keyboard goes away , i am also doing fill up Username,Place,mobile that i...

problem in flutter with fireStore in QuerySnapshot its always null

i wil put all the code below this explanation so i just create a CollectionReference like this in class DataBaseServices final CollectionReference brewCollection = ...

Facing Unhandled Exception: Exception: No Internet connection in Flutter

I am new in this flutter and In the woocommerce i have one items and i want to show it in the flutter application for that i use this library - https://pub.dev/packages/woocommerce/example (with...

Flutter url_launcher Unhandled Exception: Could not launch youtube url (Caused by canLaunch)

I'm trying to use the url_launcher plugin to open youtube videos by link but the canLaunch function keeps throwing an error. I'm able to bypass this error only by completely removing the canLaunch...

The argument type 'Function' can't be assigned to the parameter type 'void Function()?' after null safety

I want to achieve to make a drawer with different items on it, so I am creating a separate file for the DrawerItems and the with the constructor, pass the data to the main file. But i get the...

Changing Rive 2 Animation in Flutter

I have a .riv file created with Rive 2. It contains multiple animations. I want to play a default animation but change it depending on an input from a stream. The below code only plays the...

Flutter: No MediaQuery widget ancestor found

import 'package:flutter/material.dart'; void main() { runApp(Calculator()); } class Calculator extends StatelessWidget { final numpad_background_color = Color(0x212121); final...

The argument type 'Object?' can't be assigned to the parameter type 'Widget?'

I was following tutorial and I get this error ' The argument type 'Object?' can't be assigned to the parameter type 'Widget?'.dartargument_type_not_assignable'. I tried to look on the...

How to show firestore all document fields on PaginatedDataTable as streambuilder on flutter web?

I am able to show normal text fields on PaginatedDataTable. But I want to show my Firestore fields on PaginatedDataTable as stream builder method. I have searched on internet but I could not find...

How to calculate distance from a phone thrown in height

In Flutter, there is the sensor package https://pub.dev/packages/sensors that allow to know the velocity X, Y and Z. My question is : how could I calculate the distance of a phone thrown in height...