Category "dart"

How to change ListTile data with mobx without rebuilding the whole page #Flutter

I am learning the Flutter state management with mobx, and I want to change the context of the dynamic listtile without rebuilding the whole page, I tried observ

How to set a default value for an object in json serialisable?

I want to set a default value for AvailableService. It straight forward enough with primitives. How would I do it with a custom Object class Submenu extends Equ

I cannot convert resized Image object to Base64 string in Dart

I want to resize Image received form imagepicker in Flutter and send it to database in base64 format. import 'package:flutter/material.dart'; import 'package:ht

Is there a way to load async data on InitState method?

I'm a looking for a way to load async data on InitState method, I need some data before build method runs. I'm using a GoogleAuth code, and I need to execute bu

Why loadInitTopStory method called after calling loaded state in flutter?

HackerNewsLoadedState is called before HackerNewsLoadingState and it loads all data from API but does not integrate to _topStories list as well as store data to

Flutter CachedNetworkImage errors: (CacheManager: Failed to download file) and (SocketException or HttpException)

I'm using the cached_network_image library. If I set it up like this: void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Wi

No Material widget found which widget is inside of Scaffold

The following assertion was thrown building IconButton(Icon, padding: EdgeInsets.all(8.0), dirty): No Material widget found. But you'll see from the code below

Is there any texteditor that I can also insert images in the middle of texts in Flutter?

I would like to make a blog app by flutter in which people will write posts with text and picture. I learned how to make the form that image and text are separa

Flutter textfield that auto expands when text is entered and then starts scrolling the text when a certain height is reached

I've tried many configurations of the Flutter TextField but can't figure out how to build this one. I'm looking for a textfield that is a single line initially

How to hide one side of the border of a TextField, in Flutter?

I am using the TextField widget, and I want to hide the left side border, as shown here: TextField( decoration: new InputDecoration( border: new Outlin

How i can make Flutter application start when it receives background firebase message even if the screen is locked i want my app to start

I tried this code but it didn't works: package com.example.flutter_telegram import android.os.Bundle import io.flutter.app.FlutterActivity import io.flutter.pl

ListView In TabBarView In Container not scrolling dart

I have the following flutter/dart code where the listView which is inside a tabBarView and also inside a container isn't scrollable Container( height: MediaQu

Text align in a box decoration

I have this box decoration used for showing the reviews but I don't know what I should use to align the text properly. This is how it looks right now: I want t

Flutter delete Hive Database on Update

I have a Flutter app and I am using Hive to store data. I have deleted some adapters which were used previously. This caused an error and I have to delete the o

Flutter; replace item in list

I have a list in my app. It containe a couple of items. I want to replace every item that is equal to a user-input(A String) , with another user-input(Another S

Firebase Storage await uploadTask.onComplete outdated

Im using this code. The error message is the following: error: The getter 'onComplete' isn't defined for the type 'UploadTask'. (undefined_getter at [chatneu] l

How to set token in authorization header in flutter Dio post request

I want to set a token in the authorization header on my post request using Dio. I have tried to set the header using two options. And both don't work. The first

Is it possible to add the latest version of a dependency to pubspec.yaml without finding it myself?

Lets say I am starting a new dart project. I have a few packages on pub.dev I know that I want to use, and I want to use the most recent version of these packag

disable screen record with sound in flutter

I am trying to disable screen record and screenshot in my flutter app and I already did using flutter_windowmanager package. my problem is with screen recording

Flutter TextField with currency format

There's is some way to do a money format in a TextField to when the user going typing the value it going already formatting in real time? Like in the above i