Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into patient_app_services
commit
c66357a4ce
@ -0,0 +1,61 @@
|
|||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||||
|
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
|
||||||
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
import 'package:hexcolor/hexcolor.dart';
|
||||||
|
|
||||||
|
class ExpandableSOAPWidget extends StatelessWidget {
|
||||||
|
final bool isExpanded;
|
||||||
|
final Widget child;
|
||||||
|
final Function onTap;
|
||||||
|
final headerTitle;
|
||||||
|
|
||||||
|
const ExpandableSOAPWidget(
|
||||||
|
{Key key, this.isExpanded, this.child, this.onTap, this.headerTitle})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 20, horizontal: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
border: Border.all(
|
||||||
|
color: HexColor('#707070'),
|
||||||
|
width: 0.30),
|
||||||
|
),
|
||||||
|
child: HeaderBodyExpandableNotifier(
|
||||||
|
headerWidget: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Texts(headerTitle,
|
||||||
|
variant: isExpanded ? "bodyText" : '',
|
||||||
|
bold: isExpanded ? true : false,
|
||||||
|
fontSize: 20,
|
||||||
|
color: Colors.black),
|
||||||
|
Icon(
|
||||||
|
FontAwesomeIcons.asterisk,
|
||||||
|
color: AppGlobal.appPrimaryColor,
|
||||||
|
size: 12,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: onTap,
|
||||||
|
child: Icon(
|
||||||
|
isExpanded ? EvaIcons.arrowIosUpwardOutline: EvaIcons.arrowIosDownwardOutline))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bodyWidget: child,
|
||||||
|
isExpand: isExpanded,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue