Category "dart"

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

How to fix type 'Future<dynamic>' is not a subtype of type 'String' Flutter

Flutter beginner here; I'm getting this error: type 'Future<dynamic>' is not a subtype of type 'String' Function that fetch download url from firebase st

Flutter reusable text field and and it's style

I have started learning Flutter recently and wanted to know how to write code that displays multiple text field of same sized box, text style, decoration. I hav

I want to make a slider custom bottom value with incremet in flutter

i want this type slider in flutter any one please help me i want to make this type slider with the same value get by the slider value i am facing the problem to

how to display binance crypto specific pair price value in flutter UI?

I was working to make a crypto app but I have some issues displaying crypto pairs in UI. I've tried different ways but it's not working. Please can you suggest

TextInputType.number only accepts numbers from an english keyboard

i am making a multilingual shopping app and i have arabic and anthor language ++ english as the languages the user can pick, when someone wants to order they ha