|
|
|
@ -48,79 +48,82 @@ class _AppExpandableNotifier extends State<AppExpandableNotifier> {
|
|
|
|
|
_title = _title.toLowerCase().capitalizeFirstofEach;
|
|
|
|
|
}
|
|
|
|
|
return ExpandableNotifier(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
child: widget.headerWidget,
|
|
|
|
|
),
|
|
|
|
|
ScrollOnExpand(
|
|
|
|
|
scrollOnExpand: true,
|
|
|
|
|
scrollOnCollapse: false,
|
|
|
|
|
child: ExpandablePanel(
|
|
|
|
|
hasIcon: false,
|
|
|
|
|
theme: const ExpandableThemeData(
|
|
|
|
|
headerAlignment: ExpandablePanelHeaderAlignment.center,
|
|
|
|
|
tapBodyToCollapse: true,
|
|
|
|
|
),
|
|
|
|
|
header: Padding(
|
|
|
|
|
padding: const EdgeInsets.only(top: 12, bottom: 12, left: 21, right: 21),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.expandFlag = !widget.expandFlag;
|
|
|
|
|
widget.controller.expanded = widget.expandFlag;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
if (_mainTitle.isNotEmpty && widget.isTitleSingleLine)
|
|
|
|
|
Text(
|
|
|
|
|
_mainTitle,
|
|
|
|
|
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 1),
|
|
|
|
|
),
|
|
|
|
|
if (_title.isNotEmpty && !widget.isTitleSingleLine)
|
|
|
|
|
Text(
|
|
|
|
|
_title,
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2E303A), letterSpacing: -1.44, height: 25 / 24),
|
|
|
|
|
),
|
|
|
|
|
if (_subTitle.isNotEmpty && !widget.isTitleSingleLine)
|
|
|
|
|
Text(
|
|
|
|
|
_subTitle,
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 23 / 12),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
child: widget.headerWidget,
|
|
|
|
|
),
|
|
|
|
|
ScrollOnExpand(
|
|
|
|
|
scrollOnExpand: true,
|
|
|
|
|
scrollOnCollapse: false,
|
|
|
|
|
child: ExpandablePanel(
|
|
|
|
|
hasIcon: false,
|
|
|
|
|
theme: const ExpandableThemeData(
|
|
|
|
|
headerAlignment: ExpandablePanelHeaderAlignment.center,
|
|
|
|
|
tapBodyToCollapse: true,
|
|
|
|
|
),
|
|
|
|
|
header: Padding(
|
|
|
|
|
padding: const EdgeInsets.only(top: 12, bottom: 12, left: 21, right: 21),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.expandFlag = !widget.expandFlag;
|
|
|
|
|
widget.controller.expanded = widget.expandFlag;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
if (_mainTitle.isNotEmpty && widget.isTitleSingleLine)
|
|
|
|
|
Text(
|
|
|
|
|
_mainTitle,
|
|
|
|
|
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 1),
|
|
|
|
|
),
|
|
|
|
|
if (_title.isNotEmpty && !widget.isTitleSingleLine)
|
|
|
|
|
Text(
|
|
|
|
|
_title,
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2E303A), letterSpacing: -1.44, height: 25 / 24),
|
|
|
|
|
),
|
|
|
|
|
if (_subTitle.isNotEmpty && !widget.isTitleSingleLine)
|
|
|
|
|
Text(
|
|
|
|
|
_subTitle,
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 23 / 12),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Icon(
|
|
|
|
|
widget.expandFlag ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
|
|
|
|
|
color: Color(0xff2E303A),
|
|
|
|
|
// size: 30.0,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Icon(
|
|
|
|
|
widget.expandFlag ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
|
|
|
|
|
color: Color(0xff2E303A),
|
|
|
|
|
// size: 30.0,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
collapsed: widget.collapsed ?? Container(),
|
|
|
|
|
expanded: widget.bodyWidget,
|
|
|
|
|
builder: (_, collapsed, expanded) {
|
|
|
|
|
return Expandable(
|
|
|
|
|
controller: widget.controller,
|
|
|
|
|
collapsed: collapsed,
|
|
|
|
|
expanded: expanded,
|
|
|
|
|
theme: const ExpandableThemeData(crossFadePoint: 0),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
collapsed: widget.collapsed ?? Container(),
|
|
|
|
|
expanded: widget.bodyWidget,
|
|
|
|
|
builder: (_, collapsed, expanded) {
|
|
|
|
|
return Expandable(
|
|
|
|
|
controller: widget.controller,
|
|
|
|
|
collapsed: collapsed,
|
|
|
|
|
expanded: expanded,
|
|
|
|
|
theme: const ExpandableThemeData(crossFadePoint: 0),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|