11import 'package:flutter/material.dart' ;
2- import 'package:getflutter/colors/gf_color .dart' ;
2+ import 'package:getflutter/getflutter .dart' ;
33
44class GFAccordion extends StatefulWidget {
55 const GFAccordion (
66 {Key key,
77 this .child,
88 this .content,
9- this .collapsedTitlebackgroundColor = Colors .white ,
9+ this .collapsedTitlebackgroundColor = GFColors . WHITE ,
1010 this .expandedTitlebackgroundColor = const Color (0xFFE0E0E0 ),
1111 this .collapsedIcon = const Icon (Icons .keyboard_arrow_down),
1212 this .expandedIcon = const Icon (Icons .keyboard_arrow_up),
@@ -16,8 +16,8 @@ class GFAccordion extends StatefulWidget {
1616 this .contentbackgroundColor,
1717 this .contentPadding = const EdgeInsets .all (10 ),
1818 this .contentChild,
19- this .titleborderColor = const Border (),
20- this .contentBorderColor = const Border (),
19+ this .titleborder = const Border (),
20+ this .contentBorder = const Border (),
2121 this .margin})
2222 : super (key: key);
2323
@@ -30,11 +30,11 @@ class GFAccordion extends StatefulWidget {
3030 /// contentChild of type [Widget] is alternative to content key. content will get priority over contentChild
3131 final Widget contentChild;
3232
33- /// type of [Color] or [GFColor ] which is used to change the background color of the [GFAccordion] title when it is collapsed
34- final dynamic collapsedTitlebackgroundColor;
33+ /// type of [Color] or [GFColors ] which is used to change the background color of the [GFAccordion] title when it is collapsed
34+ final Color collapsedTitlebackgroundColor;
3535
36- /// type of [Color] or [GFColor ] which is used to change the background color of the [GFAccordion] title when it is expanded
37- final dynamic expandedTitlebackgroundColor;
36+ /// type of [Color] or [GFColors ] which is used to change the background color of the [GFAccordion] title when it is expanded
37+ final Color expandedTitlebackgroundColor;
3838
3939 ///collapsedIcon of type [Widget] which is used to show when the [GFAccordion] is collapsed
4040 final Widget collapsedIcon;
@@ -54,17 +54,17 @@ class GFAccordion extends StatefulWidget {
5454 ///descriptionPadding of type [EdgeInsets] which is used to set the padding of the [GFAccordion] description
5555 final EdgeInsets contentPadding;
5656
57- /// type of [Color] or [GFColor ] which is used to change the background color of the [GFAccordion] description
58- final dynamic contentbackgroundColor;
57+ /// type of [Color] or [GFColors ] which is used to change the background color of the [GFAccordion] description
58+ final Color contentbackgroundColor;
5959
6060 ///margin of type [EdgeInsets] which is used to set the margin of the [GFAccordion]
6161 final EdgeInsets margin;
6262
63- ///titleborderColor of type [Color] or [GFColor ] which is used to change the border color of title
64- final dynamic titleborderColor ;
63+ ///titleborderColor of type [Color] or [GFColors ] which is used to change the border color of title
64+ final Border titleborder ;
6565
66- ///contentBorderColor of type [Color] or [GFColor ] which is used to change the border color of content
67- final dynamic contentBorderColor ;
66+ ///contentBorderColor of type [Color] or [GFColors ] which is used to change the border color of content
67+ final Border contentBorder ;
6868
6969 @override
7070 _GFAccordionState createState () => _GFAccordionState ();
@@ -128,7 +128,7 @@ class _GFAccordionState extends State<GFAccordion>
128128 },
129129 child: Container (
130130 decoration: BoxDecoration (
131- border: widget.titleborderColor ,
131+ border: widget.titleborder ,
132132 color: showAccordion
133133 ? widget.expandedTitlebackgroundColor
134134 : widget.collapsedTitlebackgroundColor,
@@ -150,7 +150,7 @@ class _GFAccordionState extends State<GFAccordion>
150150 showAccordion
151151 ? Container (
152152 decoration: BoxDecoration (
153- border: widget.contentBorderColor ,
153+ border: widget.contentBorder ,
154154 color: widget.contentbackgroundColor ?? Colors .white70,
155155 ),
156156 width: MediaQuery .of (context).size.width,
0 commit comments