Skip to content
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

OneContext not initiated! please use builder method. #51

Open
beyzatsc opened this issue Sep 30, 2024 · 4 comments
Open

OneContext not initiated! please use builder method. #51

beyzatsc opened this issue Sep 30, 2024 · 4 comments

Comments

@beyzatsc
Copy link

beyzatsc commented Sep 30, 2024

### Hello, when I first run the application or restart it, this error appears in the console. I tried a few things but it didn't work. Any solution please?

Also main.dart:

void main() {
    WidgetsFlutterBinding.ensureInitialized();
    OneContext().key = GlobalKey<NavigatorState>();
    OnePlatform.app = () => const MyApp();
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Material(
      child: MaterialApp(
        title: ...,
        builder: OneContext().builder,
        navigatorKey: OneContext().key,
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
          useMaterial3: false,
        ),
        home: const HomePage()
      ),
    );
  }

Flutter version: 3.22.2

OneContext version: 4.0.0

Ekran Resmi 2024-09-30 11 42 59
@sheemavijayakumari
Copy link

Im also facing the same issue

@mihailovukojicic
Copy link

Same problem here!!

@mihailovukojicic
Copy link

@emanuel-braz could you please take a look into this problem? Thanks in advance

@onursahindur
Copy link

Same issue here

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

4 participants