flutter-dependencies

Flutter android app crashes upon startup if I include a certain package

大兔子大兔子 提交于 2019-11-30 18:52:09
问题 A problem has suddenly recently arisen such that simply by including the dependency in 'location' in pubspec.yaml like e.g. dependencies: flutter: sdk: flutter location: ^1.2.0 <------------------------ culprit firebase_auth: ^0.5.10 cloud_firestore: ^0.7.2 the app crashes immediately upon startup. The 'location' package itself works when alone in an example app. I am not currently importing i.e. using any of the functionality contained within the location package, yet when I remove the entry

Flutter app behind corporate firewall throws TLS error during packages get

强颜欢笑 提交于 2019-11-30 17:29:48
问题 Recently have installed Flutter and exploring hello-world app. Followed all steps mentioned at https://flutter.io/get-started/ and was able to run :: flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.15063], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK 28.0.2) [√] Android Studio (version 3.1) [!] VS Code, 64-bit edition (version 1.26.0) [√] Connected devices (1

how to use local flutter package in another flutter application?

孤者浪人 提交于 2019-11-30 11:22:28
问题 How to use local flutter package in another flutter application? I created a package using following command: flutter create --template=package my_new_package and then in my application source code => main.dart import "package:my_new_package/my_new_package.dart" // can not find the package 回答1: locate this file in your flutter application => pubspec.yaml make local dependency dependencies: flutter: sdk: flutter my_new_package: path: ./my_new_package 来源: https://stackoverflow.com/questions

How to change status bar color in Flutter?

假如想象 提交于 2019-11-30 04:55:21
I am trying to change the status bar color to white. I found this pub on flutter. I tried to use the example code on my dart files. Works totally fine in my app import 'package:flutter_statusbarcolor/flutter_statusbarcolor.dart'; void main() => runApp(new MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { FlutterStatusbarcolor.setStatusBarColor(Colors.white); return MaterialApp( title: app_title, theme: ThemeData( primarySwatch: Colors.blue, ), home: HomePage(title: home_title), ); } } UPD: Another solution SystemChrome.setSystemUIOverlayStyle

How to encrypt the SQLite database in Flutter?

两盒软妹~` 提交于 2019-11-29 22:17:36
问题 I am creating a database in Flutter by the following code, is there any way we can encrypt the database? Is there any library available for Flutter? initDb() async { io.Directory documentsDirectory = await getApplicationDocumentsDirectory(); String path = join(documentsDirectory.path, "test.db"); var theDb = await openDatabase(path, version: 1, onCreate: _onCreate); return theDb; } 回答1: Pointy Castle seems to be the encryption library of choice at the moment. 回答2: Current sqflite uses

How to fix 'net::ERR_CLEARTEXT_NOT_PERMITTED' in flutter

北城余情 提交于 2019-11-29 14:48:16
I have implemented webView in flutter but it is not opening my php website which is on server what I'm doing wrong. I am new to flutter and tried webview to integrate my website webpage in my application but no luck. Widget build(BuildContext context) { // TODO: implement build return WebviewScaffold( appBar: AppBar(iconTheme:IconThemeData(color: Colors.white),title: Text("Intake Form",style:new TextStyle(color: Colors.white,fontWeight: FontWeight.bold)),backgroundColor:Colors.indigoAccent,automaticallyImplyLeading: false), url: url, //url: "http://61.246.39.79:8080/", withJavascript: true,

How to schedule background tasks in Flutter?

坚强是说给别人听的谎言 提交于 2019-11-28 23:23:00
I have been looking a lot for this but haven't found any packages or a way to schedule background tasks in Flutter. Like in Android there is WorkManager , AlarmManager . I know I can access those classes using MethodChannel , but I want something that works for iOS and Android both. (Its very disappointing that a mobile framework doesn't have the ability to schedule background tasks). What you want to do, i.e. cross-platform scheduling, is not a Flutter limitation. It is an iOS limitation. See this SO post which is referenced in this GitHub comment . There is a Medium blogpost that explains

How to schedule background tasks in Flutter?

南楼画角 提交于 2019-11-27 14:41:08
问题 I have been looking a lot for this but haven't found any packages or a way to schedule background tasks in Flutter. Like in Android there is WorkManager , AlarmManager . I know I can access those classes using MethodChannel , but I want something that works for iOS and Android both. (Its very disappointing that a mobile framework doesn't have the ability to schedule background tasks). 回答1: What you want to do, i.e. cross-platform scheduling, is not a Flutter limitation. It is an iOS

D8: Program type already present: android.support.v4.media.MediaBrowserCompat$CustomActionCallback

倾然丶 夕夏残阳落幕 提交于 2019-11-26 23:26:29
问题 I am new to flutter and i build a very little app showing current latitude and longitude which required me to add two dependencies in pubspec.yaml :- location and simple_permissions to get current user location and asking for location permission. but when i ran the app it shows following error:- Gradle task 'assembleDebug'... D8: Program type already present: android.support.v4.media.MediaBrowserCompat$CustomActionCallback FAILURE: Build failed with an exception. * What went wrong: Execution