diff --git a/.gitignore b/.gitignore index 85f588c..2fbf84f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,73 +1,74 @@ -###################### -# Project Specific -###################### -*.g.dart -doc/ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ -###################### -# Intellij -###################### -.idea* +# IntelliJ related *.iml -*.iws *.ipr -*.ids -*.orig -classes/ -build/ -gen/ +*.iws +.idea/ +gradle.properties -###################### -# Visual Studio Code -###################### +# Visual Studio Code related .vscode/ -###################### -# Windows -###################### -# Windows image file caches -Thumbs.db - -# Folder config file -Desktop.ini - -###################### -# Mac OSX -###################### -.DS_Store -.svn - -# Thumbnails -._* - -# Files that might appear on external disk -.Spotlight-V100 -.Trashes - -###################### -# Flutter & Dart -###################### -.packages -.pub/ +# Flutter/Dart/Pub related +**/doc/api/ .dart_tool/ .flutter-plugins +.packages +.pub-cache/ +.pub/ +build/ -###################### -# Directories -###################### -/bin/ -/deploy/ -/out/ +# Android related +**/android/**/gradle-wrapper.jar +**/android/.gradle +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java -###################### -# Logs -###################### -*.log* +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/**/xcshareddata +**/ios/.generated/ +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/Flutter/flutter_export_environment.sh +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* -###################### -# Others -###################### -*.class -*.*~ -*~ -.merge_file* \ No newline at end of file +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +.env* diff --git a/android/local.properties b/android/local.properties deleted file mode 100644 index bc8ea8a..0000000 --- a/android/local.properties +++ /dev/null @@ -1,3 +0,0 @@ -sdk.dir=/Users/jamescollins/Library/Android/sdk -flutter.sdk=/Users/jamescollins/Development/sdks/flutter -flutter.versionName=2.0.1 \ No newline at end of file diff --git a/lib/src/dotenv.dart b/lib/src/dotenv.dart index f112af8..45bd40b 100644 --- a/lib/src/dotenv.dart +++ b/lib/src/dotenv.dart @@ -24,6 +24,7 @@ import 'dart:io'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart' show rootBundle; +import 'package:flutter/widgets.dart'; import './parser.dart'; @@ -71,6 +72,7 @@ class DotEnv { Future> _verify(String filename) async { try { + WidgetsFlutterBinding.ensureInitialized(); var str = await rootBundle.loadString(filename); if (str.isNotEmpty) return str.split('\n'); stderr.writeln('[flutter_dotenv] Load failed: file $filename was empty'); diff --git a/pubspec.lock b/pubspec.lock index 70370f4..d6275b2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,20 +1,34 @@ # Generated by pub -# See https://www.dartlang.org/tools/pub/glossary#lockfile +# See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.3.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" charcode: dependency: transitive description: @@ -29,6 +43,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" flutter: dependency: "direct main" description: flutter @@ -39,34 +67,55 @@ packages: description: flutter source: sdk version: "0.0.0" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.3+1" + version: "0.12.5" meta: dependency: "direct main" description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.1.7" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" + version: "1.6.4" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0+1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.5" sky_engine: dependency: transitive description: flutter @@ -78,7 +127,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.4.1" + version: "1.5.5" stack_trace: dependency: transitive description: @@ -92,28 +141,28 @@ packages: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "1.6.8" + version: "2.0.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.1.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.1" + version: "0.2.5" typed_data: dependency: transitive description: @@ -128,5 +177,12 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.8" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "3.5.0" sdks: - dart: ">=2.0.0 <3.0.0" + dart: ">=2.4.0 <3.0.0"