草庐IT

aster_users

全部标签

firebase - Flutter Firebase 身份验证 : How to display the user email and name in the Flutter Drawer

我已成功从FirebaseAuth检索到用户电子邮件和名称。但是我想在FlutterDrawer中显示这个姓名和电子邮件检索:Future_handleSignIn()async{finalGoogleSignInAccountgoogleUser=await_googleSignIn.signIn();finalGoogleSignInAuthenticationgoogleAuth=awaitgoogleUser.authentication;finalAuthCredentialcredential=GoogleAuthProvider.getCredential(accessT

user-interface - 如何创建自定义卡片(flutter widget)?

我正在尝试在flutter中创建一个如下所示的自定义卡片:任何建议或指导将不胜感激。 最佳答案 你应该试试这个https://flutter.dev/docs/development/ui/layout,它会对你有很大帮助,另一方面,对于右上角的图标,你可以尝试Stack小部件,其他组件可以放在一列中,比如:Card(child:Stack(children:[Positioned(top:0,right:0,child:Container(decoration:BoxDecoration(gradient:RadialGradie

user-interface - Flutter - 如何在 SimpleDialog 框中显示 GridView?

昨天问了一个关于在AlertDialog中显示GridView的非常相似的问题,并得到了将Widget包装在容器中并增加宽度的完美答案。现在我决定SimpleDialog会更好,以提供更多功能/自定义,即搜索文本字段和多个操作按钮。我在显示文本字段和IconButton时得到了想要的结果,但是当我尝试添加GridView时却出错了。我应用了以前的规则,但我遇到了类似的错误,其中UI消失但没有显示小部件。我试过为不同的小部件添加宽度,但没有成功。这是我的代码...Future_neverSatisfied()async{returnshowDialog(context:context,b

firebase - flutter/FirebaseAuth : How can I autologin a user at app launch?

我有以下方法来查看用户是否已经登录,在这种情况下我确实登录了并且getCurrentUser()函数起作用,因为在控制台中它确实返回“USERISNOTNULL”,但home小部件仍然为null,给我“WIDGETSLIBRARY捕获的异常”,表示home不能为null之类的东西。用户API.dartFuturegetCurrentUser()async{FirebaseUseruser=awaitFirebaseAuth.instance.currentUser();if(user!=null){returnuser;}else{returnnull;}}主.dartclassApp

Docker 工具箱 : Is there a way to mount other folders than from "C:\Users" Windows?

我在Windows7上使用VirtualBox5.0.6安装了Docker工具箱1.8.3。在DockerQuickstartTerminal启动过程中创建的默认虚拟机有一个为c:\Users定义的共享文件夹。是否可以将其他共享文件夹永久添加到此虚拟机,例如在主机上安装d:\驱动器? 最佳答案 boot2dockerREADMEmentionsAlternatively,Boot2DockerincludestheVirtualBoxGuestAdditionsbuiltinfortheexpresspurposeofusingVi

Docker 工具箱 : Is there a way to mount other folders than from "C:\Users" Windows?

我在Windows7上使用VirtualBox5.0.6安装了Docker工具箱1.8.3。在DockerQuickstartTerminal启动过程中创建的默认虚拟机有一个为c:\Users定义的共享文件夹。是否可以将其他共享文件夹永久添加到此虚拟机,例如在主机上安装d:\驱动器? 最佳答案 boot2dockerREADMEmentionsAlternatively,Boot2DockerincludestheVirtualBoxGuestAdditionsbuiltinfortheexpresspurposeofusingVi

visual-studio-code - 在 "pubspec.yaml"中找不到名为 "/Users/userName"的文件

我在使用VSCode工具时遇到一些问题。我无法更新软件包。$flutterpackagesgetRunning"flutterpackagesget"inmy_flutter_app...Couldnotfindafilenamed"pubspec.yaml"in"/Users/userName".pubgetfailed(66)我在my_flutter_app目录中,并且在那个目录根目录中很清楚有一个名为“pubspec.yaml”的文件。为什么系统在其他地方寻找pubspec.yaml,完全忽略那里的pubspec.yaml?这对我来说没有意义。当我尝试调试/运行程序时,我在调试控

user-interface - 没有互联网连接时如何显示 snackbar ?

我第一次尝试构建我的移动应用程序。如果没有互联网连接,如何显示Snackbar?这是一个flutterapss,具有连接性:^0.4.3+1包这是我的连接状态classNetworkSensitiveextendsStatelessWidget{finalWidgetchild;NetworkSensitive({this.child,});@overrideWidgetbuild(BuildContextcontext){varconnectionStatus=Provider.of(context);if(connectionStatus==ConnectivityStatus.W

user-interface - flutter :快速 Action

我想实现我在以下位置找到的快速入门模型:Materialdesign.Flutter中有这样的东西吗? 最佳答案 您可以创建一个ListView()与scrollDirection:Axis.horizontal实现水平滚动并作为children:[...]你想要的小部件和你想要的Action,就像你的例子一样,选择一些东西。请参阅此处的水平ListView示例:https://flutter.dev/docs/cookbook/lists/horizontal-list如果您只想在第一次启动应用程序时显示此屏幕,您可以简单地在本地

user-interface - 可以在 Flutter 中将文本写入按钮

我正在尝试制作这样的键盘但是我得到了这个我的每一个按钮都是classPinyinButtonextendsStatelessWidget{finalVoidCallbackonPressed;finalListtitles;PinyinButton({this.onPressed,this.titles});@overrideWidgetbuild(BuildContextcontext){returnnewSizedBox(width:30.0,height:60.0,child:newRaisedButton(onPressed:this.onPressed,child:newCo