Migration service resetVersion method is not working
mmuneesthreecees opened this issue · comments
Hi
Following code return "Null check operator used on a null value" error
final_ _migrationService = locator<DatabaseMigrationService>
();
migrationService.resetVersion();
Due to this I am unable to reset Database version to 0.
Could you please help me out to reset database version. Thanks in advance.
flutter doctor -v
[√] Flutter (Channel stable, 2.5.0, on Microsoft Windows [Version 10.0.19042.1165], locale en-IN)
• Flutter version 2.5.0 at D:\flutter\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4cc385b4b8 (7 days ago), 2021-09-07 23:01:49 -0700
• Engine revision f0826da7ef
• Dart version 2.14.0
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\shahzad\AppData\Local\Android\Sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = C:\Users\shahzad\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Users\shahzad\AppData\Local\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.1)
• Android Studio at C:\Program Files\Android\Android Studio1
• Flutter plugin can be installed from:
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.60.1)
• VS Code at C:\Users\shahzad\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.26.0
[√] Connected device (3 available)
• Moto G 5 Plus (mobile) • ZY223ZS56P • android-arm • Android 8.1.0 (API 27)
• Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.63
• Edge (web) • edge • web-javascript • Microsoft Edge 93.0.961.47
• No issues found!
Regards
Muhammed Munees
Reset not working always
Hi @FilledStacks,
Could I get any assistance in this issue.
Hey, do you also remove your migrations from your code?