knopp / flutter_reorderable_list

ReorderableList for Flutter
BSD 3-Clause "New" or "Revised" License
335 stars 98 forks source link

Error: No named parameter with the name 'nullOk'. #31

Closed nick45chen closed 3 years ago

nick45chen commented 3 years ago

I got error after runing flutter build apk

Please support for MediaQuery.maybeOf Flutter API breaking change.

../flutter_sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_reorderable_list-0.1.5/lib/flutter_reorderable_list.dart:315:49: Error: No named parameter with the name 'nullOk'.
      MediaQueryData d = MediaQuery.of(context, nullOk: true);          
                                                ^^^^^^                  
../flutter_sdk/flutter/packages/flutter/lib/src/widgets/media_query.dart:814:25: Context: Found this candidate, but the arguments don't match.
  static MediaQueryData of(BuildContext context) {                      
                        ^^                                              

FAILURE: Build failed with an exception.                                

* Where:                                                                
Script '/Users/nickchen/Documents/flutter_sdk/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 900

* What went wrong:                                                      
Execution failed for task ':app:compileFlutterBuildRelease'.            
> Process 'command '/Users/nickchen/Documents/flutter_sdk/flutter/bin/flutter'' finished with non-zero exit value 1
alec0xFFFFFF commented 3 years ago

I'm also having this issue. I'm building for chrome.

nank1ro commented 3 years ago

If you want to have a successful build on the last beta versions of flutter, you can fork this repo and simply change: MediaQueryData d = MediaQuery.of(context, nullOk: true); to MediaQueryData d = MediaQuery.of(context);

Or you can create a dart file, copy all the code from https://github.com/knopp/flutter_reorderable_list/blob/master/lib/flutter_reorderable_list.dart and do the same thing as above without using the library.

moda20 commented 3 years ago

has somebody forked this ? and changed the mediaQuery arguments ?

eggnstone commented 3 years ago

has somebody forked this ? and changed the mediaQuery arguments ?

https://github.com/eggnstone/flutter_reorderable_list

knopp commented 3 years ago

Sorry to have taken so long, I published update that fixes this (and adds NNBD support).