You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add the import import 'package:flutter_dotenv/flutter_dotenv.dart'; to the main.dart file and use await dotenv.load(fileName: ".env"); to load the .env file and make sure that the .env file is not empty.
If it was empty or haven't been created at the time it was added to the pubspec.yml go to pubspec.yml again and press ctrl + save
import the package wherever necessary import 'package:flutter_dotenv/flutter_dotenv.dart'; and use dotenv.env['VAR_NAME']; the VAR_NAME should be the same as the one you want to load from the .env file.