我正在尝试将状态栏颜色更改为白色...我发现这个酒吧在flutter https://pub.dartlang.org/packages/flutter_statusbarcolor ...我试图在我的dart文件(主要和其他)上使用示例代码...但是它不起作用......任何想法的家伙?
flutter_local_notifications:^11.0.0
我使用了这个库,但我可以找到 IOSInitializationSettings 请帮助我。我正在尝试将推送通知集成到我的 flutter 应用程序中。
我为管理员登录编写的代码:
\nimport \'package:cloud_firestore/cloud_firestore.dart\';\nimport \'package:flutter/material.dart\';\n\nclass FirebaseServices {\n static Future<DocumentSnapshot> adminSignIn(id) async {\n var res =\n await FirebaseFirestore.instance.collection("admin").doc(id).get();\n return res;\n }\n}\nRun Code Online (Sandbox Code Playgroud)\n我收到的错误如下:
\nimport \'package:cloud_firestore/cloud_firestore.dart\';\nimport \'package:flutter/material.dart\';\n\nclass FirebaseServices {\n static Future<DocumentSnapshot> adminSignIn(id) async {\n var res =\n await FirebaseFirestore.instance.collection("admin").doc(id).get();\n return res;\n }\n}\nRun Code Online (Sandbox Code Playgroud)\n您还可以访问该项目的存储库。
\n我试着跑flutter doctor -v。进而:
+ ChromeProxyService: Failed to evaluate expression \n \'handlePrimaryPointer\':InternalError: No frame with index 45.\n+ ChromeProxyService: Failed to evaluate expression\n \'postAcceptSlopTolerance\': InternalError: No frame with index 45.\n+ ChromeProxyService: Failed to …Run Code Online (Sandbox Code Playgroud) 当我在我的手机号码错误时单击“登录”按钮时,然后打开一个错误对话框,然后当我在对话框上单击“确定”时,我收到此错误。
我收到这条消息
该小部件已被卸载,因此状态不再具有上下文(并且应被视为已失效)
考虑在“dispose”期间取消任何活动的工作,或使用“mounted” getter 来确定状态是否仍处于活动状态。
class _LoginPageState extends State<LoginPage> {
final GlobalKey<FormState> _formKey = GlobalKey();
TextEditingController _mobileController = new TextEditingController();
// TextEditingController _nameController = new TextEditingController();
// TextEditingController _emailController = new TextEditingController();
TextEditingController _passwordController = new TextEditingController();
Map<String, String> _authData = {
'user_name': '',
'user_email': '',
'username': '',
'password': ''
};
Future _submit() async {
print('aa' + _authData['username']);
if (!_formKey.currentState.validate()) {
return;
}
_formKey.currentState.save();
try {
await Provider.of<Auth>(context, listen: false).login(
_authData['user_name'],
_authData['user_email'],
_authData['username'],
_authData['password']);
print('authData_username' + _authData['username']);
print('authData_password' + …Run Code Online (Sandbox Code Playgroud) dart flutter flutter-test flutter-dependencies flutter-layout
我在我的 flutter 项目中使用了一些不再需要的包,即wilddog_authand wilddog_sync,我可以从pubspec.yaml文件和我的 dart 文件中import 'package:wilddog_sync/wilddog_sync.dart'删除导入(也称为删除等)并删除 MainActivity.java 和 Xcode 项目中的导入,但是我无法清除 flutter、cocoapod 和 gradle 安装的未使用文件。现在flutter中有一个统一的命令可以一次删除所有未使用的包吗?
我敢肯定,使用flutter clean只删除build文件夹,并使用flutter packages get从删除软件包后pubspec.yaml不会删除软件包cocoapod或gradle两种。
例如,在flutter clean和flutter packages get我重建项目:
Launching lib/main.dart on Android SDK built for x86 64 in debug mode...
Initializing gradle...
Resolving dependencies...
Running 'gradlew assembleDebug'...
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...
I/FlutterActivityDelegate(11331): onResume setting current activity to this
I/Choreographer(11331): Skipped 107 frames! The application …Run Code Online (Sandbox Code Playgroud) bundling-and-minification flutter flutter-dependencies flutter-packages
在 flutter 1.22 更新后,我在 Lineargradient 颜色属性中收到一个错误,它给我一个错误,即名称颜色参数未定义..在 android 中的 flutter 和 flutter 插件更新后,我在项目中的任何地方都收到此错误工作室。
dart flutter flutter-dependencies flutter-layout flutter-animation
下面是flutter doctor结果:
[?] Flutter (Channel stable, 1.22.1, on Microsoft Windows [Version 10.0.18362.30], locale en-US)
[?] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[!] Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
Run Code Online (Sandbox Code Playgroud)
我已经安装了flutter插件。但问题仍然存在。我怎样才能解决这个问题?
我有 flutter 应用程序,运行命令时出现以下错误:\npod install --repo-update
\n这是我收到的错误:
\n[!] CocoaPods could not find compatible versions for pod "FBSDKLoginKit":\n In Podfile:\n flutter_facebook_auth (from `.symlinks/plugins/flutter_facebook_auth/ios`) was resolved to 4.3.0, which depends on\n FBSDKLoginKit (~> 13)\n\n flutter_login_facebook (from `.symlinks/plugins/flutter_login_facebook/ios`) was resolved to 1.4.0, which depends on\n FBSDKLoginKit (~> 12.3)\nRun Code Online (Sandbox Code Playgroud)\n在我升级到最新的 flutter 软件包后,开始出现错误。\n这是我在 pubspeck.yaml 中使用的软件包:
\ndependencies:\n badges: ^2.0.1\n cached_network_image: ^3.2.0\n carousel_slider: ^4.0.0\n cloud_firestore: ^3.1.0\n cloud_functions: ^3.1.0\n connectivity_plus: ^2.0.2\n cupertino_icons: ^1.0.3\n device_info_plus: ^3.2.2\n dotted_border: ^2.0.0+2\n firebase_analytics: ^8.3.4\n firebase_auth: ^3.2.0\n firebase_core: ^1.10.0\n firebase_crashlytics: ^2.3.0\n …Run Code Online (Sandbox Code Playgroud) 刚刚创建了一个新的 flutter 项目,将 google-services-info.plist 文件添加到 iOS,并将 firebase_core 添加到 pubspec.yaml。运行项目并得到此错误。
Error: fatal error: module 'firebase_core' not found @import firebase_core;
我在 stack Overflow 和 gitlab 上搜索了很多。尝试了所有解决方法,例如 flutter clean、更新 repo、删除 pod 和重新安装 pod,但仍然没有成功解决此错误。
这已经把我屏蔽了5天了。无法找到任何关于此的信息。请帮忙。
链接到我在 GitHub 上的项目。: https: //github.com/infonotics/stocklyticsSO 请将您自己的 googleService-Info.plist 文件添加到 Runner 文件夹中。出于安全原因,我已删除我的文件。
提前致谢。