Flutter

Awaiting some results before dispatching an event with flutter_bloc library

旧街凉风 提交于 2021-02-10 11:58:26
问题 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

Awaiting some results before dispatching an event with flutter_bloc library

我的未来我决定 提交于 2021-02-10 11:58:08
问题 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

Awaiting some results before dispatching an event with flutter_bloc library

喜你入骨 提交于 2021-02-10 11:57:35
问题 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

escape " regexp in dart

谁说胖子不能爱 提交于 2021-02-10 08:24:12
问题 I'm trying to catch symbols in a dart Regexp. My regexp looks like this: RegExp containsSymbolRegExp = RegExp(r"[-!$%^&*()_+|~=`{}\[\]:;'<>?,.\/]"); However, I also need to make it catch the symbol " I can't stick " in there though, since it messes with the string. Any ideas how to do this? Thanks. edit: jamesdlin's answer works great for dart. But it doesn't work for my flutter app, so I'm thinking it has something to do with flutter. Here's the code I'm applying this to:

How to align a TextField and a Text on the same level

跟風遠走 提交于 2021-02-10 08:03:09
问题 I'm trying to align horizontal bottom 1 Text and 1 TextField value using Row , but TextField value always higher than the left Text . is it possible to align horizontal bottom Text and TextField value even when the font-size more bigger ? Here are my code and screenshot: body: Column( children: <Widget>[ Row( children: <Widget>[ Text('Number 1 : '), Expanded( child: TextField( textAlign: TextAlign.start, textAlignVertical: TextAlignVertical.bottom, textCapitalization: TextCapitalization

_AssertionError ('package:firebase_auth/src/firebase_auth.dart': Failed assertion: line 95 pos 12: 'email != null': is not true.)

依然范特西╮ 提交于 2021-02-10 07:51:54
问题 My goal is to build a registration in flutter with Firebase. However, when I press the button that contains the register function, the app stops and I receive this error: Exception has occurred. _AssertionError ('package:firebase_auth/src/firebase_auth.dart': Failed assertion: line 95 pos 12: 'email != null': is not true.) The integration with firebase is working, probably the problem is on textformfield that is not getting data... import 'package:cloud_firestore/cloud_firestore.dart'; import

How to convert DateTime to TZDateTime in flutter?

瘦欲@ 提交于 2021-02-10 07:32:32
问题 I am trying to push local notification through my app by using flutter_local_notifications package and as on FlutterNotificationsPlugin the ".schedule" is deprecated I tried using ".zonedSchedule" but it requires TZDateTime value. var androidDetails = AndroidNotificationDetails(t.id, "Task Notifier", "Notifies if you have a task scheduled at a particular time"); var generalNotificationDetails = NotificationDetails(android: androidDetails); var now = DateTime.now(); var scheduledTime =

Flutter :- Align a icon to the right bottom of a container

旧时模样 提交于 2021-02-10 07:24:07
问题 I tried a column with an aligned icon but it didn't display correctly If anyone has any idea to help. It would be greatly appreciated. Thank you This is my code that i tried List<Widget> temp = []; listAirline.map((airline) { listAirlineName.map((item) { if (airline.name == item) { temp.add( Column( children: <Widget>[ Container( height: 20, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.elliptical(100.0, 60.0)), ), child: Image.asset( "images/Airlines/"

Flutter: Cloud_firestore will break your Android build if it or its dependencies aren't compatible with AndroidX

扶醉桌前 提交于 2021-02-10 07:04:46
问题 I can not use these both flutter plugins together: cloud_firestore: ^0.9.0+2 barcode_scan: ^0.0.8 When run, error occured: D8: Program type already present: android.arch.core.util.Function ********************************************************* WARNING: This version of cloud_firestore will break your Android build if it or its dependencies aren't compatible with AndroidX. See https: //goo.gl /CP92wY for more information on the problem and how to fix it. This warning prints for all Android

Flutter: local notifications custom sound doesn't work

允我心安 提交于 2021-02-10 06:57:31
问题 I'm trying to play my own custom sound for my notifications. But on my android emulator, it just plays the default sound and on my own device, it doesn't even make a sound. I tried this but it didn't help me. FlutterLocalNotificationsPlugin _notifications = FlutterLocalNotificationsPlugin(); var initializationSettingsAndroid = AndroidInitializationSettings('app_icon'); var initializationSettingsIOS = IOSInitializationSettings(); var initializationSettings = InitializationSettings