Category "dart"

How do I compare two app versions in flutter?

I was trying to compare two different app version in flutter, But I am not able to assign , App versions in a variable. var a = 1.0.0; var b = 1.0.1; But the v

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

GetX flutter state is not being updated

I am new to flutter. I just started using GetX flutter package. I am working on a ToDo list app. I am having trouble updating the widget state. What I have done

Error: The argument type 'Null Function(DateTime, List<dynamic>)' can't be assigned to the parameter

I am facing the same issue with this Error: The argument type 'Null Function(DateTime, List<dynamic>)' can't be assigned to the pa

How to reverse a Map in dart? Is there any build in function

There is a map. I want to reverse it. is there any inbuilt function for that in dart? {203: 5, 201: 3, 204: 1} This the current Map i have. {204: 1,201: 3:2

Get.to(MyPage()) - How to remove all previous routes - Flutter GetX

I have a simple Flutter app and I want to remove all previous routes but I want to do with GetX, How to do that? Now it works with Navigator.of(context).pushNam

update dart sdk for flutter

I would like to use dart SDK >= 2.2.0 with flutter. But my current version used BY Flutter is 2.1.2 flutter --version Flutter 1.2.1 • channel stable &b

Flutter - TextFormField expand not working properly

I'm trying to create my own TextFieldForm to use in my app by specific design and I have some troubles in order to expand it if it's the case. Currently, it loo

how to override the toString method of an enum in dart

I'm just wondering if it's possible to override the toString method in dart this is what I have: enum Style{italic, bold, underline} Style.italic.toString() //

How to navigate properly in Flutter Web with Back/Next browser buttons?

I'm currently working with Flutter Web using flutter_modular for the routing which works properly when you navigate straight to a page throught the browser, but

How to implement a Drop Down list in Flutter?

I am trying to load data from my REST API and load them to the dropdown lists. Below is the code where my dropdown list and data loading from outside is impleme

How can I get "errors" from graphql-flutter

I want to get my sended errors from data.errors. I use "https://github.com/zino-app/graphql-flutter/tree/master/packages/graphql" to get my response. My respons

How can I get "errors" from graphql-flutter

I want to get my sended errors from data.errors. I use "https://github.com/zino-app/graphql-flutter/tree/master/packages/graphql" to get my response. My respons

How To Listen to BLoC Events From Another Screen in Flutter

SOLVED: I WAS GETTING ANOTHER STATE INSTEAD OF WHAT I EXPECTED I have two screens in my app. The first one contains products and each one of them is wrapped wit

Dart/Flutter DateTime difference inDays error for March 31 April 1

I am trying to get the difference in Days between two dates picked from a DatePicker. This works fine except for ONE single date : March 31. The difference in

How to manipulate arrays/index

I would like to access the index of a list and concatenate it to the index of another list. For example, the first user's input is "AB" and the second is "CD",

Should you use required named parameters when making a data model in flutter?

Is it good practice to require named parameters for data models in flutter when you know that the data should always have a specific field like an id or usernam

How to add image to ExpantionTile in flutter

I've been working on an app in which I want to add an image in the ExpansionTile function but the catch is that flutter don't allow us to add image in that. For

How to make a Timer.periodic function fire right away after calling it Flutter

I'm trying to use a Timer.periodic function in flutter and it seems that when I call it, it waits for the specified duration that I put in for the time between

Flutter and getx: update() does not notify GetBuilder

I have a very strange issue for my current project using Flutter and getx package. Short: the Notifier is not working. On initState from a GetBuilder I try to u