From 903eaba132fab844ec8bdd4ee0e60f288293fc0a Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Thu, 28 May 2020 12:34:10 +0300 Subject: [PATCH] deete --- lib/widgets/patients/list_item.dart | 91 ----------------------------- 1 file changed, 91 deletions(-) delete mode 100644 lib/widgets/patients/list_item.dart diff --git a/lib/widgets/patients/list_item.dart b/lib/widgets/patients/list_item.dart deleted file mode 100644 index 069e2fa5..00000000 --- a/lib/widgets/patients/list_item.dart +++ /dev/null @@ -1,91 +0,0 @@ -/* - *@author: Amjad Amireh - *@Date:27/5/2020 - *@param:listItems , headerTitle - *@return:ListItem Expand - - *@desc: - */ -import 'package:flutter/material.dart'; - -class ListItem extends StatefulWidget{ - - ListlistItems; - String headerTitle; - - ListItem(this.headerTitle,this.listItems); - - @override - StatecreateState() - { - return ListItemState(); - } -} -class ListItemState extends State -{ - bool isExpand=false; - @override - void initState() { - super.initState(); - isExpand=false; - } - @override - Widget build(BuildContext context) { - ListlistItem=this.widget.listItems; - return Padding( - padding: (isExpand==true)?const EdgeInsets.all(8.0):const EdgeInsets.all(12.0), - child: Container( - decoration:BoxDecoration( - color: Colors.white, - borderRadius: (isExpand!=true)?BorderRadius.all(Radius.circular(50)):BorderRadius.all(Radius.circular(25)), - - - - - - ), - child: ExpansionTile( - key: PageStorageKey(this.widget.headerTitle), - title: Container( - width: double.infinity, - - child: Text(this.widget.headerTitle,style: TextStyle(fontSize: (isExpand!=true)?18:22,color: Colors.black,fontWeight: FontWeight.bold),)), - - trailing: (isExpand==true)?Icon(Icons.keyboard_arrow_up,color: Colors.black,):Icon(Icons.keyboard_arrow_down,color: Colors.black), - onExpansionChanged: (value){ - setState(() { - isExpand=value; - }); - }, - children: [ - for(final item in listItem) - Padding( - padding: const EdgeInsets.all(8.0), - child: InkWell( - onTap: (){ - print(Text("Selected Item $item "+this.widget.headerTitle )); - //========Stop Snak bar=========== Scaffold.of(context).showSnackBar(SnackBar(backgroundColor: Colors.black,duration:Duration(microseconds: 500),content: Text("Selected Item $item "+this.widget.headerTitle ))); - }, - child: Container( - width: double.infinity, - decoration:BoxDecoration( - color: Colors.white, - - border: Border(top: BorderSide(color: Theme.of(context).dividerColor)) - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Text(item,style: TextStyle(color: Colors.black),), - - )), - ), - ) - - - ], - - ), - ), - ); - } -} \ No newline at end of file