1
0
mirror of https://github.com/stonega/tsacdop synced 2024-12-14 09:24:54 +01:00
tsacdop-podcast-app-android/tool/env.dart
2020-10-01 14:54:14 +08:00

15 lines
419 B
Dart

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');
}