@@ -51,6 +51,8 @@ void main() {
5151 // same as wrapSpacing
5252 Container foo = tester.firstWidget (find.byType (Container ));
5353 expect (foo.margin, const EdgeInsets .only (right: 10.0 ));
54+ // verify separator counts
55+ expect (find.byType (VerticalDivider ), findsNothing);
5456 });
5557
5658 testWidgets ('FormBuilderCheckboxGroup -- decoration vertical' ,
@@ -75,8 +77,49 @@ void main() {
7577 // same as wrapSpacing
7678 Container foo = tester.firstWidget (find.byType (Container ));
7779 expect (foo.margin, const EdgeInsets .only (bottom: 10.0 ));
80+ // verify separator counts
81+ expect (find.byType (VerticalDivider ), findsNothing);
7882 });
7983
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+ });
80123 testWidgets ('FormBuilderCheckboxGroup -- didChange' ,
81124 (WidgetTester tester) async {
82125 const fieldName = 'cbg1' ;
0 commit comments