FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Instance of 'NotInitializedError' in Flutter integration · Issue #127 · java-james/flutter_dotenv · GitHub

Repository navigation

Instance of 'NotInitializedError' in Flutter integration #127

Description

import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:profitolio_mobile/config/app_theme.dart';
import 'package:profitolio_mobile/screens/login/login_screen.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();

await dotenv.load(
fileName: '.env');

runApp(MyApp());
}

class MyApp extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Login',
theme: AppTheme.lightTheme,
home: LoginScreen(),
);
}
}

I am getting this error. It would be helpful if someone could come up with a solution. :)
╞═══════════════════════════════════════════════════════════
js_primitives.dart:28 The following NotInitializedError was thrown building Builder:
js_primitives.dart:28 Instance of 'NotInitializedError'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL