草庐IT

flutter-container

全部标签

Flutter - 应用程序范围的通知

是否有正确的方法从Flutter应用程序中的“根”页面或位置收听流/作用域模型,并在收到一些数据后在任何当前打开的页面(可能不是主页)?我希望能够在整个应用程序中显示某些通知,而不仅仅是逐页显示。这里我有一个主页,它是我的应用程序的初始页面,它开始监听来自从上下文检索到的scoped_model的流,无论用户访问的是哪个页面,只要收到数据就会显示一个对话框。classHomeextendsStatelessWidget{@overrideWidgetbuild(BuildContextcontext){MyServiceservice=ScopedModel.of(context);s

flutter - 将 TabBarView 中的其他选项卡更改为其他选项卡时,键盘仍然显示

在一个选项卡中我有一个TextFormField,而在另一个选项卡中只有一个文本列表。当我选择文本字段时,键盘打开,然后我跳转到第二个选项卡,键盘仍然显示。我什至可以写字,当我回到Tab1时,我明白了我为什么要打字。你知道我怎样才能对第二个选项卡进行操作,以便将焦点从文本字段中移开吗?DefaultTabController(length:2,child:Scaffold(appBar:AppBar(title:Text('ManageProducts'),bottom:TabBar(tabs:[Tab(icon:Icon(Icons.create),text:'CreateProdu

flutter - 将 TabBarView 中的其他选项卡更改为其他选项卡时,键盘仍然显示

在一个选项卡中我有一个TextFormField,而在另一个选项卡中只有一个文本列表。当我选择文本字段时,键盘打开,然后我跳转到第二个选项卡,键盘仍然显示。我什至可以写字,当我回到Tab1时,我明白了我为什么要打字。你知道我怎样才能对第二个选项卡进行操作,以便将焦点从文本字段中移开吗?DefaultTabController(length:2,child:Scaffold(appBar:AppBar(title:Text('ManageProducts'),bottom:TabBar(tabs:[Tab(icon:Icon(Icons.create),text:'CreateProdu

web - 我在将图像添加到 flutter 项目时遇到问题

我正在试验一个flutterweb项目(可能没有什么不同,但值得一提),我想添加一张图片,但每次尝试都会出错,我已将正确的Assets添加到pubspec.yaml文件中,文件位于文件夹中。我已经尝试重新启动我的ide,并且flutterclean。完全没有变化。class_homePageStateextendsState{@overrideWidgetbuild(BuildContextcontext){vartextStyle=TextStyle(color:Colors.black,fontSize:30,fontWeight:FontWeight.w100,);returnM

web - 我在将图像添加到 flutter 项目时遇到问题

我正在试验一个flutterweb项目(可能没有什么不同,但值得一提),我想添加一张图片,但每次尝试都会出错,我已将正确的Assets添加到pubspec.yaml文件中,文件位于文件夹中。我已经尝试重新启动我的ide,并且flutterclean。完全没有变化。class_homePageStateextendsState{@overrideWidgetbuild(BuildContextcontext){vartextStyle=TextStyle(color:Colors.black,fontSize:30,fontWeight:FontWeight.w100,);returnM

flutter - 在 showDialog 上打开键盘时重新创建页面

我的flutter项目有问题,我创建按钮来显示带有表单和文本字段的对话框,当对话框打开时,我点击texfield,重新创建页面,这是我的代码void_showDialog(){showDialog(context:context,builder:(BuildContextcontext){returnCupertinoAlertDialog(title:Text('AddNew'),content:Card(color:Colors.transparent,elevation:0.0,child:Column(children:[TextField(decoration:InputDe

flutter - 在 showDialog 上打开键盘时重新创建页面

我的flutter项目有问题,我创建按钮来显示带有表单和文本字段的对话框,当对话框打开时,我点击texfield,重新创建页面,这是我的代码void_showDialog(){showDialog(context:context,builder:(BuildContextcontext){returnCupertinoAlertDialog(title:Text('AddNew'),content:Card(color:Colors.transparent,elevation:0.0,child:Column(children:[TextField(decoration:InputDe

asynchronous - Flutter 提取异步到分隔符类和方法

Myimplementationrepository在main方法中,我有这行代码可以连接到数据库并正常工作Futuremain()async{finaldatabase=await$FloorAppDatabase.databaseBuilder('flutter_database.db').build();finaluserDao=database.userDao;runApp(MaterialApp(...);}现在我正在尝试使用这些代码finaldatabase=await$FloorAppDatabase.databaseBuilder('flutter_database.d

asynchronous - Flutter 提取异步到分隔符类和方法

Myimplementationrepository在main方法中,我有这行代码可以连接到数据库并正常工作Futuremain()async{finaldatabase=await$FloorAppDatabase.databaseBuilder('flutter_database.db').build();finaluserDao=database.userDao;runApp(MaterialApp(...);}现在我正在尝试使用这些代码finaldatabase=await$FloorAppDatabase.databaseBuilder('flutter_database.d

docker进入容器时报错 Error response from daemon: Container xxx is restarting, wait until the container is

使用dockerrun命令运行容器,再进入容器时报错运行容器命令dockerrun--restart=always--namemongo-v/data/mongo:/data/db-p27017:27017-dmongo--auth进入容器命令dockerexec-itmongobash错误信息Errorresponsefromdaemon:Container90831dd80b32a1502d9535c874ceec899b5fd70c883481195b4f36cd29be47b0isrestarting,waituntilthecontainerisrunning[root@Tracy~