@@ -261,7 +261,7 @@ abstract class WidgetController extends Controller with HasStyles {
261
261
'flex' : (value) => flex = Utils .optionalInt (value, min: 1 ),
262
262
'expanded' : (value) => expanded = Utils .getBool (value, fallback: false ),
263
263
'visible' : (value) => visible = Utils .getBool (value, fallback: true ),
264
- 'opacity' : (value) => opacity = Utils .getValidOpacity (value),
264
+ 'opacity' : (value) => opacity = Utils .optionalDouble (value, min : 0 , max : 1 ),
265
265
'visibilityTransitionDuration' : (value) =>
266
266
visibilityTransitionDuration = Utils .getDuration (value),
267
267
'elevation' : (value) =>
@@ -487,7 +487,7 @@ abstract class EnsembleWidgetController extends EnsembleController
487
487
'flexMode' : (value) => flexMode = FlexMode .values.from (value),
488
488
'flex' : (value) => flex = Utils .optionalInt (value, min: 1 ),
489
489
'visible' : (value) => visible = Utils .getBool (value, fallback: true ),
490
- 'opacity' : (value) => opacity = Utils .getValidOpacity (value),
490
+ 'opacity' : (value) => opacity = Utils .optionalDouble (value, min : 0 , max : 1 ),
491
491
'visibilityTransitionDuration' : (value) =>
492
492
visibilityTransitionDuration = Utils .getDuration (value),
493
493
'textDirection' : (value) => textDirection = Utils .getTextDirection (value),
0 commit comments