我有以下基于 Firebase 后端的移动应用场景:
Firebase 匿名身份验证似乎非常适合这种情况 - 但文档暗示它只能用作临时解决方案,直到用户创建实际帐户。使用匿名身份验证作为解决方案的唯一身份验证方法有什么缺点吗?我看到的替代方案是使用基于自定义令牌的登录或电子邮件/密码身份验证的某种黑客攻击。
anonymous-users firebase google-cloud-platform firebase-authentication
我正在尝试创建一个Flutter应用程序,该应用程序具有一个带有文本和图标作为标签的按钮,该图标位于文本的右侧。这篇文章中描述的方法会产生一个看起来很奇怪的按钮,该按钮似乎扩展到了应用程序的宽度,请参见此图像(链接,因为我不允许附加图像):
我不清楚要使用哪些布局小部件来调整text + image按钮以将其格式化为纯文本按钮。
产生以上示例的代码:
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text(widget.title),
),
body: new Center(
child: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Text(
'You have pushed the button this many times:',
),
new Text(
'$_counter',
style: Theme.of(context).textTheme.display1,
),
new RaisedButton(
onPressed: _incrementCounter,
child: new Row(
children: <Widget>[
new Text("Button with text and icon!"),
new Icon(Icons.lightbulb_outline)
],
),
),
new RaisedButton(
onPressed: _incrementCounter,
child: new Text("Button with only text")
), …Run Code Online (Sandbox Code Playgroud)