tsacdop-podcast-app-android/tool/env.dart

15 lines
433 B
Dart
Raw Normal View History

2020-10-28 13:10:43 +01:00
import 'dart:convert';
import 'dart:io';
Future<void> main() async {
final config = {
'apiKey': Platform.environment['API_KEY'],
'podcastIndexApiKey': Platform.environment['PI_API_KEY'],
'podcastIndexApiSecret': Platform.environment['PI_API_SECRET']
};
final filename = 'lib/.env.dart';
File(filename).writeAsString('final environment = ${json.encode(config)};');
print('Write successfully');
}