mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
uses Platform.environment instead of env
This commit is contained in:
parent
d41e3015ed
commit
147f1373d4
@ -2,10 +2,9 @@ import 'dart:convert';
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:path/path.dart' as path;
|
import 'package:path/path.dart' as path;
|
||||||
import 'package:dotenv/dotenv.dart';
|
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
load();
|
final env = Platform.environment;
|
||||||
final bool hasKey = env.containsKey("SECRET");
|
final bool hasKey = env.containsKey("SECRET");
|
||||||
final val = hasKey ? jsonDecode(env["SECRET"]!) : null;
|
final val = hasKey ? jsonDecode(env["SECRET"]!) : null;
|
||||||
if (!hasKey || (hasKey && val is! List)) {
|
if (!hasKey || (hasKey && val is! List)) {
|
||||||
|
@ -169,13 +169,6 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.4"
|
version: "1.0.4"
|
||||||
dotenv:
|
|
||||||
dependency: "direct dev"
|
|
||||||
description:
|
|
||||||
name: dotenv
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.0"
|
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -68,7 +68,6 @@ dev_dependencies:
|
|||||||
# rules and activating additional ones.
|
# rules and activating additional ones.
|
||||||
flutter_lints: ^1.0.0
|
flutter_lints: ^1.0.0
|
||||||
flutter_launcher_icons: ^0.9.2
|
flutter_launcher_icons: ^0.9.2
|
||||||
dotenv: ^3.0.0
|
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
|
Loading…
Reference in New Issue
Block a user