Flutter-Neumorphic icon indicating copy to clipboard operation
Flutter-Neumorphic copied to clipboard

No named parameter with the name 'nullOk' on Flutter Channel greater than Stable version

Open Crdzbird opened this issue 4 years ago • 4 comments

Hi! First of all, congrats for the awesome plugin created, it really is amazing all the functionalities that gave :)

Recently i implement your plugin into a custom plugin named: formio_flutter. But suddenly, i receive an error saying the following:

/usr/local/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_neumorphic-3.0.3/lib/src/widget/app_bar.dart:147:57: Error: No named parameter with the name 'nullOk'. final ScaffoldState scaffold = Scaffold.of(context, nullOk: true);

I don't know if there's an update about this issue or if is solved on another version.

This is my flutter version:

Flutter` (Channel beta, 1.24.0-10.2.pre, on Linux, locale en_US.UTF-8)

Crdzbird avatar Nov 20 '20 05:11 Crdzbird

As an interim fix until the package support null safety you can edit the app_bar.dart file (line 147) in the package from this:

final ScaffoldState scaffold = Scaffold.of(context, nullOk: true);

to this

final ScaffoldState scaffold = Scaffold.of(context);

PS. This is a temp fix

Theunodb avatar Nov 20 '20 06:11 Theunodb

Well, that's good to know about that temporary fix. But is kind of weird that this only happens on flutter versions above stable. 🤔

Crdzbird avatar Nov 20 '20 12:11 Crdzbird

@Crdzbird I think they implemented a fix but their CI/CD build failed to publish so it works for me using this in my pubspec:

flutter_neumorphic: git: url: git://github.com/Idean/Flutter-Neumorphic.git

on version: Flutter 1.26.0-2.0.pre.339 • channel master • https://github.com/flutter/flutter.git Framework • revision 339216d186 (3 days ago) • 2021-01-14 06:45:14 -0800 Engine • revision 1b5e16cda2 Tools • Dart 2.12.0 (build 2.12.0-223.0.dev)

Driaan avatar Jan 17 '21 15:01 Driaan

@Driaan thanks, it's work

Phat0M avatar Jan 30 '21 19:01 Phat0M