Flutter

How to get Firebase UID knowing email user?

霸气de小男生 提交于 2021-02-11 13:17:35
问题 I am building a Flutter app where the administrator profile can create users to access their company. The code works right, unless the new user was previously created for another company. In this case an error of type ERROR_EMAIL_ALREADY_IN_USE appears from FIREBASE AUTH. What I want to do is simply retrieve the assigned UID from FIREBASE AUTH, which is necessary to assign the user within my database to an additional company. It's my code... _register(LoginBloc bloc, BuildContext context)

Flutter & Dart

倖福魔咒の 提交于 2021-02-11 13:04:15
Flutter & Dart https://www.dartlang.org/install https://flutter.dev/ https://flutter.dev/docs/get-started/install/macos flutter_macos_v1.2.1-stable.zip & 464 MB https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_v1.2.1-stable.zip https://flutter.dev/docs/development/tools/sdk/archive https://flutter.dev/community/china https://flutter-io.cn/ https://codelabs.flutter-io.cn/ https://codelabs.flutter-io.cn/codelabs/first-flutter-app-pt1-cn/index.html#0 https://classroom.udacity.com/courses/ud905 https://flutter.dev/docs/get-started/install/macos#get-the-flutter-sdk

how to edit value at the child widget

对着背影说爱祢 提交于 2021-02-11 13:01:39
问题 i try to edit the value of the child widget, i can do it with StatefulWidget parent but i want to do it with StatelessWidget parent and without using global value class Homepage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( actions: <Widget>[ FlatButton(child: Text('addFile'), onPressed: () {}), FlatButton(child: Text('deleteFile'), onPressed: () {}) ], ), body: Child(), ); } } class Child extends StatefulWidget { @override

how to edit value at the child widget

徘徊边缘 提交于 2021-02-11 12:59:05
问题 i try to edit the value of the child widget, i can do it with StatefulWidget parent but i want to do it with StatelessWidget parent and without using global value class Homepage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( actions: <Widget>[ FlatButton(child: Text('addFile'), onPressed: () {}), FlatButton(child: Text('deleteFile'), onPressed: () {}) ], ), body: Child(), ); } } class Child extends StatefulWidget { @override

Flutter app crashes after using package path_provider, how do I fix it in flutter? [duplicate]

醉酒当歌 提交于 2021-02-11 12:58:07
问题 This question already has answers here : NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/Preconditions; (1 answer) Android 3.1.1 - Failed resolution of: Lcom/google/android/gms/common/internal/zzbq; (10 answers) java.lang.NoClassDefFoundError: Failed resolution Failed resolution of: Lcom/google/android/gms/common/internal/zzab; (4 answers) Closed 5 months ago . I've been trying to make an offline app using json for local storage in flutter. I've used a

iOS app crashes when calling this function 2 times in a row (Firebase Storage, Flutter)

[亡魂溺海] 提交于 2021-02-11 12:51:47
问题 My app crashes when calling "_submit" function 2 times in a row. I can pick the picture from gallery and upload it to Firebase Storage but if I call it again the the whole app crashes. From this button : floatingActionButton: FloatingActionButton( onPressed: () => _submit(), Submit calls a Provider of type Database : Future<void> _submit() async { widget.database = Provider.of<Database>(context, listen: false); await widget.database .setPicture("regione/citta/comune/lavoro/IDArtista/profilo

Private and public routers in Flutter

左心房为你撑大大i 提交于 2021-02-11 12:51:22
问题 I am new in Flutter and my task is to divide path into public and private. For solution, this I used the suggested advice from Dima Rostopira answered Jul 28 '20 at 8:29 in this topic My main problem is that instead of the shown in the example: MyAuth.isUserLoggedIn I need to use an asynchronous function: Auth().isAuth() but example solution does not work with an asynchronous function. Can someone help solve this problem? ConditionalRouter.dart class ConditionalRouter extends MapMixin<String,

Private and public routers in Flutter

戏子无情 提交于 2021-02-11 12:50:57
问题 I am new in Flutter and my task is to divide path into public and private. For solution, this I used the suggested advice from Dima Rostopira answered Jul 28 '20 at 8:29 in this topic My main problem is that instead of the shown in the example: MyAuth.isUserLoggedIn I need to use an asynchronous function: Auth().isAuth() but example solution does not work with an asynchronous function. Can someone help solve this problem? ConditionalRouter.dart class ConditionalRouter extends MapMixin<String,

iOS app crashes when calling this function 2 times in a row (Firebase Storage, Flutter)

◇◆丶佛笑我妖孽 提交于 2021-02-11 12:50:56
问题 My app crashes when calling "_submit" function 2 times in a row. I can pick the picture from gallery and upload it to Firebase Storage but if I call it again the the whole app crashes. From this button : floatingActionButton: FloatingActionButton( onPressed: () => _submit(), Submit calls a Provider of type Database : Future<void> _submit() async { widget.database = Provider.of<Database>(context, listen: false); await widget.database .setPicture("regione/citta/comune/lavoro/IDArtista/profilo

Stop pre-installed screen recording apps from recording screen in android

十年热恋 提交于 2021-02-11 12:48:58
问题 I am using flutter and have disabled normal apps from recording the screen. Here is the code getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE); The problem is there are some phones where screen recordings apps are pre-installed and above code can't stop them from recording the screen. So is there any other way to stop these apps from recording the screen? On other answers I saw that this was not possible but there are some apps on playstore