mirror of
https://github.com/java-james/flutter_dotenv.git
synced 2025-08-26 02:41:04 +08:00
chore: update example project
This commit is contained in:
@ -3,9 +3,15 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
|
||||
Future main() async {
|
||||
await dotenv.load(fileName: "assets/.env", mergeWith: {
|
||||
'TEST_VAR': '5',
|
||||
}); // mergeWith optional, you can include Platform.environment for Mobile/Desktop app
|
||||
await dotenv.load(
|
||||
fileName: "assets/.env",
|
||||
// mergeWith optional, you can include Platform.environment for Mobile/Desktop app
|
||||
mergeWith: {
|
||||
'TEST_VAR': '5',
|
||||
},
|
||||
// overrideWith optional, you can include additional .env files
|
||||
overrideWith: ["assets/.env.override"],
|
||||
);
|
||||
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
Reference in New Issue
Block a user