|
|
|
|
@ -28,9 +28,10 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
double height = SizeConfig.heightMultiplier *
|
|
|
|
|
(SizeConfig.isHeightShort ? 40 : 30);
|
|
|
|
|
return Container(
|
|
|
|
|
height: SizeConfig.heightMultiplier *
|
|
|
|
|
(SizeConfig.isHeightShort ? 40 : 30),
|
|
|
|
|
height: height,
|
|
|
|
|
// height: 230,
|
|
|
|
|
child: Swiper(
|
|
|
|
|
onIndexChanged: (index) {
|
|
|
|
|
@ -42,7 +43,7 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return getSwipeWidget(widget.dashboardItemList, index);
|
|
|
|
|
return getSwipeWidget(widget.dashboardItemList, index, height);
|
|
|
|
|
},
|
|
|
|
|
itemCount: 3,
|
|
|
|
|
// itemHeight: 300,
|
|
|
|
|
@ -85,7 +86,7 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget getSwipeWidget(List<DashboardModel> dashboardItemList, int index) {
|
|
|
|
|
Widget getSwipeWidget(List<DashboardModel> dashboardItemList, int index, double height) {
|
|
|
|
|
if (index == 1)
|
|
|
|
|
return RoundedContainer(
|
|
|
|
|
raduis: 16,
|
|
|
|
|
@ -124,10 +125,16 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
|
|
|
|
|
shadowDy: 1,
|
|
|
|
|
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
|
|
|
|
|
child:
|
|
|
|
|
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 4,
|
|
|
|
|
@ -158,44 +165,41 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
|
|
|
|
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: SizeConfig.getHeightMultiplier(height: height) * (SizeConfig.isHeightShort?0: 7)
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
),),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: RowCounts(
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[0]
|
|
|
|
|
.kPIParameter,
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[0]
|
|
|
|
|
.value,
|
|
|
|
|
Colors.black),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: RowCounts(
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[1]
|
|
|
|
|
.kPIParameter,
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[1]
|
|
|
|
|
.value,
|
|
|
|
|
Colors.grey),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: RowCounts(
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[2]
|
|
|
|
|
.kPIParameter,
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[2]
|
|
|
|
|
.value,
|
|
|
|
|
Colors.red),
|
|
|
|
|
),
|
|
|
|
|
RowCounts(
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[0]
|
|
|
|
|
.kPIParameter,
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[0]
|
|
|
|
|
.value,
|
|
|
|
|
Colors.black),
|
|
|
|
|
RowCounts(
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[1]
|
|
|
|
|
.kPIParameter,
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[1]
|
|
|
|
|
.value,
|
|
|
|
|
Colors.grey),
|
|
|
|
|
RowCounts(
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[2]
|
|
|
|
|
.kPIParameter,
|
|
|
|
|
dashboardItemList[2]
|
|
|
|
|
.summaryoptions[2]
|
|
|
|
|
.value,
|
|
|
|
|
Colors.red),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
@ -206,6 +210,8 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Stack(children: [
|
|
|
|
|
Container(
|
|
|
|
|
padding:EdgeInsets.all(0),
|
|
|
|
|
|
|
|
|
|
child: GaugeChart(
|
|
|
|
|
_createReferralData(widget.dashboardItemList))),
|
|
|
|
|
Positioned(
|
|
|
|
|
@ -221,7 +227,7 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
top: MediaQuery.of(context).size.height * 0.13,
|
|
|
|
|
top: height * .35,
|
|
|
|
|
left: 0,
|
|
|
|
|
right: 0)
|
|
|
|
|
]),
|
|
|
|
|
|