Skip to content

Commit 23e394d

Browse files
rayliverifiedadilayman
authored andcommitted
operand of null-aware operation ! has type WidgetsBinding which excludes null
1 parent 52a124e commit 23e394d

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 0.1.7
4+
- Fix sort crash in web due to JS converting variables into immutable vals that cannot be sorted.
5+
36
## 0.1.6
47
- Enable using `background` widget for the 1st render frame if set. This allows for a smoother transition between native mobile splash screen and Flutter application UI.
58
- Add generic T to support type safety and automatic type conversion in ResponsiveValue.

lib/responsive_wrapper.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,8 @@ class _ResponsiveWrapperState extends State<ResponsiveWrapper>
619619
}
620620

621621
// Dimensions are only available after first frame paint.
622-
WidgetsBinding.instance!.addObserver(this);
623-
WidgetsBinding.instance!.addPostFrameCallback((_) {
622+
WidgetsBinding.instance.addObserver(this);
623+
WidgetsBinding.instance.addPostFrameCallback((_) {
624624
// Breakpoints must be initialized before the first frame is drawn.
625625
setBreakpoints();
626626
// Directly updating dimensions is safe because frame callbacks
@@ -632,7 +632,7 @@ class _ResponsiveWrapperState extends State<ResponsiveWrapper>
632632

633633
@override
634634
void dispose() {
635-
WidgetsBinding.instance!.removeObserver(this);
635+
WidgetsBinding.instance.removeObserver(this);
636636
super.dispose();
637637
}
638638

@@ -642,7 +642,7 @@ class _ResponsiveWrapperState extends State<ResponsiveWrapper>
642642
// When physical dimensions change, update state.
643643
// The required MediaQueryData is only available
644644
// on the next frame for physical dimension changes.
645-
WidgetsBinding.instance!.addPostFrameCallback((_) {
645+
WidgetsBinding.instance.addPostFrameCallback((_) {
646646
// Widget could be destroyed by resize. Verify widget
647647
// exists before updating dimensions.
648648
if (mounted) {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: responsive_framework
22
description: Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple.
3-
version: 0.1.6
3+
version: 0.1.7
44
homepage: https://codelessly.com
55
repository: https://github.com/Codelessly/ResponsiveFramework
66
issue_tracker: https://github.com/Codelessly/ResponsiveFramework/issues

0 commit comments

Comments
 (0)