天道酬勤,学无止境

flutter-packages

iOS flutter app don't ask for permissions and returns permission status unknown

I am using a permission_handler 4.4.0(latest update) plugin to handle permissions on mobile devices which works perfectly on android devices but when i am trying to ask for permissions on iOS it doesn't show permission pop on device and returns the permission status unknown. I think so it might be missing into the info.plist or pod file but I followed and double checked the both files but I didn;t find anything wrong but i uploaded code for that files if someone finds anything missing or wrong into files. please look into the code and let me know your suggestions. Thanks in advance guys. info

2022-05-01 05:55:12    分类:问答    flutter   flutter-plugin   ios-permissions   flutter-packages   flutter-ios

flutter pub get 卡住了(flutter pub get is stucking)

问题 当我在终端flutter pub get中运行时,它被卡住了 操作系统 Catalina 10.15.3 Got TLS error trying to find package launch_review at https://pub.dartlang.org. pub get failed (server unavailable) -- attempting retry 1 in 1 second... Got socket error trying to find package launch_review at https://pub.dartlang.org. pub get failed (server unavailable) -- attempting retry 2 in 2 seconds... Got TLS error trying to find package launch_review at https://pub.dartlang.org. pub get failed (server unavailable) -- attempting retry 3 in 4 seconds... Got socket error trying to find package launch_review at https://pub.dartlang

2022-01-16 16:34:11    分类:技术分享    android   flutter   flutter-dependencies   flutter-packages

flutter pub get is stucking

When I run in terminal flutter pub get is stuck it's showing OS MacOS Catalina 10.15.3 Got TLS error trying to find package launch_review at https://pub.dartlang.org. pub get failed (server unavailable) -- attempting retry 1 in 1 second... Got socket error trying to find package launch_review at https://pub.dartlang.org. pub get failed (server unavailable) -- attempting retry 2 in 2 seconds... Got TLS error trying to find package launch_review at https://pub.dartlang.org. pub get failed (server unavailable) -- attempting retry 3 in 4 seconds... Got socket error trying to find package launch

2022-01-16 06:59:53    分类:问答    android   flutter   flutter-dependencies   flutter-packages

如何将数据从一个提供者模型传递到另一个提供者模型?(How to pass data from one provider model to another?)

