From 147f1373d46f3f6cd6e628dc1c81500604016394 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Fri, 18 Mar 2022 12:40:08 +0600 Subject: [PATCH] uses Platform.environment instead of env --- bin/create-secrets.dart | 3 +-- pubspec.lock | 7 ------- pubspec.yaml | 1 - 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/bin/create-secrets.dart b/bin/create-secrets.dart index a16d89ee6..0bc628939 100644 --- a/bin/create-secrets.dart +++ b/bin/create-secrets.dart @@ -2,10 +2,9 @@ import 'dart:convert'; import 'dart:io'; import 'package:path/path.dart' as path; -import 'package:dotenv/dotenv.dart'; void main() async { - load(); + final env = Platform.environment; final bool hasKey = env.containsKey("SECRET"); final val = hasKey ? jsonDecode(env["SECRET"]!) : null; if (!hasKey || (hasKey && val is! List)) { diff --git a/pubspec.lock b/pubspec.lock index 1b874a9bf..2f0cc03a2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -169,13 +169,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.4" - dotenv: - dependency: "direct dev" - description: - name: dotenv - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" fake_async: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index f5ad419d9..da6bac669 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -68,7 +68,6 @@ dev_dependencies: # rules and activating additional ones. flutter_lints: ^1.0.0 flutter_launcher_icons: ^0.9.2 - dotenv: ^3.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec