Category "dart"

Flutter : Handling error Dio Package (404,400 etc)

I'm learn searching data by ID with package DIO https://pub.dev/packages/dio, my problem is every time I'm type wrong keyword search, the app suddenly crash wit

Flutter auto_router: Error: Type 'NavigatorState' not found

Problem summary Hi, I have an issue getting the auto_route package up and running in a Flutter project. Following the official documentation, I have done the fo

How To Prevent Navigation Loops In Flutter

In my application I have 13 screens in total, some of them has links to other screens, I also have a drawer that has links to most of these screens. The followi

How to increase slider track width in flutter

In SliderThemeData trackheight is given but I want to increase the track's width. Here is my current code: SliderTheme( data: SliderThemeData( tra

Flutter - drawAtlas circular cutout

I'm trying to implement a circular cutout of an image and I am using drawAtlas for it. Here is my implementation so far: canvas.drawAtlas( image!, [ /*

How to get substring between two strings in DART?

How can i achieve similar solution to: How to get a substring between two strings in PHP? but in DART For example I have a String:String data = "the quick brow

How to change the application language with BlockBuilder?

The application needs to implement language switching at runtime. Wrote a bloc with event and state and called BlocBuilder in main.dart. But I don't know how to

Is it possible to share your location through flutter app

I built an app in flutter, dart to access the location of the user. I now want to share the current physical location of the user via Whatsapp, email etc but no

How is Dart "sound null-safety" different from Kotlin null safety?

This Dart official video states that Dart's so-called "sound null safety" is better than Kotlin's null safety design, because it can optimise the code based on

Create a Flutter module for desktop apps

Currently, when running the command flutter create -t module --org com.example app we are able to generate a Flutter module which we can add to a host parent ap

VS Code and Flutter/Dart, Widget Autocomplete not working

I'm working with some tutorials to learn Flutter and the one that I'm taking now uses VSCode. I actually prefer it to Android Studio because it doesn't overhea

Vertical divider inside ListTile header

I am attempting to add vertical divider between the leading portion and the title of a ListTile. I understand that Flutter now has a VerticalDivider widget,

blank page when I started web flutter debugging

looks like this : I have a problem when flutter web debugging. My launching project doesn't stop and displays a blank page.blank page like this : i try too we

In Flutter, why does the DraggableScrollableSheet show blank space when there are less children?

I want the DraggableScrollableSheet to stop moving up when there are less items in the ListView. Instead, blank space is created underneath to fill the entire s

Unable to read a file in local directory with Flutter

I'm creating an app that writes a file into local directory and needs to access it later. One problem: when I try to read the file, the process never ends (and

Avoid `print` calls in production code. (Documentation)

I started seeing this warning in all my print statements. print('Foo'); // Warning: Avoid `print` calls in production code.

In Dart get next occurring date from an rrule

Is there a Dart library or, lacking one, a correct way to handle finding the next date that would be returned from a correctly formatted rrule? For example giv

How to change the textStyle of Stepper in Flutter?

I have a Stepper and I am trying to change the color and textStyle inside the Step (yellow circle) widget (i.e: 1,2,3) from white to black. This is my code: The

is there any way to store data in sqflite and when data connection is available upload the data to online mongodb server

Hey friends I want to know a way in which I can store the app data in offline mode and when the data connection is available then the app sync the data to my on

Null safety migration error: package has unmigrated dependencies. But all my dependencies declare support for null-safety

Im trying to migrate dart null safety but I get the following error when I run dart migrate Bad state: Error: package has unmigrated dependencies. Before migra