File tree Expand file tree Collapse file tree 8 files changed +32
-20
lines changed Expand file tree Collapse file tree 8 files changed +32
-20
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,12 @@ class _AlertDialogControlState extends State<AlertDialogControl> {
44
44
45
45
Widget _createAlertDialog () {
46
46
bool disabled = widget.control.isDisabled || widget.parentDisabled;
47
- var titleCtrls = widget.children.where ((c) => c.name == "title" );
48
- var contentCtrls = widget.children.where ((c) => c.name == "content" );
49
- var actionCtrls = widget.children.where ((c) => c.name == "action" );
47
+ var titleCtrls =
48
+ widget.children.where ((c) => c.name == "title" && c.isVisible);
49
+ var contentCtrls =
50
+ widget.children.where ((c) => c.name == "content" && c.isVisible);
51
+ var actionCtrls =
52
+ widget.children.where ((c) => c.name == "action" && c.isVisible);
50
53
final actionsAlignment = parseMainAxisAlignment (
51
54
widget.control, "actionsAlignment" , MainAxisAlignment .start);
52
55
if (titleCtrls.isEmpty && contentCtrls.isEmpty && actionCtrls.isEmpty) {
Original file line number Diff line number Diff line change @@ -41,9 +41,12 @@ class _BannerControlState extends State<BannerControl> {
41
41
42
42
Widget _createBanner () {
43
43
bool disabled = widget.control.isDisabled || widget.parentDisabled;
44
- var leadingCtrls = widget.children.where ((c) => c.name == "leading" );
45
- var contentCtrls = widget.children.where ((c) => c.name == "content" );
46
- var actionCtrls = widget.children.where ((c) => c.name == "action" );
44
+ var leadingCtrls =
45
+ widget.children.where ((c) => c.name == "leading" && c.isVisible);
46
+ var contentCtrls =
47
+ widget.children.where ((c) => c.name == "content" && c.isVisible);
48
+ var actionCtrls =
49
+ widget.children.where ((c) => c.name == "action" && c.isVisible);
47
50
48
51
if (contentCtrls.isEmpty) {
49
52
return const ErrorControl ("Banner does not have any content." );
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ class ContainerControl extends StatelessWidget {
28
28
29
29
var bgColor = HexColor .fromString (
30
30
Theme .of (context), control.attrString ("bgColor" , "" )! );
31
- var contentCtrls = children.where ((c) => c.name == "content" );
31
+ var contentCtrls =
32
+ children.where ((c) => c.name == "content" && c.isVisible);
32
33
bool disabled = control.isDisabled || parentDisabled;
33
34
34
35
return constrainedControl (
Original file line number Diff line number Diff line change @@ -61,10 +61,10 @@ class _DropdownControlState extends State<DropdownControl> {
61
61
_value = value;
62
62
}
63
63
64
- var prefixControls =
65
- itemsView.children. where ((c) => c.name == "prefix" );
66
- var suffixControls =
67
- itemsView.children. where ((c) => c.name == "suffix" );
64
+ var prefixControls = itemsView.children
65
+ . where ((c) => c.name == "prefix" && c.isVisible );
66
+ var suffixControls = itemsView.children
67
+ . where ((c) => c.name == "suffix" && c.isVisible );
68
68
69
69
var dropDown = DropdownButtonFormField <String >(
70
70
autofocus: autofocus,
Original file line number Diff line number Diff line change @@ -75,8 +75,10 @@ class _NavigationRailControlState extends State<NavigationRailControl> {
75
75
widget.control.attrString ("labelType" , "" )! .toLowerCase (),
76
76
orElse: () => NavigationRailLabelType .all);
77
77
78
- var leadingCtrls = widget.children.where ((c) => c.name == "leading" );
79
- var trailingCtrls = widget.children.where ((c) => c.name == "trailing" );
78
+ var leadingCtrls =
79
+ widget.children.where ((c) => c.name == "leading" && c.isVisible);
80
+ var trailingCtrls =
81
+ widget.children.where ((c) => c.name == "trailing" && c.isVisible);
80
82
81
83
var extended = widget.control.attrBool ("extended" , false )! ;
82
84
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ class RadioGroupControl extends StatelessWidget {
22
22
Widget build (BuildContext context) {
23
23
debugPrint ("RadioGroupControl build: ${control .id }" );
24
24
25
- var contentCtrls = children.where ((c) => c.name == "content" );
25
+ var contentCtrls =
26
+ children.where ((c) => c.name == "content" && c.isVisible);
26
27
bool disabled = control.isDisabled || parentDisabled;
27
28
28
29
if (contentCtrls.isEmpty) {
Original file line number Diff line number Diff line change @@ -122,8 +122,8 @@ class _TabsControlState extends State<TabsControl>
122
122
var text = tabView.control.attrString ("text" );
123
123
var icon =
124
124
getMaterialIcon (tabView.control.attrString ("icon" , "" )! );
125
- var tabContentCtrls =
126
- tabView.children. where ((c) => c.name == "tab_content" );
125
+ var tabContentCtrls = tabView.children
126
+ . where ((c) => c.name == "tab_content" && c.isVisible );
127
127
128
128
Widget tabChild;
129
129
List <Widget > widgets = [];
@@ -159,8 +159,8 @@ class _TabsControlState extends State<TabsControl>
159
159
child: TabBarView (
160
160
controller: _tabController,
161
161
children: viewModel.controlViews.map ((tabView) {
162
- var contentCtrls =
163
- tabView.children. where ((c) => c.name == "content" );
162
+ var contentCtrls = tabView.children
163
+ . where ((c) => c.name == "content" && c.isVisible );
164
164
if (contentCtrls.isEmpty) {
165
165
return const SizedBox .shrink ();
166
166
}
Original file line number Diff line number Diff line change @@ -93,8 +93,10 @@ class _TextFieldControlState extends State<TextFieldControl> {
93
93
_controller.text = value;
94
94
}
95
95
96
- var prefixControls = widget.children.where ((c) => c.name == "prefix" );
97
- var suffixControls = widget.children.where ((c) => c.name == "suffix" );
96
+ var prefixControls =
97
+ widget.children.where ((c) => c.name == "prefix" && c.isVisible);
98
+ var suffixControls =
99
+ widget.children.where ((c) => c.name == "suffix" && c.isVisible);
98
100
99
101
bool shiftEnter = widget.control.attrBool ("shiftEnter" , false )! ;
100
102
bool multiline =
You can’t perform that action at this time.
0 commit comments