Skip to content

Instance of 'NotInitializedError' in Flutter integration #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rohxnn opened this issue Mar 12, 2025 · 0 comments
Open

Instance of 'NotInitializedError' in Flutter integration #127

rohxnn opened this issue Mar 12, 2025 · 0 comments

Comments

@rohxnn
Copy link

rohxnn commented Mar 12, 2025

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'

Repository owner deleted a comment from prabhunath111 May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant