-
Notifications
You must be signed in to change notification settings - Fork 157
Closed
Description
Error:
A conditional value was caught referencing a nonexistent breakpoint.
ResponsiveValue requires a parent ResponsiveBreakpoint to reference breakpoints. Add a ResponsiveBreakpoint or remove breakpoint references.
I'm trying to migrate to 1.1.1, I just want to scale from 0 to 450 and resize when above 450, it worked perfectly on 0.2.0, but I cannot get it to work on 1.1.1 despite following the migration guide.
0.2.0 code:
Widget responsiveness(BuildContext context, Widget child) {
return ResponsiveWrapper.builder(
child,
defaultScale: true,
minWidth: 450,
breakpoints: [
const ResponsiveBreakpoint.resize(450, name: MOBILE),
],
);
}
1.1.1 code:
Widget responsiveness(BuildContext context, Widget child) {
return ResponsiveBreakpoints.builder(
useShortestSide: true,
breakpoints: [
const Breakpoint(
start: 0,
end: 450,
name: MOBILE,
),
const Breakpoint(
start: 450.1,
end: double.infinity,
name: 'rest',
),
],
child: ResponsiveScaledBox(
width: ResponsiveValue<double>(
context,
conditionalValues: [
Condition.equals(name: MOBILE, value: 450),
],
).value,
child: child,
),
);
}
Metadata
Metadata
Assignees
Labels
No labels