@@ -6,21 +6,23 @@ class GFAccordion extends StatefulWidget {
66 {Key key,
77 this .titleChild,
88 this .content,
9- this .collapsedTitlebackgroundColor = GFColors .WHITE ,
10- this .expandedTitlebackgroundColor = const Color (0xFFE0E0E0 ),
9+ this .collapsedTitleBackgroundColor = GFColors .WHITE ,
10+ this .expandedTitleBackgroundColor = const Color (0xFFE0E0E0 ),
1111 this .collapsedIcon = const Icon (Icons .keyboard_arrow_down),
1212 this .expandedIcon = const Icon (Icons .keyboard_arrow_up),
1313 this .title,
1414 this .textStyle = const TextStyle (color: Colors .black, fontSize: 16 ),
1515 this .titlePadding = const EdgeInsets .all (10 ),
16- this .contentbackgroundColor ,
16+ this .contentBackgroundColor ,
1717 this .contentPadding = const EdgeInsets .all (10 ),
1818 this .contentChild,
19- this .titleborder = const Border (),
20- this .contentBorder = const Border (),
19+ this .titleBorder = const Border (),
20+ this .contentborder = const Border (),
2121 this .margin,
2222 this .showAccordion = false ,
23- this .onToggleCollapsed})
23+ this .onToggleCollapsed,
24+ this .titleBorderRadius = const BorderRadius .all (Radius .circular (0 )),
25+ this .contentBorderRadius = const BorderRadius .all (Radius .circular (0 ))})
2426 : super (key: key);
2527
2628 final Function (bool ) onToggleCollapsed;
@@ -38,10 +40,10 @@ class GFAccordion extends StatefulWidget {
3840 final Widget contentChild;
3941
4042 /// type of [Color] or [GFColors] which is used to change the background color of the [GFAccordion] title when it is collapsed
41- final Color collapsedTitlebackgroundColor ;
43+ final Color collapsedTitleBackgroundColor ;
4244
4345 /// type of [Color] or [GFColors] which is used to change the background color of the [GFAccordion] title when it is expanded
44- final Color expandedTitlebackgroundColor ;
46+ final Color expandedTitleBackgroundColor ;
4547
4648 ///collapsedIcon of type [Widget] which is used to show when the [GFAccordion] is collapsed
4749 final Widget collapsedIcon;
@@ -62,16 +64,22 @@ class GFAccordion extends StatefulWidget {
6264 final EdgeInsets contentPadding;
6365
6466 /// type of [Color] or [GFColors] which is used to change the background color of the [GFAccordion] description
65- final Color contentbackgroundColor ;
67+ final Color contentBackgroundColor ;
6668
6769 ///margin of type [EdgeInsets] which is used to set the margin of the [GFAccordion]
6870 final EdgeInsets margin;
6971
70- ///titleborderColor of type [Color] or [GFColors] which is used to change the border color of title
71- final Border titleborder ;
72+ ///titleBorderColor of type [Color] or [GFColors] which is used to change the border color of title
73+ final Border titleBorder ;
7274
7375 ///contentBorderColor of type [Color] or [GFColors] which is used to change the border color of content
74- final Border contentBorder;
76+ final Border contentborder;
77+
78+ ///titleBorderRadius of type [Radius] which is used to change the border radius of title
79+ final BorderRadius titleBorderRadius;
80+
81+ ///contentBorderRadius of type [Radius] which is used to change the border radius of content
82+ final BorderRadius contentBorderRadius;
7583
7684 @override
7785 _GFAccordionState createState () => _GFAccordionState ();
@@ -124,10 +132,11 @@ class _GFAccordionState extends State<GFAccordion>
124132 onTap: _toggleCollapsed,
125133 child: Container (
126134 decoration: BoxDecoration (
127- border: widget.titleborder,
135+ borderRadius: widget.titleBorderRadius,
136+ border: widget.titleBorder,
128137 color: showAccordion
129- ? widget.expandedTitlebackgroundColor
130- : widget.collapsedTitlebackgroundColor ,
138+ ? widget.expandedTitleBackgroundColor
139+ : widget.collapsedTitleBackgroundColor ,
131140 ),
132141 padding: widget.titlePadding,
133142 child: Row (
@@ -146,8 +155,9 @@ class _GFAccordionState extends State<GFAccordion>
146155 showAccordion
147156 ? Container (
148157 decoration: BoxDecoration (
149- border: widget.contentBorder,
150- color: widget.contentbackgroundColor ?? Colors .white70,
158+ borderRadius: widget.contentBorderRadius,
159+ border: widget.contentborder,
160+ color: widget.contentBackgroundColor ?? Colors .white70,
151161 ),
152162 width: MediaQuery .of (context).size.width,
153163 padding: widget.contentPadding,
0 commit comments