Skip to content

Commit

Permalink
Add method for responsive web
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnoUrmish committed Sep 15, 2021
1 parent c591c28 commit 23fb261
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -124,3 +124,7 @@
## [2.0.13] - 20.04.2021.

* Update readme file

## [2.0.14] - 15.09.2021.

* add method for responsive web
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -31,7 +31,7 @@ Add to pubspec.yaml.
```dart
dependencies:
...
sizer: ^2.0.13
sizer: ^2.0.14
```

# Parameters ⚙️
Expand Down
9 changes: 9 additions & 0 deletions lib/util.dart
Expand Up @@ -55,6 +55,15 @@ class SizerUtil {
deviceType = DeviceType.fuchsia;
}
}

//for responsive web
static getWebResponsiveSize({smallSize, mediumSize, largeSize}) {
return width < 600
? smallSize //'phone'
: width >= 600 && width <= 1024
? mediumSize //'tablet'
: largeSize; //'desktop';
}
}

/// Type of Device
Expand Down
2 changes: 1 addition & 1 deletion 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.13
version: 2.0.14
#author: Urmish Patel <urmishpatel9@gmail.com>
homepage: https://github.com/TechnoUrmish/Sizer

Expand Down

0 comments on commit 23fb261

Please sign in to comment.