Skip to content

Commit

Permalink
fix: SchedulerBinding.instance is now null-safe (#124) (#125)
Browse files Browse the repository at this point in the history
* fix: SchedulerBinding.instance is now null-safe (#124)

* flutter: raised min support to v3.0.0

Co-authored-by: mockturtl <mockturtl@gmail.com>
  • Loading branch information
daadu and mockturtl authored May 12, 2022
1 parent 949a265 commit ce6ef36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: "Install dependencies"
run: flutter pub get && (cd demo && flutter pub get)
- name: "Pub Check"
run: pub publish --dry-run
run: dart pub publish --dry-run

check_formatting:
name: "Check code formatting"
Expand Down
4 changes: 2 additions & 2 deletions lib/src/scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -710,10 +710,10 @@ class _MeasureSizeState extends State<_MeasureSize> {

@override
Widget build(BuildContext context) {
SchedulerBinding.instance!.addPostFrameCallback((_) => _notify());
SchedulerBinding.instance.addPostFrameCallback((_) => _notify());
return NotificationListener<SizeChangedLayoutNotification>(
onNotification: (_) {
SchedulerBinding.instance!.addPostFrameCallback((_) => _notify());
SchedulerBinding.instance.addPostFrameCallback((_) => _notify());
return true;
},
child: SizeChangedLayoutNotifier(
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ maintainer: Harsh Bhikadia (@daadu)

environment:
sdk: '>=2.12.0 <3.0.0'
flutter: '>=3.0.0'

dependencies:
flutter:
Expand Down

0 comments on commit ce6ef36

Please sign in to comment.