Flutter

Flutter not updating DropdownButton placed within a dialog when item is selected

烈酒焚心 提交于 2021-02-10 12:58:11
问题 I have an alertDialog containing a DropdownButton widget. Whenever I click on an option within the dropDown I want it to display the selected value. I have listed the code below along with 2 screenshots. I believe this may be an issue with how flutter builds widget because when I placed the DropdownButton widget outside of the dialog it worked, however placing it within an alertDialog causes it to fail. I also noticed that if I clicked on an option in the DropdownButton and then exited and

stream builder is not updating after navigation

二次信任 提交于 2021-02-10 12:43:56
问题 I am using a stream builder to detect if user logged in or not. return StreamBuilder<User>( stream: AuthService().user, builder: (context, snapshot) { if (snapshot.hasData) return SectionWrapper(); else return Authentication(); }); and this is the stream I am using Stream<User> get user { return _auth.onAuthStateChanged.map(_userFromFirebaseUser); } //create user object based on firebase user User _userFromFirebaseUser(FirebaseUser user) { return user != null ? User(uid: user.uid, email: user

stream builder is not updating after navigation

回眸只為那壹抹淺笑 提交于 2021-02-10 12:43:33
问题 I am using a stream builder to detect if user logged in or not. return StreamBuilder<User>( stream: AuthService().user, builder: (context, snapshot) { if (snapshot.hasData) return SectionWrapper(); else return Authentication(); }); and this is the stream I am using Stream<User> get user { return _auth.onAuthStateChanged.map(_userFromFirebaseUser); } //create user object based on firebase user User _userFromFirebaseUser(FirebaseUser user) { return user != null ? User(uid: user.uid, email: user

flutter Ios build fails after upgrading firebase core

好久不见. 提交于 2021-02-10 12:42:37
问题 I had a flutter app which was working fine with firebase core (version 0.4.0 ). I upgraded the firebase_core to version 0.5.0 and did all changes as per the migration. After that ios build is giving following error Launching lib/main.dart on iPhone SE (2nd generation) in debug mode... Running Xcode build... Xcode build done. 95.9s Failed to build iOS app Error output from Xcode build: ↳ AssertMacros: amdErr = AMDeviceConnect(tmpDevice) == 0 , file: /BuildRoot/Library/Caches/com.apple.xbs

How do I use custom font with a set size in flutter/dart?

↘锁芯ラ 提交于 2021-02-10 12:15:58
问题 I'm trying to use color , fontWeight and fontFamily with style: style.copyWith , the custom font I'm trying to use is Vonique , I've imported it like so into pubspec.yaml fonts: - family: Vonique fonts: - assets: fonts/Vonique-64-Bold-Italic.ttf - assets: fonts/Vonique-64-Italic.ttf - assets: fonts/Vonique-64-Bold.ttf - assets: fonts/Vonique-64.ttf Is this the correct way to import it? I've tried it both was with '' and without '', still doesn't change the text font. Text('Login', style:

How do I use custom font with a set size in flutter/dart?

耗尽温柔 提交于 2021-02-10 12:12:00
问题 I'm trying to use color , fontWeight and fontFamily with style: style.copyWith , the custom font I'm trying to use is Vonique , I've imported it like so into pubspec.yaml fonts: - family: Vonique fonts: - assets: fonts/Vonique-64-Bold-Italic.ttf - assets: fonts/Vonique-64-Italic.ttf - assets: fonts/Vonique-64-Bold.ttf - assets: fonts/Vonique-64.ttf Is this the correct way to import it? I've tried it both was with '' and without '', still doesn't change the text font. Text('Login', style:

Flutter - Show Camera/BarcodeScanner in Container

◇◆丶佛笑我妖孽 提交于 2021-02-10 12:11:49
问题 I would like to store the camera function in a separate container as the title already says. that means, if the camera starts it is only displayed in the red container, how could i achieve this at this point? Picture of my Screen: https://imgur.com/a/0qFvHto I use the following dependency for Scanning: barcode_scan: ^1.0.0 My Code for scanning looks like this: Future _scanQR() async { try { String qrResult = await BarcodeScanner.scan(); setState(() { result = qrResult; Future.delayed(const

How do I use custom font with a set size in flutter/dart?

时光总嘲笑我的痴心妄想 提交于 2021-02-10 12:10:04
问题 I'm trying to use color , fontWeight and fontFamily with style: style.copyWith , the custom font I'm trying to use is Vonique , I've imported it like so into pubspec.yaml fonts: - family: Vonique fonts: - assets: fonts/Vonique-64-Bold-Italic.ttf - assets: fonts/Vonique-64-Italic.ttf - assets: fonts/Vonique-64-Bold.ttf - assets: fonts/Vonique-64.ttf Is this the correct way to import it? I've tried it both was with '' and without '', still doesn't change the text font. Text('Login', style:

How do I use custom font with a set size in flutter/dart?

只谈情不闲聊 提交于 2021-02-10 12:09:34
问题 I'm trying to use color , fontWeight and fontFamily with style: style.copyWith , the custom font I'm trying to use is Vonique , I've imported it like so into pubspec.yaml fonts: - family: Vonique fonts: - assets: fonts/Vonique-64-Bold-Italic.ttf - assets: fonts/Vonique-64-Italic.ttf - assets: fonts/Vonique-64-Bold.ttf - assets: fonts/Vonique-64.ttf Is this the correct way to import it? I've tried it both was with '' and without '', still doesn't change the text font. Text('Login', style:

Awaiting some results before dispatching an event with flutter_bloc library

↘锁芯ラ 提交于 2021-02-10 12:01:36
问题 I am trying to create a BLOC which depends on two other time based bloc and a non-time based bloc. What i mean with time based is, for example they are connecting a remote server so it takes time. It's working just like this: Login (It's of course taking some time) If login is successful Do another process (This is something takes time also. It returns a future.) After login and another process finishes, let the page know it. My BLOC depends on these three: final UserBloc _userBloc; final