Skip to content

Commit 0dfe47e

Browse files
committed
v0.0.6 Release
1 parent ff56e1b commit 0dfe47e

File tree

4 files changed

+26
-23
lines changed

4 files changed

+26
-23
lines changed

CHANGELOG.md

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

3+
## 0.0.6
4+
- Create `autoScaleDown` and `tag` behaviors.
5+
- Create ResponsiveBreakpointSegment and algorithm to calculate breakpoint segments.
6+
- Create experimental ResponsiveValue, ResponsiveVisibility, and ResponsiveRowColumn widgets.
7+
- Breaking - removed `autoScale` to migrate ResponsiveBreakpoint behavior to constructors.
8+
39
## 0.0.5
410
- Add `defaultName` parameter.
511
- Create tests.

README.md

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Supporting multiple display sizes often means recreating the same layout multipl
1616
### The Solution
1717
Use Responsive Framework to automatically scale your UI.
1818

19-
> ResponsiveBreakpoint(breakpoint: 600, **autoScale: true**);
19+
> **ResponsiveBreakpoint.autoScale(breakpoint: 600);**
2020
2121
## Demo
2222

@@ -42,14 +42,12 @@ class MyApp extends StatelessWidget {
4242
return MaterialApp(
4343
builder: (context, widget) => ResponsiveWrapper.builder(
4444
maxWidth: 1200,
45-
minWidth: 450,
45+
minWidth: 480,
4646
defaultScale: true,
4747
breakpoints: [
48-
ResponsiveBreakpoint(breakpoint: 450, name: MOBILE),
49-
ResponsiveBreakpoint(breakpoint: 800, name: TABLET, scale: true),
50-
ResponsiveBreakpoint(breakpoint: 1000, name: TABLET, scale: true),
51-
ResponsiveBreakpoint(breakpoint: 1200, name: DESKTOP),
52-
ResponsiveBreakpoint(breakpoint: 2460, name: "4K", scale: true),
48+
ResponsiveBreakpoint.resize(breakpoint: 480, name: MOBILE),
49+
ResponsiveBreakpoint.autoScale(breakpoint: 800, name: TABLET),
50+
ResponsiveBreakpoint.resize(breakpoint: 1000, name: DESKTOP),
5351
],
5452
background: Container(color: Color(0xFFF5F5F5))),
5553
initialRoute: "/",
@@ -67,7 +65,7 @@ AutoScale shrinks and expands your layout *proportionally*, preserving the exact
6765
This eliminates the need to manually adapt layouts to mobile, tablet, and desktop.
6866

6967
```dart
70-
ResponsiveBreakpoint(breakpoint: 600, autoScale: true);
68+
ResponsiveBreakpoint.autoScale(breakpoint: 600);
7169
```
7270

7371
Flutter's default behavior is resize which Responsive Framework respects. AutoScale is off by default and can be enabled at breakpoints by setting `autoScale` to `true`.
@@ -82,9 +80,9 @@ Breakpoints control responsive behavior at different screen sizes.
8280
ResponsiveWrapper(
8381
child,
8482
breakpoints: [
85-
ResponsiveBreakpoint(breakpoint: 600, name: MOBILE, autoScale: false),
86-
ResponsiveBreakpoint(breakpoint: 800, name: TABLET, autoScale: true),
87-
ResponsiveBreakpoint(breakpoint: 1200, name: DESKTOP, autoScale: false),
83+
ResponsiveBreakpoint.resize(breakpoint: 600, name: MOBILE),
84+
ResponsiveBreakpoint.autoScale(breakpoint: 800, name: TABLET),
85+
ResponsiveBreakpoint.autoScale(breakpoint: 1200, name: DESKTOP),
8886
],
8987
)
9088
```
@@ -115,23 +113,22 @@ To adapt to a wide variety of screen sizes, set breakpoints to control responsiv
115113
ResponsiveWrapper(
116114
child,
117115
maxWidth: 1200,
118-
minWidth: 450,
116+
minWidth: 480,
119117
defaultScale: true,
120118
breakpoints: [
121-
ResponsiveBreakpoint(breakpoint: 450, name: MOBILE),
122-
ResponsiveBreakpoint(breakpoint: 800, name: TABLET, scale: true),
123-
ResponsiveBreakpoint(breakpoint: 1000, name: TABLET, scale: true),
124-
ResponsiveBreakpoint(breakpoint: 1200, name: DESKTOP),
125-
ResponsiveBreakpoint(breakpoint: 2460, name: "4K", scale: true),
119+
ResponsiveBreakpoint.resize(breakpoint: 480, name: MOBILE),
120+
ResponsiveBreakpoint.autoScale(breakpoint: 800, name: TABLET),
121+
ResponsiveBreakpoint.resize(breakpoint: 1000, name: DESKTOP),
122+
ResponsiveBreakpoint.autoScale(breakpoint: 2460, name: '4K'),
126123
],
127124
)
128125
```
129126

130127
An arbitrary number of breakpoints can be set. Resizing/scaling behavior can be mixed and matched.
131-
- below 450: resize on small screens to avoid cramp and overflow errors.
132-
- 800-450: resize on phones for native widget sizes.
133-
- 1000-800: scale on tablets to avoid elements appearing too small.
134-
- 1200-1000: resize on desktops to use available space.
128+
- below 480: resize on small screens to avoid cramp and overflow errors.
129+
- 480-800: resize on phones for native widget sizes.
130+
- 800-1000: scale on tablets to avoid elements appearing too small.
131+
- 1000+: resize on desktops to use available space.
135132
- 2460+: scale on extra large 4K displays so text is still legible and widgets are not spaced too far apart.
136133

137134
## About

example

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.0.5
3+
version: 0.0.6
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)