171 questions
2
votes
2
answers
1k
views
Flutter: Prevent `build` being called when `Refresher` is used
I am using the pull_to_refresh package.
I am having a Stack() with two elements. One of them is the Refresher(). When I pull down on my screen, activating the refreshing animation, the build method is ...
1
vote
2
answers
517
views
Flutter Android Build Stuck after Upgrading to Android V2
I am experiencing this issue when I am trying to run my app on an Android Emulator(API 31, Android 12) after upgrading to Android V2:
Normal Run gets Stuck here:
√ Built build\app\outputs\flutter-apk\...
2
votes
2
answers
9k
views
Execution failed for task ':app:processDebugResources
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.res....
1
vote
2
answers
3k
views
flutter build web command arguments
I want to change the version number when building my Flutter project to web platform.
flutter build web --build-name=2.0.0 --build-number=2
I tried the above command but
Could not find an option named ...
3
votes
3
answers
7k
views
How to build a release mode without a key in flutter - Flutter debug mode is so slow
Whenever I try to test my app with flutter run command it's so laggy and slow and I can't determine how is my app performance in a release mode. However for building the app in release mode for ...
1
vote
1
answer
659
views
Whenever I run - Flutter build apk it gives me an error saying "Could not determine the dependencies of task ':app:lintVitalRelease'."
It works completely fine while testing in debugging mode. But when i try to build the apk of this project I get this error.
FAILURE: Build failed with an exception.
What went wrong:
Could not ...
2
votes
2
answers
1k
views
How to pass data down the widget tree?
I have read and understood a similar question posted here, but am having trouble applying it to my use case. I am new to Flutter and am creating an app that streams audio from a given URL using Ryan ...
2
votes
1
answer
2k
views
Flutter MapBox Error - Unauthorized 401 error when building app for Android
In my project I use mapbox_gl: ^0.14.0.
When running flutter build aar command it fails with:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mapbox_gl:...
4
votes
0
answers
435
views
flutter build web command failing on linux machines after update 2.8.1
I am trying to build flutter web app on ubuntu machine with command "flutter build web". Build is getting failed with below stack-trace. It is occurring since Flutter update 2.8.1
I have ...
2
votes
1
answer
2k
views
Error using source generator from a source generator package
I am writing a dart source generator that is using json_serializable for some of it models. Initially the source generation was working fine for some time but now when I run dart run build_runner ...
1
vote
0
answers
581
views
How to inherit config from default build.yaml file for custom configuration
Dart build.yaml docs proposes this approach to build with custom configurations:
If you need other configurations in addition to dev and release, you can define multiple build.yaml files. For ...
1
vote
1
answer
490
views
flutter Can't get APK
I want to get .apk from my project, but I've got an error from my grade.
I've removed my .gradle file and installed it again, but I still can't get .apk.
I've got this :
android\app\src\main\...
1
vote
0
answers
129
views
Can not get data from a network request in a method that uses Scaffold.of(context)
I have two class methods inside my Stateful widget. As you can see one method is called inside the other one.
1st class method
Future<void> _getExchangeHousesList() async {
const url = ...
13
votes
2
answers
5k
views
flutter build_runner takes too long
I am using EasyLocalization, mobx, JsonSerializable etc. To generate *.g.dart files, I am using build_runner watch or the script in scripts/build.sh:
flutter packages pub run build_runner build
It ...
0
votes
1
answer
541
views
Flutter Bluetooth giving error when app run in permission handling
Pub get
The plugins flutter_twitter_login use a deprecated
version of the Android embedding. To avoid unexpected runtime
failures, or future build failures, try to see if these plugins
support the ...
2
votes
1
answer
774
views
Flutter run and ipa - Mac M1 - #import <Flutter/Flutter.h>
I can't build anymore my project after cleaning the pod.
I wanted to build ipa for the first time but can't quite manage to make it happen as I have this error for flutter run or flutter build ipa. ...
1
vote
1
answer
579
views
Getting error while building apk in release mode in Flutter
What went wrong:
Execution failed for task ':app:processReleaseResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking ...
0
votes
1
answer
1k
views
Flutter: APK does not open the app when installed on device
I've build the apk file for the app I'm working on with the command flutter build apk --split-per-abi. It worked without any warnings.
However, when I try to install the app on my phone, it doesn't ...
6
votes
1
answer
4k
views
two packages are using two different compileSdkVersion in flutter
I am working with geolocator and permission_handler package in my app but now both packages have different requirement for compileSdkVersion which is 30 and 31 respectively. I am trying to change ...
0
votes
2
answers
1k
views
How do I input a TextButton background color to a function in Flutter/dart
I'm trying to create a function where under buildKey I can input two elements, the background color and the soundNumber so that when buildKey is called I can enter say buildKey(red, 2) or buildKey(...
1
vote
0
answers
324
views
Flutter: D/ConnectivityManager(32004): requestNetwork; CallingUid : 10294, CallingPid : 32004
I am new to flutter development. I have been editing a code bought from CodeCanyon. This application gets data from Woocommerce REST API. The application built is not showing any product in the output....
0
votes
1
answer
114
views
My stateful widget does not update the ui, even though I am calling setState and passing the correct value to the widget class
I ran into a bit of a problem in flutter that I could not figure out myself.
So I have the following code (only the important parts of the code are pasted),
class _PrimaryDetailsEditState extends ...
1
vote
3
answers
2k
views
My stateful widget does not update it's state when setState is called
Background
Inside the state object of my stateful widget, I have the following code.
class _PendingJobsState extends State<PendingJobs> {
List<String> pendingJobs = []; <---------...
3
votes
2
answers
606
views
calling setState from the parent widget in flutter does not update the state
Parent Widget
class _FamilyListPageState extends State<FamilyListPage> {
String initialValue = 'Search Families';
void eraseInitialValue() { <-------------- This function is passed ...
0
votes
2
answers
2k
views
Flutter Failed to build AAB file
I m new in flutter and i need your help, I m trying to build AAB file but everytime i try to do this i get some errors.
I generated the APK file without any problem and it works perfectly.
"...
0
votes
1
answer
33
views
Is there a way to not including some folders when building for Apk?
I have to build a project using flutter that is run on web and mobiles,
Is there a way to not including some folders when building for APK because there are some files that are needed only in the web.
...
2
votes
0
answers
2k
views
Flutter test - Force rebuild of a widget
I'm trying to write tests to my flutter widgets.
Let's say I have this stateful widget:
class A extends StatefulWidget {
const A();
@override
AState createState() => AState();
}
class ...
0
votes
2
answers
293
views
Flutter List.Builder fetch JSON
This is my code:
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
List<User> ...
313
votes
19
answers
227k
views
Do not use BuildContexts across async gaps
I have noticed a new lint issue in my project.
Long story short:
I need to use BuildContext in my custom classes
flutter lint tool is not happy when this being used with aysnc method.
Example:
...
5
votes
0
answers
721
views
Flutter build runner - Enable / disabled builders through command line
I'm on a Flutter project and we are using build_runner.
We are using several builders and runnning all of them takes a long time.
Our file looks like this:
targets:
$default:
builders:
...
0
votes
1
answer
470
views
Resource and asset merger error in flutter in VS Code
PS E:\flutter_proj\myapps\eb_bill_tracker> flutter build apk --release
Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety
E:\flutter_proj\...
2
votes
1
answer
479
views
can we exclude a particular file alone while building apk in flutter
There is 2 product flavour in my project and i do not want some files to be added while building the .apk or app bundle and the below solution is not working .
android {
packagingOptions {
...
1
vote
1
answer
1k
views
how to exclude a file while building a apk in flutter
While building apk for my flutter app I need to avoid from files in building . I have tried by below code in build.yaml but it does not work
targets:
$default:
sources:
exclude:
- lib/widgets/...
1
vote
1
answer
172
views
Flutter throws an error when running build or run
I keep getting this when I try to run or run a flutter project
/Users/user1/Projects/projectx/ios/Pods/FBSDKCoreKit_Basics/Sources/FBSDK
CoreKit_Basics/FBSDKUserDataStore.m:19:9: fatal error:
'...
4
votes
1
answer
5k
views
What is the difference between flutter build bundle and appbundle in flutter?
I find little to no information on what's the difference between these two
flutter build bundle
flutter build appbundle
When should I use one over the other?
1
vote
1
answer
155
views
how to release flutter app to google play?
I want to release an flutter app for Google play store and I checked every step of in Instruction page of flutter, but every time I got this error:
* What went wrong:Execution failed for task ':app:...
1
vote
1
answer
120
views
problem with running every flutter app from github( Because xml >=4.4.0 <4.4.1 depends on petitparser ^3.1.0 and xml )
i am new to flutter, i have already made some small projects on my system but when I clone projects from github i cant build and run these projects, and I always get errors similar to this:
Because ...
-1
votes
1
answer
2k
views
flutter build web didn't work (Missing index.html.) in flutter 2
I can't get a web release from my flutter app
when I use flutter build web I see this Error : Missing index.html
Then I run the flutter create but I facing by this Error : No option specified for the ...
1
vote
1
answer
2k
views
Gradle wrapper not found issue when building a flutter apk
I am getting below error when I am trying to build apk or run it on a simulator.
I tried with vs Code and Android Studio both, but the same error.
But when I am running the app on a browser or as a ...
1
vote
0
answers
125
views
Why flutter debug works but not release?
My app builds successfully in debug mode and runs fine but when using flutter run --release it gives some issues.
* What went wrong:
Task 'assembleAarRelease' not found in root project '...
1
vote
2
answers
2k
views
Flutter unable to build IOS archive
i am trying to build a IOS IPA for generic device, followed all the instructions, added signing certificates, team etc. but i am unable to build the product. any one please help me to resolve this ...
0
votes
0
answers
50
views
Insecure Http not Allowed error after I change android label
I know about flutter upgrade issue that doesn't allow insecure http but I did fix it by placing android:usesCleartextTraffic="true" in AndroidManifest file. It was working fine until I ...
2
votes
1
answer
732
views
Flutter only grey screen is visible in release apk
I wanted to build release apk for my app and I tried running this command
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Then, I ran the app-armeabi-v7a-...
1
vote
0
answers
575
views
The method 'FormBuilderDateTimePicker' isn't defined for the type '_CreateEventState'
I am trying to use FormBuilder for my project for adding an event to a calendar, I used ForBuilderTextfield() and FormBuilderSwitch(), however when I try to define FormBuilderDateTimePicker for ...
0
votes
1
answer
381
views
flutter build ios is taking long time, more than an hour
I have an app which takes a lot of time to build for ios. My other apps seems to be built quicker than this one particular app.
My flutter version
Framework • revision 7891006299 (4 months ago) • 2020-...
0
votes
1
answer
376
views
Empty greyish screen when i install flutter app on real device
I just finished a flutter project and used flutter build apk --split-per-abi to generate an apk to test on actual device, after successfully building, app shows nothing but an empty greyish screen. ...
8
votes
1
answer
11k
views
Flutter Windows build Failed, error LNK1168 [closed]
While building a Flutter app for Windows in debug mode, this error is occuring. flutter doctor -v gives normal output. What might be the cause of this ?
Launching lib\main.dart on Windows in debug ...
2
votes
0
answers
353
views
Flutter passing parameters in the builder
I've been working with flutter_builder for a few days. I think the system is very powerful and I really like it, but I still need to understand some information.
In order to run the builder you need ...
3
votes
2
answers
12k
views
Note: Recompile with -Xlint:deprecation. Note: Some input files use or override a deprecated API
When I run flutter run or debug my code after flutter clean it shows this error
Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_core-0.7.0\android\src\main\java\io\flutter\plugins\...
2
votes
1
answer
1k
views
Getting build errors with Flutter Notification Plugin
When I am using Flutter Local Notification Plugin (4.0.1), I am getting build errors on both Android and iOS. This is occurring with few other plugins as well - Apple Sign in for iOS and Google Maps ...