Skip to content

Commit

Permalink
uses Platform.environment instead of env
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Mar 18, 2022
1 parent d41e301 commit 147f137
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
3 changes: 1 addition & 2 deletions bin/create-secrets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
7 changes: 0 additions & 7 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 147f137

Please sign in to comment.