Skip to content

DevicePreview Not Showing When Firebase is Initialized #253

@redz09123

Description

@redz09123

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

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