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.
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.
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.