For questions about specific flutter packages. A package can contain dependencies (listed in the pubspec), Dart libraries, apps, resources, tests, images, and examples
Questions tagged [flutter-packages]
462 questions
11
votes
1 answer
Unable to select image using flutter image picker on iOS simulator
I am learning how to select images from gallery. I have implemented flutter image picker for the same. But when I try to select the image in simulator, I am not able to do so.
Please help
Flutter Doctor
Doctor summary (to see all details, run…

OM KALE
- 194
- 2
- 9
11
votes
5 answers
How to pass data from one provider model to another?
I want use provider (ChangeNotifierProvider) and ChangeNotifier for manage app state. But how I can access state from one model in another model?
Use case: In chat app, one model for store user information. Other model use user information (for…

FlutterFirebase
- 2,163
- 6
- 28
- 60
10
votes
2 answers
How to connect flutter with MongoDB
I have a website build with Nuxt JS and MongoDB.
I want to create a mobile app with flutter and I don't know how to connect flutter with MongoDB.
Give me some code examples.
Here is the solution! (Click here)
Actually, I publish a blog about it feel…

Rohit Nishad
- 2,570
- 2
- 22
- 32
9
votes
6 answers
Unknown behavior with hot reload when using the go_router package
I was using go_router in a project. I had a separate file with an instance of GoRouter with all the routes (home, login, register). Then, I added authentication with a cubit. So I had to modify my GoRouter instance to a function that received with…

Miguel Yurivilca
- 375
- 5
- 12
9
votes
1 answer
Flutter: Display log in release mode in iOS
I'm trying to display logs in release mode in iOS to test my in App Purchases...
I tried print() & log() but nothing works
Fun fact, it works in Android.
Do you know how to do that?
Thank you

Naografix
- 847
- 2
- 15
- 35
9
votes
4 answers
How to solve 'could not find package integration_test in the Flutter SDK' error
I have an app, it is very simple and I keep getting this error:
pub get failed (server unavailable) -- attempting retry 1 in 1
second... Because bascis depends on integration_test any from sdk
which doesn't exist (could not find package…

Mohamed AbdelraZek
- 2,503
- 4
- 25
- 36
9
votes
2 answers
How to add localization support inside Flutter packages
I am creating a Flutter package that has some text inside it. I want the consumer application of my package to pass locale to it, based on that locale my package should decide whether to show this text in 'Arabic' or 'English' (This means my package…

Taha Ali
- 1,150
- 9
- 14
7
votes
1 answer
How to correctly use BlocListener and BlocProvider in Flutter App
I am using flutter_bloc 4.0.0 in my Flutter App, I used the example from Felix Angelov (https://medium.com/flutter-community/firebase-login-with-flutter-bloc-47455e6047b0) on implementing a sign in or login flow using the bloc pattern. It was…

K.chim
- 868
- 2
- 14
- 25
6
votes
1 answer
How to solve flutter project compile Debug Kotlin error
I'm new to flutter development. I used audioplayers: ^0.19.0 package in one project but when the project runs on an emulator it pops up with big error messages. Can you guys please help me to solve this? I have no idea about is it my code error or a…

Isuru Akalanka
- 109
- 1
- 7
6
votes
0 answers
How to add Localizations to a Flutter package without a MaterialApp?
I am moving some widgets of my app into a seperated Flutter package. These widgets use AppLocalization to display localized Strings. I want to define the Strings inside the package.
In the package there is no 'entry point' in form of a…

Smofe
- 71
- 2
6
votes
1 answer
How to access assets in package
The original question comes from flutter issue 32799
I develop a dart package, i need load some json file in runtime, but when I do this occur an error. load image is no problem ,the code:
void main() {
Future loadAsset() async {
…

littlegnal
- 425
- 4
- 14
6
votes
1 answer
Flutter force higher package dependency version
TLDR: How to force a specific Flutter package (library) version for the entire app?
Let's suppose I have the following dependencies in my pubspec.yaml file:
dependencies:
flutter:
sdk: flutter
datetime_picker_formfield: 0.4.3
date_utils:…

kosiara - Bartosz Kosarzycki
- 10,922
- 12
- 70
- 83
6
votes
0 answers
Flutter package for creating git hook in ./.git/hook folder of Flutter project
I already have a pre-commit hook in my project, but I want to force all people in my project to use it. For that purpose, I want to write a flutter library for creating files in a flutter project directory(like a husky in js world)! All that I have…

no_fate
- 1,625
- 14
- 22
6
votes
6 answers
Can't build a flutter project with PathProvider dependency
Disclaimer: First of all, this is my early attempt to play with Flutter. So forgive me if is a noob question.
I had been playing with an MVP-Clean architecture for Flutter apps in iOS, and when trying to build a data source where I can persist data…

MiguelCatalan
- 916
- 10
- 26
6
votes
6 answers
Create a package in dart
How do I create a package in the new Dart Editor?
There is no "Add Pub support" checkbox?
Also how to create "packages" with the new editor?
Is a tutorial out there that describes the process with the new Editor?

mc_fish
- 493
- 3
- 10