From bbc85411f0185bc4476c61a4dcf0734efe93c0ce Mon Sep 17 00:00:00 2001 From: Ray Li Date: Wed, 18 May 2022 13:47:30 -0500 Subject: [PATCH] v0.1.9 Release - Flutter 2 compatibility version. This is the last version to support Flutter 2. --- CHANGELOG.md | 3 +++ lib/responsive_wrapper.dart | 8 ++++---- pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b9acf9..cab9c4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/lib/responsive_wrapper.dart b/lib/responsive_wrapper.dart index f428543..a9d4836 100644 --- a/lib/responsive_wrapper.dart +++ b/lib/responsive_wrapper.dart @@ -619,8 +619,8 @@ class _ResponsiveWrapperState extends State } // 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 @@ -632,7 +632,7 @@ class _ResponsiveWrapperState extends State @override void dispose() { - WidgetsBinding.instance.removeObserver(this); + WidgetsBinding.instance!.removeObserver(this); super.dispose(); } @@ -642,7 +642,7 @@ class _ResponsiveWrapperState extends State // 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) { diff --git a/pubspec.yaml b/pubspec.yaml index ba3430e..dce90d3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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