@@ -4,7 +4,7 @@ import 'package:getflutter/getflutter.dart';
44class GFAccordion extends StatefulWidget {
55 const GFAccordion (
66 {Key key,
7- this .child ,
7+ this .titleChild ,
88 this .content,
99 this .collapsedTitlebackgroundColor = GFColors .WHITE ,
1010 this .expandedTitlebackgroundColor = const Color (0xFFE0E0E0 ),
@@ -21,8 +21,8 @@ class GFAccordion extends StatefulWidget {
2121 this .margin})
2222 : super (key: key);
2323
24- /// child of type [Widget] is alternative to title key. title will get priority over child
25- final Widget child ;
24+ /// child of type [Widget] is alternative to title key. title will get priority over titleChild
25+ final Widget titleChild ;
2626
2727 /// content of type[String] which shows the messages after the [GFAccordion] is expanded
2828 final String content;
@@ -42,7 +42,7 @@ class GFAccordion extends StatefulWidget {
4242 ///expandedIcon of type[Widget] which is used when the [GFAccordion] is expanded
4343 final Widget expandedIcon;
4444
45- /// text of type [String] is alternative to child. text will get priority over child
45+ /// text of type [String] is alternative to child. text will get priority over titleChild
4646 final String title;
4747
4848 /// textStyle of type [textStyle] will be applicable to text only and not for the child
@@ -140,7 +140,7 @@ class _GFAccordionState extends State<GFAccordion>
140140 Expanded (
141141 child: widget.title != null
142142 ? Text (widget.title, style: widget.textStyle)
143- : (widget.child ?? Container ()),
143+ : (widget.titleChild ?? Container ()),
144144 ),
145145 showAccordion ? widget.expandedIcon : widget.collapsedIcon
146146 ],
0 commit comments