@@ -51,6 +51,8 @@ void main() {
51
51
// same as wrapSpacing
52
52
Container foo = tester.firstWidget (find.byType (Container ));
53
53
expect (foo.margin, const EdgeInsets .only (right: 10.0 ));
54
+ // verify separator counts
55
+ expect (find.byType (VerticalDivider ), findsNothing);
54
56
});
55
57
56
58
testWidgets ('FormBuilderCheckboxGroup -- decoration vertical' ,
@@ -75,8 +77,49 @@ void main() {
75
77
// same as wrapSpacing
76
78
Container foo = tester.firstWidget (find.byType (Container ));
77
79
expect (foo.margin, const EdgeInsets .only (bottom: 10.0 ));
80
+ // verify separator counts
81
+ expect (find.byType (VerticalDivider ), findsNothing);
78
82
});
79
83
84
+ testWidgets ('FormBuilderCheckboxGroup -- separator horizontal' ,
85
+ (WidgetTester tester) async {
86
+ const widgetName = 'cbg1' ;
87
+ final testWidget = FormBuilderCheckboxGroup <int >(
88
+ name: widgetName,
89
+ orientation: OptionsOrientation .horizontal,
90
+ wrapSpacing: 10.0 ,
91
+ options: const [
92
+ FormBuilderFieldOption (key: ValueKey ('1' ), value: 1 ),
93
+ FormBuilderFieldOption (key: ValueKey ('2' ), value: 2 ),
94
+ FormBuilderFieldOption (key: ValueKey ('3' ), value: 2 ),
95
+ ],
96
+ separator: const VerticalDivider (width: 8.0 , color: Colors .red),
97
+ );
98
+ await tester.pumpWidget (buildTestableFieldWidget (testWidget));
99
+
100
+ // verify separator counts
101
+ expect (find.byType (VerticalDivider ), findsNWidgets (2 ));
102
+ });
103
+
104
+ testWidgets ('FormBuilderCheckboxGroup -- separator vertical' ,
105
+ (WidgetTester tester) async {
106
+ const widgetName = 'cbg1' ;
107
+ final testWidget = FormBuilderCheckboxGroup <int >(
108
+ name: widgetName,
109
+ orientation: OptionsOrientation .vertical,
110
+ wrapSpacing: 10.0 ,
111
+ options: const [
112
+ FormBuilderFieldOption (key: ValueKey ('1' ), value: 1 ),
113
+ FormBuilderFieldOption (key: ValueKey ('2' ), value: 2 ),
114
+ FormBuilderFieldOption (key: ValueKey ('3' ), value: 2 ),
115
+ ],
116
+ separator: const VerticalDivider (width: 8.0 , color: Colors .red),
117
+ );
118
+ await tester.pumpWidget (buildTestableFieldWidget (testWidget));
119
+
120
+ // verify separator counts
121
+ expect (find.byType (VerticalDivider ), findsNWidgets (2 ));
122
+ });
80
123
testWidgets ('FormBuilderCheckboxGroup -- didChange' ,
81
124
(WidgetTester tester) async {
82
125
const fieldName = 'cbg1' ;
0 commit comments