@@ -142,8 +142,8 @@ class ResponsiveVisibility extends StatelessWidget {
142142 conditions.sort ((a, b) => a.breakpoint.compareTo (b.breakpoint));
143143 // Get visible value from active condition.
144144 visibleValue = ResponsiveValue (context,
145- defaultValue: visibleValue,
146- valueWhen : [ Condition . smallerThan (name : DESKTOP , value : false )]) .value;
145+ defaultValue: visibleValue, valueWhen : conditions)
146+ .value;
147147
148148 return Visibility (
149149 child: child,
@@ -175,19 +175,19 @@ class Condition<T> {
175175 assert (breakpoint == null || name == null ),
176176 assert ((condition == Conditional .EQUALS ) ? name != null : true );
177177
178- Condition .equals ({@required String name, @required T value})
178+ Condition .equals ({@required String name, T value})
179179 : this .breakpoint = null ,
180180 this .name = name,
181181 this .condition = Conditional .EQUALS ,
182182 this .value = value;
183183
184- Condition .largerThan ({int breakpoint, String name, @required T value})
184+ Condition .largerThan ({int breakpoint, String name, T value})
185185 : this .breakpoint = breakpoint,
186186 this .name = name,
187187 this .condition = Conditional .LARGER_THAN ,
188188 this .value = value;
189189
190- Condition .smallerThan ({int breakpoint, String name, @required T value})
190+ Condition .smallerThan ({int breakpoint, String name, T value})
191191 : this .breakpoint = breakpoint,
192192 this .name = name,
193193 this .condition = Conditional .SMALLER_THAN ,
0 commit comments