1

Building without sound null safety For more information see https://dart.dev/null-safety/unsound-null-safety

Expected elements are <{}codename>,<{}layoutlib>,<{}api-level> /C:/Users/Manoj/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/modal_bottom_sheet-2.0.0/lib/src/bottom_sheet.dart:303:28: Error: Couldn't find constructor 'VelocityTracker'. _velocityTracker = VelocityTracker(); ^^^^^^^^^^^^^^^ /C:/Users/Manoj/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_typeahead-3.2.4/lib/src/flutter_typeahead.dart:754:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.

  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.removeObserver(this); ^ /C:/Users/Manoj/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_typeahead-3.2.4/lib/src/flutter_typeahead.dart:767:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addObserver(this); ^ /C:/Users/Manoj/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_typeahead-3.2.4/lib/src/flutter_typeahead.dart:801:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addPostFrameCallback((duration) { ^ /C:/Users/Manoj/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_typeahead-3.2.4/lib/src/flutter_typeahead.dart:936:9: Error: No named parameter with the name 'maxLengthEnforced'. maxLengthEnforced: widget.textFieldConfiguration.maxLengthEnforced, ^^^^^^^^^^^^^^^^^ /C:/src/flutter/packages/flutter/lib/src/material/text_field.dart:276:9: Context: Found this candidate, but the arguments don't match. const TextField({ ^^^^^^^^^ /C:/Users/Manoj/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_typeahead-3.2.4/lib/src/cupertino_flutter_typeahead.dart:558:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.removeObserver(this); ^ /C:/Users/Manoj/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_typeahead-3.2.4/lib/src/cupertino_flutter_typeahead.dart:571:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addObserver(this); ^ /C:/Users/Manoj/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_typeahead-3.2.4/lib/src/cupertino_flutter_typeahead.dart:605:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
  • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addPostFrameCallback((duration) { ^ /C:/Users/Manoj/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_typeahead-3.2.4/lib/src/cupertino_flutter_typeahead.dart:746:9: Error: No named parameter with the name 'maxLengthEnforced'. maxLengthEnforced: widget.textFieldConfiguration.maxLengthEnforced, ^^^^^^^^^^^^^^^^^ /C:/src/flutter/packages/flutter/lib/src/cupertino/text_field.dart:209:9: Context: Found this candidate, but the arguments don't match. const CupertinoTextField({ ^^^^^^^^^^^^^^^^^^

FAILURE: Build failed with an exception.

  • Where: Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156

  • What went wrong: Execution failed for task ':app:compileFlutterBuildRelease'.

Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 27s Running Gradle task 'assembleRelease'... 88.7s Gradle task assembleRelease failed with exit code 1 The terminal process "C:\src\flutter\bin\flutter.bat 'build', 'apk'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Manoj
  • 19
  • 1
  • 4
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community May 17 '22 at 05:20

2 Answers2

1

this happened to me after I updated flutter version , if you used modal bottom sheet package then just set or update to this version modal_bottom_sheet: ^2.0.1 in pubspec and run pub get

Amer Alzibak
  • 1,489
  • 15
  • 16
0

Duplicate of this

the Packages you use arent updated to Flutter 3.0 yet.

Eric
  • 352
  • 3
  • 11