-
Notifications
You must be signed in to change notification settings - Fork 386
Open
Description
I have a flutter project setup with this config for pubspec.yaml. Trying to add flutter_device_preview to my project results into this error. Any hint to this fix.
version: 1.0.0+1
environment:
sdk: ^3.8.1Here is my flutter environment setup:
> flutter --version
Flutter 3.35.7 • channel stable • https://github.com/flutter/flutter.git
Framework • revision adc9010625 (9 weeks ago) • 2025-10-21 14:16:03 -0400
Engine • hash 6b24e1b529bc46df7ff397667502719a2a8b6b72 (revision 035316565a) (1 months ago) • 2025-10-21 14:28:01.000Z
Tools • Dart 3.9.2 • DevTools 2.48.0
> flutter pub add device device_preview
The current Dart SDK version is 3.9.2.
Because mobile_project depends on device any which doesn't support null safety, version solving failed.
The lower bound of "sdk: '>=2.4.0 <3.0.0'" must be 2.12.0 or higher to enable null safety.
For details, see https://dart.dev/null-safety
Failed to update packages.Even though i try to set the sdk environment lower bound to 2.12.0. i am still getting the error. is there any clue to how to fix it.
environment
sdk: '>2.12.0 <3.0.0'Thanks
Metadata
Metadata
Assignees
Labels
No labels