From 6502cbdf841673a5d73a4c16fb368f11d7dcbf8e Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 21 Apr 2021 13:07:16 +0530 Subject: [PATCH] Fix sizer widget class --- CHANGELOG.md | 12 ++++++++++++ README.md | 5 ++++- lib/sizer.dart | 2 +- lib/widget.dart | 6 +++--- pubspec.lock | 14 ++++++++++++++ pubspec.yaml | 3 ++- 6 files changed, 36 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b69db4..82d61f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -108,3 +108,15 @@ ## [2.0.9] - 20.04.2021. * Fix multiplatform bug + +## [2.0.10] - 20.04.2021. + +* Fix multiplatform bug + +## [2.0.11] - 20.04.2021. + +* Fix multiplatform bug + +## [2.0.12] - 20.04.2021. + +* Fix sizer widget class diff --git a/README.md b/README.md index d33665d..6df7aa7 100644 --- a/README.md +++ b/README.md @@ -17,18 +17,21 @@ A flutter plugin for Easily make Flutter apps responsive. Automatically adapt # Content +- [For Existing User](#existing-user) - [Installation](#installation) - [Parameters](#parameters) - [Suggestion](#suggestion) - [Note](#note) +# Existing User +## Hello Existing users, I have updated the package for supporting Flutter 2.0 and solving many bugs then Whenever you update 1.x.x to 2.x.x will be got many errors so please update the package with the new below code. # Installation ⬇️ Add to pubspec.yaml. ```dart dependencies: ... - sizer: ^2.0.9 + sizer: ^2.0.12 ``` # Parameters ⚙️ diff --git a/lib/sizer.dart b/lib/sizer.dart index 317c65d..134b23f 100644 --- a/lib/sizer.dart +++ b/lib/sizer.dart @@ -5,7 +5,7 @@ library sizer; import 'package:flutter/widgets.dart'; -import 'dart:io' show Platform; +import 'package:universal_io/io.dart' show Platform; import 'package:flutter/foundation.dart' show kIsWeb; part 'extension.dart'; diff --git a/lib/widget.dart b/lib/widget.dart index 4d1b7a4..41ff53e 100644 --- a/lib/widget.dart +++ b/lib/widget.dart @@ -2,9 +2,9 @@ part of sizer; /// Provides `Context`, `Orientation`, and `ScreenType` parameters to the builder function typedef ResponsiveBuild = Widget Function( - BuildContext, - Orientation, - DeviceType, + BuildContext context, + Orientation orientation, + DeviceType deviceType, ); /// A widget that gets the device's details like orientation and constraints diff --git a/pubspec.lock b/pubspec.lock index 580af64..42d7210 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -43,6 +43,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" fake_async: dependency: transitive description: @@ -135,6 +142,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.0" + universal_io: + dependency: "direct main" + description: + name: universal_io + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 65c1a3a..a6c894f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: sizer description: A flutter plugin for Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple. -version: 2.0.9 +version: 2.0.12 #author: Urmish Patel homepage: https://github.com/TechnoUrmish/Sizer @@ -9,6 +9,7 @@ environment: flutter: ">=1.17.0" dependencies: + universal_io: ^2.0.4 flutter: sdk: flutter