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

Complete firebase example #31

Open
lucavenir opened this issue May 27, 2023 · 2 comments
Open

Complete firebase example #31

lucavenir opened this issue May 27, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@lucavenir
Copy link
Owner

lucavenir commented May 27, 2023

The firebase folder should receive some more love. Codegen, new APIs, stuff like that.

@lucavenir lucavenir added the enhancement New feature or request label May 27, 2023
@lucavenir lucavenir self-assigned this May 27, 2023
@yeasir-bjit
Copy link

yeasir-bjit commented Jan 31, 2024

lass AppWithFirebase extends ConsumerWidget {
  const AppWithFirebase({super.key});

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final router = ref.watch(routerProvider);

    return MaterialApp.router(
      routeInformationParser: router.routeInformationParser,
      routerDelegate: router.routerDelegate,
      routeInformationProvider: router.routeInformationProvider,
      title: 'flutter_riverpod + go_router Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
    );
  }
}

final router = ref.watch(routerProvider);
This will rebuild whole material app every route change or rebuild the router, does it legit?

@lucavenir
Copy link
Owner Author

lucavenir commented Jan 31, 2024

As of now, yes, the firebase_example folder contains legacy code. As you've pointed out the current code is less than ideal. Please refrain from reading that example. You can easily apply firebase-wise considerations with the main example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants