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

DevicePreview Not Showing When Firebase is Initialized #253

Open
redz09123 opened this issue Oct 4, 2024 · 0 comments
Open

DevicePreview Not Showing When Firebase is Initialized #253

redz09123 opened this issue Oct 4, 2024 · 0 comments

Comments

@redz09123
Copy link

I'm experiencing an issue with the device_preview package in my Flutter application. Whenever I include Firebase in my main.dart, the DevicePreview simulator does not show up. However, when I remove the Firebase initialization, the DevicePreview works as expected.

void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); runApp( DevicePreview( enabled: !kReleaseMode, builder: (context) => const MonitoringApp(), // Wrap your app ), ); }

Steps to Reproduce:

Add Firebase initialization in the main() method as shown in the code snippet.
Run the app.
Observe that the DevicePreview simulator does not appear.
Remove the Firebase initialization.
Run the app again and observe that the DevicePreview simulator shows up.
Expected Behavior: The DevicePreview simulator should display regardless of whether Firebase is initialized.

Environment:

Flutter : 3.24.3
Dart 3.5.3
Device Preview version: 1.2.0
Firebase 3.3.0
Additional Information: Please let me know if you need further details to help investigate this issue.
Screenshot_21

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