Category "flutter"

How to forbid navigating back to Login page after successful login?

I have a question. How to achieve this behavior using auto_route's AutoRedirectGuard: User opens Flutter app in browser but session expired and is redirected to

I get a weird error when trying to initialize Hive

Error: Unhandled Exception: HiveError: You need to initialize Hive or provide a path to store the box. Essentially I have these in my dependencies so everything

How to use ADB command in Flutter

I'm writing a test application in Flutter to get data from available function/command in Android: in details I would like to access to Audio Codec device in ord

Can't use Geolocator inside Workmanager's task in Flutter

I am trying to use either Geolocator.getCurrentLocation or Geolocator.checkPermission() inside Workmanager's task. Both of those calls raise the same exception:

Flutter iOS Terminates State get data from firebase push notification

How we can get the data of push notification to save it in our local database using flutter iOS while in terminated state? We are using firebase admin-sdk to se

What is the right gradient to use to achieve the inner shadow effect of the native macOS graphical time picker with Flutter CustomPainter?

I'm recreating the graphical macOS time picker for macos_ui and I'm having some difficulty painting the inner shadow gradient correctly. This shadow, along with

The difference between the use of constructor " className() and className._()

I have these two ways to write a constructor. className() and className._() What is the difference between them and when should I use which? class GlobalStat

how to access flutter bloc in the initState method?

In the code shown below , the dispatch event is called from within the build method after getting the BuildContext object. What if I wish to do is to dispatch a

Flutter conditional statement for getter

I've this in my application: LocalTextItem? get text => FocusedItemModel.of(context).focused as LocalTextItem; The idea was if user taps a text item a

Flutter connectivity: Works on Android, but on iOS simulator when I can open webpages in Safari I have internet but the app says there is no internet?

I use this package: https://pub.dev/packages/connectivity_plus I have a finished application that is working on Android but when I am testing it on iOS it shows

How to remove default navigation route animation

I am below code which given in flutter documentation for page routing // Within the `FirstRoute` widget onPressed: () { Navigator.push( context, Mate

How to use RefreshIndicator to update FutureBuilder state?

I am using FutureBuilder to show the data loaded from server. I want to show the loading state only once when the app starts, that is why I am calling the API f

How to make background image to be fixed in flutter

I'm using an image as a background, and it looks good until I use the keyboard, how to solve that? before the keyboard is shown and that's after the keyboard is

Best practices to change app state from a package

I'm developing a standalone package which is currently inside an app like this: app/packages/my_package I created the package with the create command package te

Dart 'the constructor being called isn't a const constructor' when using FlexibleSpaceBar background property

When using the FlexibleSpaceBar widget in flutter I am unable to set the background property. According to the docs it's supposed to be a Widget. From the docs

How to get a full screen notification from FCM?

I am building a home automation project that has a fire sensor that will write to Firebase Database if there is a fire detected, then from that point I need to

How to make 2 FutureBuilders wait on the same Future in Flutter?

I have a Future which, when complete, adds some data to a ChangeNotifierProvider. Then I use the data in the ChangeNotifierProvider to populate some ListViews.

How to play Music (mp3, m4a etc) from Google Drive in Flutter

I want to play Music Files like mp3, m4a files from Google Drive in Flutter. So far, I'm able to fetch the link of files in my google drive Assets I'm using ass

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

How to solve "Invalid image data" error in Flutter

I'm using SQLite for storing data locally. insert an image as a string and get them to show here is the error that occurs _Exception (Exception: Invalid image d