File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
packages/flutter/lib/src/widgets Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -81,22 +81,20 @@ class Visibility extends StatelessWidget {
81
81
82
82
/// Control whether the given [child] is [visible] .
83
83
///
84
- /// The [child] and [replacement] arguments must not be null.
85
- ///
86
84
/// This is equivalent to the default [Visibility] constructor with all
87
85
/// "maintain" fields set to true. This constructor should be used in place of
88
86
/// an [Opacity] widget that only takes on values of `0.0` or `1.0` , as it
89
87
/// avoids extra compositing when fully opaque.
90
88
const Visibility .maintain ({
91
89
super .key,
92
90
required this .child,
93
- this .replacement = const SizedBox .shrink (),
94
91
this .visible = true ,
95
92
}) : maintainState = true ,
96
93
maintainAnimation = true ,
97
94
maintainSize = true ,
98
95
maintainSemantics = true ,
99
- maintainInteractivity = true ;
96
+ maintainInteractivity = true ,
97
+ replacement = const SizedBox .shrink (); // Unused since maintainState is always true.
100
98
101
99
/// The widget to show or hide, as controlled by [visible] .
102
100
///
You can’t perform that action at this time.
0 commit comments