After updating to flutter 3.0 I'm getting a warning about a null aware operator used on a non null type
Here is the warning
: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
../…/lib/mvvm_builder.widget.dart:47
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../fvm/versions/stable/packages/flutter/lib/src/widgets/binding.dart').
package:flutter/…/widgets/binding.dart:1
WidgetsBinding.instance?.addObserver(this);
^
: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
../…/lib/mvvm_builder.widget.dart:48
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../fvm/versions/stable/packages/flutter/lib/src/widgets/binding.dart').
package:flutter/…/widgets/binding.dart:1
WidgetsBinding.instance?.addPostFrameCallback((_) => _vm.onMount());
^
: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
../…/lib/mvvm_builder.widget.dart:78
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../../fvm/versions/stable/packages/flutter/lib/src/widgets/binding.dart').
package:flutter/…/widgets/binding.dart:1
WidgetsBinding.instance?.removeObserver(this);
^
I just write this PR to solve that following that WidgetsBinding.instance is not null able docs
After updating to flutter 3.0 I'm getting a warning about a null aware operator used on a non null type
Here is the warning
I just write this PR to solve that following that WidgetsBinding.instance is not null able docs