GiancarloCode / form_bloc

🔥 Dart and Flutter Package 🔥 Easy Form State Management using BLoC pattern 🔥 Wizard/stepper forms, asynchronous validation, dynamic and conditional fields, submission progress, serialization and more! 🔥
https://GiancarloCode.github.io/form_bloc/
464 stars 199 forks source link

[FLUTTER 3] Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null. #91 #309

Open dJani97 opened 2 years ago

dJani97 commented 2 years ago

Describe the bug

When running the project, a couple of warnings like this are displayed:

../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_form_bloc-0.30.1/lib/src/flutter_typeahead.dart:985:22: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/Apps/flutter/packages/flutter/lib/src/widgets/binding.dart').
      WidgetsBinding.instance!.addPostFrameCallback((duration) {
                     ^

In Flutter 3, WidgetsBinding.instance is no longer nullable, so the ?. operator is not necessary.

To Reproduce Reproducible by using Flutter 3 and flutter_form_bloc: ^0.30.1.

vasilich6107 commented 2 years ago

@dJani97 This is not the first time when form_bloc has issues with delivery

Today I removed last piece of code and form_bloc as dependancy.

I recommend you pay attaention to reactive_forms

dJani97 commented 2 years ago

Please, merge & make at least a pre-release of this.

vasilich6107 commented 3 months ago

https://github.com/GiancarloCode/form_bloc/pull/312#issuecomment-1164240179