我正在制作容器,我给了它一个边框,但我会很高兴有圆形边框。
这就是我现在所拥有的
Container(
width: screenWidth / 7,
decoration: BoxDecoration(
border: Border.all(
color: Colors.red[500],
),
),
child: Padding(
padding: EdgeInsets.all(5.0),
child: Column(
children: <Widget>[
Text(
'6',
style: TextStyle(
color: Colors.red[500],
fontSize: 25),
),
Text(
'sep',
style: TextStyle(
color: Colors.red[500]),
)
],
),
),
);
Run Code Online (Sandbox Code Playgroud)
我试过在它上面放 cliprrect ,但它把边界剪掉了。有解决方案吗?提前致谢!!!
I'm trying to build my app on the ios simulator(ios 13), but the build fails and gives an error of pod files: Podfile is out of date
This is the error.
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Warning: Podfile is out of date
This can cause a mismatched version of Flutter to be embedded in your app, which may result in App Store submission rejection or crashes.
If you have local Podfile edits you would like …Run Code Online (Sandbox Code Playgroud) 我正在尝试为 IOS 提交我的 Flutter 应用程序。当我提交应用程序时,我收到一封邮件,其中包含我需要将其添加到我的 info.plist 的信息
NSCalendarsUsageDescription
NSAppleMusicUsageDescription
NSSpeechRecognitionUsageDescription
Run Code Online (Sandbox Code Playgroud)
我认为我需要添加这个真的很奇怪,因为我不需要任何这些(而且我没有在我的应用程序中使用它)......
这怎么可能?
这是我的 pubspec yaml
cupertino_icons: ^0.1.2
firebase_core: ^0.4.3+1
firebase_auth: ^0.15.3
cloud_firestore: ^0.12.11
firebase_database: ^3.1.1
cloud_functions: ^0.4.1+6
firebase_messaging: ^6.0.9
firebase_storage: ^3.1.0
google_sign_in: ^4.1.0
flutter_facebook_login: ^2.0.1
geolocator: ^5.1.5
shared_preferences: ^0.5.6
url_launcher: ^5.4.1
rflutter_alert: ^1.0.3
font_awesome_flutter: ^8.5.0
flutter_picker: ^1.1.0
uuid: ^2.0.4
image_picker: ^0.6.2+3
path_provider: ^1.5.1
image: ^2.1.4
flutter_datetime_picker: ^1.2.8
intl: ^0.16.0
native_contact_picker: ^0.0.6
flutter_spinkit: ^4.1.1+1
transparent_image: ^1.0.0
connectivity: ^0.4.6+1
flare_splash_screen: ^2.1.4
algolia: ^0.1.7
http: ^0.12.0+2
avatar_glow: ^1.1.0
rxdart: ^0.22.2
auto_size_text: ^2.1.0
camera: …Run Code Online (Sandbox Code Playgroud) 我有一个 Flutter 应用程序,您可以在其中使用 Facebook 登录。(https://pub.dev/packages/flutter_facebook_login)。
当用户登录时,我创建了一个新的 FireStore 文档(该文档以用户 ID 作为名称)。在其中,我存储其他信息,例如电子邮件等。
该应用程序允许结交“朋友”,我现在通过实现一个搜索栏来实现这一点,您可以在其中根据用户的姓名搜索用户。
但是是否有可能向用户显示“推荐朋友”列表,其中包含他所有也在使用该应用程序的 facebook 朋友。
我想到了他朋友的所有 fb ID 的列表,并将其与 Firestore 中的 ID 进行比较?(这可以用 fb 包吗?)
谢谢!
我用flutter web做了一个网页。我用命令测试过
webdev serve
Run Code Online (Sandbox Code Playgroud)
我可以看到整个网站,
但是当我想使用以下命令“导出/保存”网站时:
webdev build
Run Code Online (Sandbox Code Playgroud)
网页空白,(当我打开build文件夹中的html文件时)
[INFO] Reading cached asset graph completed, took 245ms
[INFO] Checking for updates since last build completed, took 806ms
[INFO] Running build completed, took 217ms
[INFO] Caching finalized dependency graph completed, took 148ms
[INFO] Reading manifest at build/.build.manifest completed, took 1ms
[INFO] Deleting previous outputs in `build` completed, took 45ms
[INFO] Creating merged output dir `build` completed, took 226ms
[INFO] Writing asset manifest completed, took 4ms
[INFO] Succeeded after 671ms with 0 …Run Code Online (Sandbox Code Playgroud) 我有一个具有 3 种登录方法的应用程序:Google、Facebook 和邮件。我想向使用邮件登录的用户显示不同的屏幕。是否可以从包 firebase 身份验证中获取登录方法?
我知道我可以通过使用 firestore 并检查语句是真是假来解决这个问题。但是每次用户打开应用程序时,我都会花费我一次阅读...
列表 1:我有一个包含用户 ID 的列表:(选定的用户)
['1234', '3455', '2330', '1111']
Run Code Online (Sandbox Code Playgroud)
列表 2:我有第二个列表,其中包含用户的完整个人资料(地图):(所有用户)
[{"id": '1234', "name": "username"}, {"id": '3455' .... ]
Run Code Online (Sandbox Code Playgroud)
列表 3:我想要包含所有选定用户的第三个列表:返回列表 2 中 ID 为列表 1 的所有用户。
我试过这个...
list1.forEach((element) =>
list3.add(list2.where((data) => data['id'] == element)));
Run Code Online (Sandbox Code Playgroud)
但这不起作用...
error: The argument type 'Iterable<Map<String, dynamic>>' can't be assigned to the parameter type 'Map<String, dynamic>'.
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
提前致谢!
我有一个连接到 firebase (firestore) 的 flutter 应用程序。
当用户打开应用程序时,我检查他是用户类型 1 还是用户类型 2。+ 从网络加载图像等。
但是做所有这些事情可能需要一秒钟。制作/实现加载屏幕/启动画面的最佳方法是什么,直到所有内容都加载完毕?
谢谢!
我正在尝试获取constrains.maxHeight。
这是我使用的代码:
LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
print(constraints.maxHeight);
return Column(
children: <Widget>[
LayoutBuilder(builder:
(BuildContext context, BoxConstraints constraints) {
print(constraints.maxHeight);
return Text(constraints.maxHeight.toString());
}),
],
);
}),
Run Code Online (Sandbox Code Playgroud)
第一个给出:812,但第二个 LayoutBuilder 给出无穷大。(我的Code简化了,列中其他东西我也用了,但是tot test,我只把LayoutBuilder放在里面了。)
我究竟做错了什么?
谢谢!
我正在尝试制作一个可滚动的屏幕(如整个屏幕可滚动)。
这是我了解到的:
Column(
children: <Widget>[
Expanded(
child: ListView(
scrollDirection: Axis.horizontal, children: posts2b)),
Expanded(child: ListView(children: posts2a)),
],
);
Run Code Online (Sandbox Code Playgroud)
一切正常,但我希望这些列表视图可以作为一个滚动。因此,如果向下滚动,水平列表视图将“消失”。
那可能吗?
谢谢!