我有一个连续的图像和该图像旁边的文本。我希望该行完全展开,图像作为其大小,然后保持完整区域应由 Container 使用。
这是我的代码片段:
Row(
children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(10, 50, 10, 8),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color.fromARGB(100, 0, 0, 0),
blurRadius: 5,
),
],
),
child: Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Column(children: <Widget>[
Image.asset(
'assets/card.png',
height: 62,
width: 62,
fit: BoxFit.cover,
)
]),
Container(
child: Text("Hello world"),
)
],
),
),
],
),
Run Code Online (Sandbox Code Playgroud)
我想要这样: Flutter UI
我的计算机上的云功能可以使用 Javascript,但是当我使用 TypeScript 尝试它时,它不会编译为 Javascript。它不会创建 lib/index.js 事件
\n\n当我运行 firebase 部署时,它显示以下错误
\n\nError: There was an error reading functions/package.json:\n
Run Code Online (Sandbox Code Playgroud)\n\nfirebase deploy --debug 显示以下日志:
\n\nAPPLEs-MacBook-Air:functions abbasi$ firebase deploy --debug\n[2020-01-08T08:39:06.383Z] ----------------------------------------------------------------------\n[2020-01-08T08:39:06.390Z] Command: /usr/local/bin/node /usr/local/bin/firebase deploy --debug\n[2020-01-08T08:39:06.390Z] CLI Version: 7.11.0\n[2020-01-08T08:39:06.390Z] Platform: darwin\n[2020-01-08T08:39:06.391Z] Node Version: v12.14.1\n[2020-01-08T08:39:06.392Z] Time: Wed Jan 08 2020 13:39:06 GMT+0500 (Pakistan Standard Time)\n[2020-01-08T08:39:06.393Z] ----------------------------------------------------------------------\n[2020-01-08T08:39:06.393Z] \n[2020-01-08T08:39:06.422Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]\n[2020-01-08T08:39:06.423Z] > authorizing via signed-in user\n[2020-01-08T08:39:06.426Z] [iam] checking project safepay-test for permissions ["cloudfunctions.functions.create","cloudfunctions.functions.delete","cloudfunctions.functions.get","cloudfunctions.functions.list","cloudfunctions.functions.update","cloudfunctions.operations.get","firebase.projects.get"]\n[2020-01-08T08:39:06.429Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/safepay-test:testIamPermissions \n permissions=[cloudfunctions.functions.create, …
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 facebook 登录 Firebase。
我正在使用 firebaseauth:0.7.0 和 flutter_facebook_login:
这是我的 facebook 登录功能:
startFacebookLogin() async {
var facebookLogin = FacebookLogin();
var result = await facebookLogin
.logInWithReadPermissions(['email', 'public_profile']);
FacebookAccessToken myToken = result.accessToken;
AuthCredential credential =
FacebookAuthProvider.getCredential(accessToken: myToken.token);
FirebaseUser firebaseUser =
await FirebaseAuth.instance.signInWithCredential(credential);
createProfile(user);
}
Run Code Online (Sandbox Code Playgroud)
在这里我得到了这个错误:
E/flutter (19097): [ERROR:flutter/shell/common/shell.cc(186)] Dart Error: Unhandled exception:
E/flutter (19097): NoSuchMethodError: The getter 'token' was called on null.
E/flutter (19097): Receiver: null
E/flutter (19097): Tried calling: token
E/flutter (19097): #0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
E/flutter (19097): #1 _SignUpFirst.startFacebookLogin (package:tripmate/pages/signup_first.dart:40:65)
E/flutter (19097): …
Run Code Online (Sandbox Code Playgroud)