Skip to content

Commit

Permalink
Update Condition Required Value
Browse files Browse the repository at this point in the history
  • Loading branch information
rayliverified committed Jun 15, 2023
1 parent 96b8c24 commit f5c1dd5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class MyApp extends StatelessWidget {
background: Container(color: const Color(0xFFF5F5F5)),
child: ResponsiveScaledBox(
width: ResponsiveValue<double>(context, conditionalValues: [
const Condition.equals(name: MOBILE, value: 450),
const Condition.between(start: 800, end: 1100, value: 800),
const Condition.between(start: 1000, end: 1200, value: 1000),
Condition.equals(name: MOBILE, value: 450),
Condition.between(start: 800, end: 1100, value: 800),
Condition.between(start: 1000, end: 1200, value: 1000),
// There are no conditions for width over 1200
// because the `maxWidth` is set to 1200 via the MaxWidthBox.
]).value,
Expand Down
6 changes: 3 additions & 3 deletions lib/main_advanced.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ class MyApp extends StatelessWidget {
// Set the fixed width value based on the active breakpoint.
width: ResponsiveValue<double>(context,
conditionalValues: [
const Condition.equals(name: MOBILE, value: 450),
const Condition.between(
Condition.equals(name: MOBILE, value: 450),
Condition.between(
start: 800, end: 1100, value: 800),
const Condition.between(
Condition.between(
start: 1000, end: 1200, value: 1000),
// There are no conditions for width over 1200
// because the `maxWidth` is set to 1200 via the MaxWidthBox.
Expand Down

0 comments on commit f5c1dd5

Please sign in to comment.