Category "dart"

Dart, Nested classes, how to access child class variables

I am new to Dart/Flutter. So forgive me. I am trying to create a Object class mentioned as TestData below. And one of the variables in TestData is a Map of Test

Flutter - How does it work behind the scenes?

Obviously, flutter is a framework for running apps on iOS and Android using one codebase. But how does it manage to do so? Will it compile to native code, or is

MissingPluginException for Linux desktop app

Just added desktop support to my flutter app, it runs fine in the android emulator, but wont render any element in neither browser nor desktop, just a simple bl

Trailing widget consumes entire tile width. Please use a sized widget, or consider replacing ListTile with a custom widget

I am making a basic shopping app .My idea is to make a list tile of my products so that I could edit or delete the products . So when i navigated to that page

Send notifications using REST api

I want to use the http package to send notifications to topics through the flutter app using the docs as in https://firebase.google.com/docs/cloud-messaging/sen

Flutter: json_serializable ignore nullable fields instead of throwing an error

Suppose there are two models User and City @JsonSerializable() class User { int id; String name; City? city; List<Map<String, City>>

RangeError (index): Invalid value: Valid value range is empty: 0

I am trying to fetch a list from API that is two methods fetchImages and fetchCategories. the first time it is showing a red screen error and then after 2 secon

RangeError (index): Invalid value: Valid value range is empty: 0

I am trying to fetch a list from API that is two methods fetchImages and fetchCategories. the first time it is showing a red screen error and then after 2 secon

How do you round a double in Dart to a given degree of precision AFTER the decimal point?

Given a double, I want to round it to a given number of points of precision after the decimal point, similar to PHP's round() function. The closest thing I can

Flutter, Freezed: Set Class as default value

I have a User class which contains a Purchase class. I want to make it non-nullable, but not required. So this means that I would need to set a default value. I

How to build an app locker application using flutter

I want to create an app which allows to put lock on the other apps that are to be protected in the device. This app lock will start automatically before opening

Where to set the path to the protoc to import standards Protocol Buffers

Where need I to set the path to the protoc to get import standards Protocol Buffers (protobuf), like empty.proto and timestamp.proto in Windows and Dart? When

Invalid characters while converting API response to PDF

I used the following syntax for my GET request var response = await http.get(Uri.parse(url), headers: { "Content-Type": "application/pdf", 'Authorizatio

Flutter doctor error -cmdline tools component missing and Android sdkmanager tool not found. Windows

I'm trying to setup an android emulator but I don't have intel. I've been through so many similar pages but none have given me an answer on why I can't get my f

Error in using table_calendar: ^3.0.5 dependency in flutter

I get this error in my code where I used a table_calendar dependency. Here is my code where I implemented the calendar. import 'package:fitr/reusable_widgets/bo

Why im getting this error Warning: Operand of null-aware operation '??' has type 'Color' which excludes null

Im using this package flutter_datetime_picker: ^1.5.1 And this is my code String _date = "Please pick Age"; Widget _buildage() { return Column(crossAxis

Dart/Flutter How to compare two TimeOfDay times?

TimeOfDay documentation has no comparison operator and primitive comparison does not work. My only solution that I can thinking of right now is to convert TimeO

How to display a dynamic map using Tabs and SliverGrid

I have a Model called service provider that contains a the following data: class ServiceProvider { final String logoUrl; final int lowerPrice; final

How to display notifications on windows using flutter?

I want to show notifications on windows using Flutter. But I'm unable to do so. I've tried packages like deskkop_notifications and flutter_local_notifications.

Dart "--no-sound-null-safety" flag not working

I am trying to run a dart file without null safety using the command line. The file is: sandbox.dart void main() { String a; print(a); } I then run the