Category "dart"

Use Firebase Cloud Messaging in a Flutter Windows app

I have checked both firebase_dart and flutterfire packages but none of them provide a firebase FirebaseMessaging class to use. Is there any way I can use Cloud

Adding shadow text form field

I want to achieve this Here is my code so far, Padding( padding: EdgeInsets.fromLTRB(5, 10, 5, 10), child: Container( decoration: BoxDecoration(

json_serializable not generating code for final fields and getters

This is my class: @JsonSerializable() class Foo { final int a = 0; int get b => 42; } The generated code doesn't include any of the a or b field: Foo _$

How to deserialize generic JSON with List type in Dart

I want to deserialize some JSON data that contains a list of article information { "data": [ { "id": 1, "title": "First arti

Range Error(index): invalid value: valid value range is empty

im trying to set initial value for 'title' but it keeps showing me the error: range error (index): invalid value: valid value range is empty class _ProductCreat

Check if item is not in a Firebase document

I have a field in my Firestore documents that happens to be an array of user IDs, this field is called "tempID", I want to run a query that return all documents

Is it possible to iterate a list with index values in the Widget tree?

I have a List which is a list of image URLs, which I will then use to construct a series of Image widgets as part of a gallery. The images will be aligned next

list_remove_unrelated_type - dart

I have a function like this: void function(List<int> listToRemove) { final List<int> list = [1, 2, 3, 4, 5]; list.remove(listToRemove); } and i

is this the right way to implement a custom architecture in flutter app using riverpod?

I am creating an App using riverpod, hooks and freezed. My aim is to remove the entire logic out of the widget tree. This article by @ttlg inspired me. In my a

Flutter/Firebase: build page depending on database

I'm trying to build a simple card game app to play online with friends using Flutter and Firebase. The way it works (for now), is we have lobbies which players

Flutter File Picker package is not working at all

I followed this tutorial online: https://www.youtube.com/watch?v=LlO5jydXws0 For some reason when I press the button to open a file, it does not work or do anyt

Dart/Flutter remove boilerplate parameters in named constructor to reduce code size

I have a class with multiple named constructors. All of them have a set of defined parameters and for now I have to rewrite them all over again when I add a new

Can someone explain to me what is the details of line 5 return numberList[index] + sum(numberList, index - 1);

Can someone explain the syntax process? How line 5 will be implemented and what is the sequence for these three elements and what is the value each time in the

Dart snapshot generator failed with exit code -9

Debugging mode working well but when I tried to run it as release mode or building apk it's not working. Tried all things that I could but it's not working (Cre

"ChromeProxyService: Failed to evaluate expression" error

I get this error when I want to start my project with chrome device via flutter. The error is as follows; And vs code redirects to this line ; Because of thes

Stop flutter from chaing fontSize depending on phone font

I'm building an app there is one problem. The font is causing overflow when I set my phone font to a bigger size. I tried using this : class SizeConfig {

Exception: Context is null, please call ToastContext.init(context) first

The issue is seen on the Toast.dart and Armodel.dart. if possible please suggest me how do i implement OCR as i followed up the codes from Pubdev but still when

Problems when receiving websocket data(it's json but result is list of number)

I am a beginner developer developing with Dart. There was a problem while working with websockets. According to the API help, it's obviously JSON. but data is l

Flutter. Play raw h264 from WebSocket

I'm trying to display live video in flutter coming from video server. Video server sends raw h264 video through websocket. I know that this video can be played

Method has automatic access to build context

Here is a method that is called within my application when a 'save' button is pressed. The method accesses a ChangeNotifier instance using the Provider object a