Skip to content

Commit

Permalink
v0.1.9 Release
Browse files Browse the repository at this point in the history
- Flutter 2 compatibility version. This is the last version to support Flutter 2.
  • Loading branch information
rayliverified committed May 18, 2022
1 parent dd097e4 commit bbc8541
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.1.9
- Flutter 2 compatibility version. This is the last version to support Flutter 2.

## 0.1.8
- Flutter 3 support.

Expand Down
8 changes: 4 additions & 4 deletions lib/responsive_wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,8 @@ class _ResponsiveWrapperState extends State<ResponsiveWrapper>
}

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

@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
WidgetsBinding.instance!.removeObserver(this);
super.dispose();
}

Expand All @@ -642,7 +642,7 @@ class _ResponsiveWrapperState extends State<ResponsiveWrapper>
// When physical dimensions change, update state.
// The required MediaQueryData is only available
// on the next frame for physical dimension changes.
WidgetsBinding.instance.addPostFrameCallback((_) {
WidgetsBinding.instance!.addPostFrameCallback((_) {
// Widget could be destroyed by resize. Verify widget
// exists before updating dimensions.
if (mounted) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: responsive_framework
description: Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple.
version: 0.1.8
version: 0.1.9
homepage: https://codelessly.com
repository: https://github.com/Codelessly/ResponsiveFramework
issue_tracker: https://github.com/Codelessly/ResponsiveFramework/issues
Expand Down

0 comments on commit bbc8541

Please sign in to comment.