Measured-Size
Measured-Size copied to clipboard
Add support for Flutter 3.0 - Fix null-aware operation warning
On flutter 3.0 there's is a new warning added for null-aware operation, this removes the usage of the null-aware operation.
Warning:
../flutter/.pub-cache/hosted/pub.dartlang.org/measured_size-1.0.0/lib/measured_size.dart:29:22: Warning: Operand of null-aware operation
'!' has type 'SchedulerBinding' which excludes null.
- 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart'
('../../../../flutter/packages/flutter/lib/src/scheduler/binding.dart').
SchedulerBinding.instance!.addPostFrameCallback(postFrameCallback);
if someone else comes seeking for a temp fix for this warning you can add it to your pubspec.yaml and your project will build without this warning:
dependencies:
measured_size:
git:
url: https://github.com/mattias-lonn/Measured-Size.git
ref: main