From da6f238c89cc80d7e7888188d2c7d4e29ec40592 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Wed, 12 Aug 2020 10:41:23 +0300 Subject: [PATCH] family files changes --- lib/widgets/drawer/app_drawer_widget.dart | 58 ++++++++++++---------- lib/widgets/drawer/drawer_item_widget.dart | 10 +++- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index b112af23..3a76e924 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -136,6 +136,7 @@ class _AppDrawerState extends State { textColor: Colors.red, iconColor: Colors.red, bottomLine: false, + sideArrow: true, ), onTap: () { Navigator.of(context).pushNamed( @@ -177,34 +178,37 @@ class _AppDrawerState extends State { children: snapshot.data .getAllSharedRecordsByStatusList .map((result) { - return Padding( - padding: - EdgeInsets.only( - bottom: 5), - child: Row( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - Expanded( - child: Icon(Icons - .person), - ), - Expanded( - flex: 7, - child: Column( - crossAxisAlignment: - CrossAxisAlignment + return result.status == 3 + ? Padding( + padding: EdgeInsets + .only( + bottom: + 5), + child: Row( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: < + Widget>[ + Expanded( + child: Icon( + Icons + .person), + ), + Expanded( + flex: 7, + child: Column( + crossAxisAlignment: CrossAxisAlignment .start, - children: < - Widget>[ - Text(result - .patientName), - Text('File No:' + - result.iD.toString()), - ])), - ], - )); + children: < + Widget>[ + Text(result.patientName), + Text('File No:' + + result.iD.toString()), + ])), + ], + )) + : SizedBox(); }).toList())); } }, diff --git a/lib/widgets/drawer/drawer_item_widget.dart b/lib/widgets/drawer/drawer_item_widget.dart index 6fb245b7..e5a1eb50 100644 --- a/lib/widgets/drawer/drawer_item_widget.dart +++ b/lib/widgets/drawer/drawer_item_widget.dart @@ -12,11 +12,13 @@ class DrawerItem extends StatefulWidget { final Color textColor; final Color iconColor; final bool bottomLine; + final bool sideArrow; DrawerItem(this.title, this.icon, {this.textColor = Colors.black, this.iconColor = Colors.black87, this.subTitle = '', - this.bottomLine = true}); + this.bottomLine = true, + this.sideArrow = false}); @override _DrawerItemState createState() => _DrawerItemState(); @@ -66,6 +68,12 @@ class _DrawerItemState extends State { ) : SizedBox(), ])), + widget.sideArrow == true + ? Expanded( + flex: 1, + child: + Icon(Icons.keyboard_arrow_right, color: Colors.red)) + : Expanded(flex: 1, child: SizedBox()) ], ), ));