问题 我想使用provider ( ChangeNotifierProvider )和ChangeNotifier来管理应用程序状态。 但是我如何才能从另一个模型中的一个模型访问状态呢? 用例:在聊天应用程序中,一种用于存储用户信息的模型。 其他模型使用用户信息(例如用户 ID)来调用数据库(Firestore)并获取聊天数据流。 例如: class Model1 extends ChangeNotifier { final List<Item> items = []; class Model2 extends ChangeNotifier { //Access items from Model1 here items; 这可能吗? 我不喜欢有很大的模型,因为很难维护。 谢谢! 回答1 使用provider ,一个模型不会访问另一个模型。 相反,您应该使用ProxyProvider来组合其他模型。 你的模型看起来像: class Foo with ChangeNotifier { int count = 0; void increment() { count++; notifyListeners(); } } class Bar with ChangeNotifier { int _count; int get count => _count; set count(int

2022-01-16 04:22:52    分类:技术分享    firebase   flutter   dart   google-cloud-firestore   flutter-packages

How to pass data from one provider model to another?

I want use provider (ChangeNotifierProvider) and ChangeNotifier for manage app state. But how I can access state from one model in another model? Use case: In chat app, one model for store user information. Other model use user information (for example user id) to make call to database (Firestore) and get stream of chat data. For example: class Model1 extends ChangeNotifier { final List<Item> items = []; class Model2 extends ChangeNotifier { //Access items from Model1 here items; Is this possible? I not like have very big Model because is hard to maintain. 

Thanks!

2022-01-08 06:09:57    分类:问答    firebase   flutter   dart   google-cloud-firestore   flutter-packages

颤振:酒吧失败(Flutter: pub get failed)

问题 Flutter 项目向我显示警告'Packages get' has not been run使用建议的解决方案'Packages get' has not been run , 获取依赖升级依赖忽略 正如 Darky 所建议的,在这个答案中继续“获取依赖项” 我试过了,但它显示了一个错误: 酒吧失败 /SoftSources/Flutter/flutter/bin/flutter --no-color packages get Running "flutter packages get" in catalog... Incompatible version constraints on test: - flutter_test 0.0.0 depends on version 0.12.30+3 - sample_catalog depends on version 0.12.30+4 pub get failed (1) Process finished with exit code 1 错误表示项目版本(或其他)有问题,应该在我的 flutter 项目中在哪里更改它? 编辑: pubspec.yaml name: sample_catalog description: A collection of Flutter sample apps dependencies

2021-10-21 20:06:14    分类:技术分享    android-studio   flutter   flutter-packages   flutter-pub

Visual Studio Code - URI 目标不存在“package:flutter/material.dart”(Visual Studio Code - Target of URI doesn't exist 'package:flutter/material.dart')

问题 我刚刚为 Flutter 开发设置了我的 Macbook, 所以我下载了 flutter SDK,并将其放在我的Documents 中。 之后,我设置了路径变量以在命令行中使用flutter 。 我执行命令flutter create todolist所以我实现了一个空白项目。 我还使用Dart-Code设置了我的 Visual Studio 代码,这样我就有了正确的语法高亮、IntelliSense 等。 所以当我打开visual studio代码时,它突出显示了import方法,如下图: 这意味着它还突出显示了正确的类,从而完全难以理解它是否是真正的错误。 我已经执行了pub get和flutter packages get并正确地flutter packages get了一切。 我的路径变量都正确。 为什么突出显示它找不到“导入”包? 回答1 之后重新启动 Visual Studio Code flutter pub get 为我解决了错误消息。 来源:https://flutter.dev/docs/development/packages-and-plugins/using-packages 回答2 Dart Code 插件的作者在这里! 从屏幕截图中,我会说这是因为您的 flutter 项目位于在 Code 中打开的文件夹的子文件夹中。

2021-10-16 01:01:07    分类:技术分享    android   flutter   dart   visual-studio-code   flutter-packages

Flutter: pub get failed

Flutter project showing me a warning 'Packages get' has not been run with suggested solutions, Get Dependencies Upgrade Dependencies Ignore As suggested by Darky, in this answer to go ahead with 'Get Dependencies' I tried it but it shows me an error: pub get failed /SoftSources/Flutter/flutter/bin/flutter --no-color packages get Running "flutter packages get" in catalog... Incompatible version constraints on test: - flutter_test 0.0.0 depends on version 0.12.30+3 - sample_catalog depends on version 0.12.30+4 pub get failed (1) Process finished with exit code 1 An error indicates an issue with

2021-05-07 04:39:05    分类:问答    android-studio   flutter   flutter-packages   flutter-pub

How to connect flutter with MongoDB

I have a website build with node js and MongoDB and I want to create a mobile app with flutter and I don't know how to connect flutter with MongoDB. give me some code example.

2021-04-19 19:41:48    分类:问答    mongodb   flutter   dart   flutter-packages

“flutter pub get” can't get dependency plugins [duplicate]

This question already has answers here: Connection terminated during handshake flutter (4 answers) Closed 6 months ago. I've been trying to get dependencies for my Flutter project on Windows but it's taking a long time and after a while , it shows this error in 'messages' bar. Running "flutter pub get" in badhan_blood_bank... OS Error: The semaphore timeout period has expired. , errno = 121, address = storage.googleapis.com, port = 53515 pub get failed (server unavailable) -- attempting retry 1 in 1 second... I am trying to solve this problem some ways but failed to solve. I am doing flutter

2021-04-16 07:47:44    分类:问答    android   flutter   dart   flutter-packages