小编Nor*_*ert的帖子

keytool :术语“keytool”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称

试图为 android 构建版本。我keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key在 vscode 终端中运行,但出现此错误

keytool : The term 'keytool' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -val ...
+ ~~~~~~~
    + CategoryInfo          : …
Run Code Online (Sandbox Code Playgroud)

dart flutter

5
推荐指数
2
解决办法
1万
查看次数

Visual Studio 代码无法检测到模拟器设备或连接的手机

我正在使用 Android 模拟器或我的手机使用 vscode 运行我的应用程序,但是突然 vscode 无法识别我连接的任何设备或模拟器(没有设备)。手机处于调试模式,甚至是 android 模拟器。此外,当我尝试启动模拟器时,我收到此警告 在此处输入图片说明

android dart visual-studio-code flutter

5
推荐指数
2
解决办法
1万
查看次数

发生异常。状态不佳:Flutter 列表视图和视频播放器中的未来已经完成

我从我的 CloudFirestore 数据库中获取了一个视频 URL,并在 listView.buiilder() 中显示了网络视频。 在此处输入图片说明 当我设置

autiInitialize = true
Run Code Online (Sandbox Code Playgroud)

或尝试以任何其他方式初始化视频我收到错误

Exception has occurred.
Bad state: Future already completed
Run Code Online (Sandbox Code Playgroud)

I/flutter ( 6187): ??? EXCEPTION CAUGHT BY FOUNDATION LIBRARY ?????????????????????????????????????????????????????????
I/flutter ( 6187): The following assertion was thrown while dispatching notifications for VideoPlayerController: 
I/flutter ( 6187): setState() or markNeedsBuild() called during build.
I/flutter ( 6187): This MaterialControls widget cannot be marked as needing to build because the framework is already
I/flutter ( 6187): in the process of building widgets. A …
Run Code Online (Sandbox Code Playgroud)

dart flutter

3
推荐指数
1
解决办法
1万
查看次数

上传前如何检查视频文件的大小

我想将视频文件上传到云存储中,但是我想在上传之前检查视频文件的大小。如何做到这一点

dart flutter firebase-storage

3
推荐指数
4
解决办法
2917
查看次数

关闭并重新打开选项卡时 Flutter web shared_preferences 不可用

Flutter web 现在支持 shared_preferences。我已经添加shared_preferences到我的颤振网络应用程序中。我的问题是当我设置首选项时,比如当我启动应用程序时,它在应用程序的任何地方都可以正常工作,但是当我关闭浏览器并再次启动应用程序并尝试检索它时,它什么都不返回。如何在关闭并启动应用程序后使其工作。

_showPref()async{
SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.setInt("myKey", 98);
}

@override
  void initState() {
    // TODO: implement initState
    super.initState();
    _showPref();
  }    

// then retrieve with the code
getPrefs(){
   SharedPreferences prefs = await SharedPreferences.getInstance();   
   int count = (prefs.getInt("myKey")??0);
   print(" 2. new prefs: $count");
}
Run Code Online (Sandbox Code Playgroud)

dart flutter flutter-web

3
推荐指数
1
解决办法
635
查看次数

如何在Flutter网站的新标签页或同一标签页中打开外部网址

我有一个使用Flutter Web创建的简单Web应用程序。我想知道如何external url在a new tab或在the same tabFlutter Web应用程序中打开新的a 。说我想打开网址/sf/

dart flutter flutter-web

2
推荐指数
7
解决办法
1033
查看次数

使用多个屏幕通过 Provider 进行 Flutter 状态管理

我有两个页面,Page_APage_B我的应用程序中。我还有另外两个类,它们更新_votes变量(默认= 0),Privider Class然后显示该变量Page_A,并且按预期工作正常。

我正在尝试访问此变量 ( _votes),该变量现在已更新为23在新页面中显示Page_B。但是,当新页面被推送到屏幕时,变量似乎被重置为0而不是23。我怎样才能实现我想要做的事情。

provider dart flutter

2
推荐指数
1
解决办法
2196
查看次数