dart

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:

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

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