草庐IT

flutter-pub

全部标签

flutter - 如何检查 Dart 中 switch case 的异常子类型?

这个问题在这里已经有了答案:SwitchingonclasstypeinDart(1个回答)关闭3年前。我是dart编程的新手,所以我尝试检查嵌套在FutureBuilder中的switchcase中的异常子类型,但我没有满意的解决方案...我尝试检查switch-case,但它不工作,但是当我尝试使用isif-else时,它​​正在工作...我的自定义异常子类型:classHttpExceptionimplementsException{HttpStatusErrorstatus;Stringmessage;HttpException(intstatusCode){switch(st

android - 使用 flutter wifi 包获取类型错误

我正在尝试运行这个使用flutterWifi包的示例代码。该示例基于n个旧版本的软件包,但我使用的是最新版本。以下是我的代码:import'dart:async';import'package:flutter/material.dart';import'package:flutter/services.dart';import'package:wifi/wifi.dart';voidmain()=>runApp(newMyApp());classMyAppextendsStatelessWidget{@overrideWidgetbuild(BuildContextcontext){r

android - 使用 flutter wifi 包获取类型错误

我正在尝试运行这个使用flutterWifi包的示例代码。该示例基于n个旧版本的软件包,但我使用的是最新版本。以下是我的代码:import'dart:async';import'package:flutter/material.dart';import'package:flutter/services.dart';import'package:wifi/wifi.dart';voidmain()=>runApp(newMyApp());classMyAppextendsStatelessWidget{@overrideWidgetbuild(BuildContextcontext){r

sqlite - 在 SQLite FLutter 数据库中创建 DATETIME 列?

我创建了一个包含一些列的TABLE,一切正常,直到我尝试插入一个新的DATETIME列:_onCreate(Databasedb,intversion)async{awaitdb.execute("CREATETABLE$TABLE($IDINTEGERPRIMARYKEY,$NAMETEXT,$COLOURTEXT,$BREEDTEXT,$BIRTHDATETIME)");}我要存储的模型类是:classPet{intid;Stringname;DateTimebirth;Stringbreed;Stringcolour;Pet({this.id,this.name,this.bir

sqlite - 在 SQLite FLutter 数据库中创建 DATETIME 列?

我创建了一个包含一些列的TABLE,一切正常,直到我尝试插入一个新的DATETIME列:_onCreate(Databasedb,intversion)async{awaitdb.execute("CREATETABLE$TABLE($IDINTEGERPRIMARYKEY,$NAMETEXT,$COLOURTEXT,$BREEDTEXT,$BIRTHDATETIME)");}我要存储的模型类是:classPet{intid;Stringname;DateTimebirth;Stringbreed;Stringcolour;Pet({this.id,this.name,this.bir

flutter - 对齐底部导航中的小部件覆盖正文

我有一个具有以下架构的脚手架,主体被底部导航覆盖。如果我评论导航,一切正常。Scaffold(backgroundColor:Theme.of(context).backgroundColor,appBar:AppAppBar(title:this.title),body:Row(children:[Expanded(child:Container(child:Padding(padding:EdgeInsets.symmetric(horizontal:this.pageProvider.horizontalPadding,vertical:25),child:this.body,)

flutter - 对齐底部导航中的小部件覆盖正文

我有一个具有以下架构的脚手架,主体被底部导航覆盖。如果我评论导航,一切正常。Scaffold(backgroundColor:Theme.of(context).backgroundColor,appBar:AppAppBar(title:this.title),body:Row(children:[Expanded(child:Container(child:Padding(padding:EdgeInsets.symmetric(horizontal:this.pageProvider.horizontalPadding,vertical:25),child:this.body,)

flutter - 云 Firestore : Best way to get collection with nested element references

假设我有一个名为shoppingLists的集合,该集合包含一个ingredients列表,其中每个成分都是对ingredients集合。在检索shoppinglist时,我还需要从每个ingredients中获取一些数据。完成这样的事情的最好方法是什么?目前,我正在做类似的事情:DocumentSnapshotuserSnapshot=awaitFirestore.instance.collection('users').document(userId).collection('shoppingLists').document(listName).get();然后我遍历集合中的所有成

flutter - 云 Firestore : Best way to get collection with nested element references

假设我有一个名为shoppingLists的集合,该集合包含一个ingredients列表,其中每个成分都是对ingredients集合。在检索shoppinglist时,我还需要从每个ingredients中获取一些数据。完成这样的事情的最好方法是什么?目前,我正在做类似的事情:DocumentSnapshotuserSnapshot=awaitFirestore.instance.collection('users').document(userId).collection('shoppingLists').document(listName).get();然后我遍历集合中的所有成

flutter - Flutter desktop/go-flutter-desktop使用插件url_launcher在Windows上打开文件或Lotus Notes文档等

我是GoFlutter桌面插件的贡献者之一希望共享刚刚发布的url启动插件这个项目“去颤振桌面”与“官方”颤振桌面相比如何?请参阅https://github.com/go-flutter-desktop/go-flutter/issues/191#issuecomment-511384007您可以使用url_启动程序插件打开Web、文件、LotusNotes文档等。 最佳答案 对于Windows10,可以使用以下代码段打开Excel或LotusNotes文档...RaisedButton(onPressed:()=>setStat