Flutter

Retrieving Data From Firestore in time

强颜欢笑 提交于 2021-01-29 06:47:50
问题 I have looked all over the internet for how to fix this problem and I can't find a solution anywhere. I am using flutter with firestore to make an app. I want to make it so when the user logins into the app at the top shows their name (simple right). I can get data from firestore: Future<void> getName() async { print("Attemping to get name!"); final firestoreInstance = await FirebaseFirestore.instance; FirebaseAuth auth = FirebaseAuth.instance; String uid = auth.currentUser.uid.toString();

cannot access the body fields of a Request without content-type - Flutter

↘锁芯ラ 提交于 2021-01-29 06:38:29
问题 I am having an issue making an HTTP PUT requests in a flutter. I can print the data on the console but when I tried to parse it to the endpoint that performs a PUT request, it return a response of 404 please can anyone help me? and this is the message: cannot access the body fields of a Request without content-type "application/x-www-form-urlencoded" Here is the actual problem: for (Products i in selectedProducts) { var stockupdate = { "oid": i.oid, // I can't get the oid here "unitInStock":

Blank Gray screen After release app on play store

孤人 提交于 2021-01-29 06:30:30
问题 When the application is installed, it displays a blank gray screen. 回答1: Well, your flutter project had errors. The errors which appear in the red screen(like something is null for example) during debug appear as a gray screen in production. I'd recommend you to debug the app. 来源: https://stackoverflow.com/questions/62529478/blank-gray-screen-after-release-app-on-play-store

Flutter Image_picker could not resolve all artifacts for configuration

做~自己de王妃 提交于 2021-01-29 06:24:30
问题 after add image picker package in pubspec.yaml file. I am try to run my flutter app but the run failed. The Error That I have when I am try to run flutter project : FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':image_picker'. > Could not resolve all artifacts for configuration ':image_picker:classpath'. > Could not find crash.jar (com.android.tools.analytics-library:crash:26.3.0). Searched in the following locations: https://dl.google.com

Flutter GridView.builder how to update

被刻印的时光 ゝ 提交于 2021-01-29 06:21:04
问题 I am trying to build an Flutter App with a GriView of cards and I want to add a new Card every time I hit the floatingActionButton . But how to update my view? I know the items are added to my list, but the GridView doesn't show the change. List<Widget> cardsList = []; @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return new Scaffold( appBar: AppBar( title: Text('Team Kitty'), ), body: GridView.builder( itemCount: cardsList.length,

Blank Gray screen After release app on play store

ε祈祈猫儿з 提交于 2021-01-29 06:20:07
问题 When the application is installed, it displays a blank gray screen. 回答1: Well, your flutter project had errors. The errors which appear in the red screen(like something is null for example) during debug appear as a gray screen in production. I'd recommend you to debug the app. 来源: https://stackoverflow.com/questions/62529478/blank-gray-screen-after-release-app-on-play-store

flutter: taking screenshots of a widget from its sibling

时光总嘲笑我的痴心妄想 提交于 2021-01-29 06:17:12
问题 Goal I have a view that has two children Widget A and Widget B, standing side by side. Widget B has a button that triggers a screenshot on Widget A, Problem but referring to questions such as this one, it seems that the implementation of screen capture must stay within Widget A. So the button callback in Widget B needs to talk to Widget A. Since both are stateful widgets, I find it difficult for B to call A's function inside its state. The various provider and inheritedWidget mechanisms seem

My Flutter App keeps crashing on my Android Kitkat 4.4.4 tablet when installing

不羁的心 提交于 2021-01-29 06:11:06
问题 i am trying to test my app on my old android tablet that runs android KitKat 4.4.4 but every time I try to run the flutter app in vs code, it's able to build the debug Apk then when installing and the app launches it crashes with the message "unfortunately app has stopped" i tried using this command "Flutter run enable software rendering" hoping it will be able to run my app but the same problem occurs, don't know what to do now, how can I run it on my tablet? this is my app/build.gradle

Flutter Web-Proper way to use both of onGenerateRoute and routes as properties of MaterialApp

扶醉桌前 提交于 2021-01-29 06:09:38
问题 I have a browser link of reset password that sent by email (http://trialxx.id/#/auth?email=trial@email.com ) , so whenever user click that link I would like to navigate them to ResetPasswordScreen. So far I have been declaring the route inside onGenerateRoute , here is the code Route<dynamic> generateRoute(RouteSettings settings) { final settingsUri = Uri.parse(settings.name); final postID = settingsUri.queryParameters['email']; const start = "#/"; const end = "?"; final startIndex = settings

build JsonSerializable models in sub-modules with build_runner

北战南征 提交于 2021-01-29 06:09:24
问题 I have a Flutter project with sub-modules: - root Flutter project - Flutter module 1 - Flutter module 2 ... - Flutter module N Each module contains classes annotated with @JsonSerializable() . Currently i build models with this script: for dir in [DIR_LIST] do echo "Building models in ${dir}" cd ${BASE_DIR}/${dir} flutter packages pub run build_runner build --delete-conflicting-outputs done Is there a way to build every sub-module in my project with a single command in the root directory