diff --git a/lib/main.dart b/lib/main.dart index 33dc0dc..79f8bfd 100755 --- a/lib/main.dart +++ b/lib/main.dart @@ -196,7 +196,7 @@ class MyApp extends StatelessWidget { MyPackagesResultScreen(), Routes.myPackagesFilterScreen: (ctx) => MyPackageFilterScreen(), Routes.myPackagesDetailScreen: (ctx) => - MyPackagesDetailScreen(), + PackageDetailScreen(), Routes.packagesTransferScreen: (ctx) => PackageTransferScreen(), Routes.myPackagesHistoryScreen: (ctx) => MyPackagesHistoryScreen(), diff --git a/lib/pages/MyPackagesPages/my_packages_detail_screen.dart b/lib/pages/MyPackagesPages/my_packages_detail_screen.dart index 59ce82c..a17ffd3 100755 --- a/lib/pages/MyPackagesPages/my_packages_detail_screen.dart +++ b/lib/pages/MyPackagesPages/my_packages_detail_screen.dart @@ -8,18 +8,18 @@ import 'package:provider/provider.dart'; import '../../providers/connectivity.dart'; import '../../widgets/Global/internet_error.dart'; -class MyPackagesDetailScreen extends StatefulWidget { +class PackageDetailScreen extends StatefulWidget { final String? testResultId; - MyPackagesDetailScreen({ + PackageDetailScreen({ this.testResultId, }); @override - _MyPackagesDetailScreenState createState() => _MyPackagesDetailScreenState(); + _PackageDetailScreenState createState() => _PackageDetailScreenState(); } -class _MyPackagesDetailScreenState extends State { +class _PackageDetailScreenState extends State { bool isInit = true; bool isEmpty = false; PackageDetailObject? datas; @@ -85,7 +85,7 @@ class _MyPackagesDetailScreenState extends State { ? Center( child: Text('This Package does\'nt exists!'), ) - : MyPackageDetailsDataBox( + : PackageDetailsDataBox( datas: datas!, deviceBlockSize: _deviceBlockSize, push: () { diff --git a/lib/pages/PackagePages/package_detail_screen.dart b/lib/pages/PackagePages/package_detail_screen.dart index 7194a90..dd1c406 100755 --- a/lib/pages/PackagePages/package_detail_screen.dart +++ b/lib/pages/PackagePages/package_detail_screen.dart @@ -1,103 +1,103 @@ -import 'package:cssd/config/routes.dart'; -import 'package:cssd/models/package_model.dart'; -import 'package:cssd/providers/packages.dart'; -import 'package:cssd/widgets/PackageScreens/Details/package_detail_box.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../providers/connectivity.dart'; -import '../../widgets/Global/internet_error.dart'; - -class PackageDetailScreen extends StatefulWidget { - @override - _PackageDetailScreenState createState() => _PackageDetailScreenState(); -} - -class _PackageDetailScreenState extends State { - bool isInit = true; - bool isEmpty = false; - PackageDetailObject? datas; - - @override - void didChangeDependencies() async { - if (isInit) { - var _id = ModalRoute.of(context)!.settings.arguments; - await Provider.of(context, listen: false) - .showPackageResult(_id.toString()) - .then( - (result) { - setState( - () { - datas = result; - isInit = false; - if (result.id == 'null') - isEmpty = true; - else - isEmpty = false; - }, - ); - }, - ); - } - super.didChangeDependencies(); - } - - @override - Widget build(BuildContext context) { - final _media = MediaQuery.of(context); - final double _devicewidth = _media.size.width; - final double _deviceBlockSize = _devicewidth / 100; - return SafeArea( - child: Scaffold( - appBar: AppBar( - titleSpacing: -10, - title: Text( - 'Packages', - style: TextStyle( - color: Colors.white, - ), - ), - backgroundColor: Colors.black, - leading: IconButton( - icon: Icon( - Icons.keyboard_arrow_left, - color: Colors.white, - size: 35, - ), - onPressed: () => Navigator.of(context).pop(), - ), - ), - body: Consumer( - builder: (ct, connection, _) { - return connection.conStatus != 'offline' - ? isInit - ? Center( - child: CircularProgressIndicator( - color: Colors.black, - ), - ) - : isEmpty - ? Center( - child: Text('This Package does\'nt exists!'), - ) - : PackageDetailsDataBox( - datas: datas!, - deviceBlockSize: _deviceBlockSize, - goToAddLabelPage: () { - Navigator.pushNamed( - context, - Routes.labelAddScreen, - arguments: { - "id": datas!.id, - "name": datas!.name - }, - ); - }, - ) - : ConnectionErrorBox(); - }, - ), - ), - ); - } -} +// import 'package:cssd/config/routes.dart'; +// import 'package:cssd/models/package_model.dart'; +// import 'package:cssd/providers/packages.dart'; +// import 'package:cssd/widgets/PackageScreens/Details/package_detail_box.dart'; +// import 'package:flutter/material.dart'; +// import 'package:provider/provider.dart'; +// +// import '../../providers/connectivity.dart'; +// import '../../widgets/Global/internet_error.dart'; +// +// class PackageDetailScreen extends StatefulWidget { +// @override +// _PackageDetailScreenState createState() => _PackageDetailScreenState(); +// } +// +// class _PackageDetailScreenState extends State { +// bool isInit = true; +// bool isEmpty = false; +// PackageDetailObject? datas; +// +// @override +// void didChangeDependencies() async { +// if (isInit) { +// var _id = ModalRoute.of(context)!.settings.arguments; +// await Provider.of(context, listen: false) +// .showPackageResult(_id.toString()) +// .then( +// (result) { +// setState( +// () { +// datas = result; +// isInit = false; +// if (result.id == 'null') +// isEmpty = true; +// else +// isEmpty = false; +// }, +// ); +// }, +// ); +// } +// super.didChangeDependencies(); +// } +// +// @override +// Widget build(BuildContext context) { +// final _media = MediaQuery.of(context); +// final double _devicewidth = _media.size.width; +// final double _deviceBlockSize = _devicewidth / 100; +// return SafeArea( +// child: Scaffold( +// appBar: AppBar( +// titleSpacing: -10, +// title: Text( +// 'Packages', +// style: TextStyle( +// color: Colors.white, +// ), +// ), +// backgroundColor: Colors.black, +// leading: IconButton( +// icon: Icon( +// Icons.keyboard_arrow_left, +// color: Colors.white, +// size: 35, +// ), +// onPressed: () => Navigator.of(context).pop(), +// ), +// ), +// body: Consumer( +// builder: (ct, connection, _) { +// return connection.conStatus != 'offline' +// ? isInit +// ? Center( +// child: CircularProgressIndicator( +// color: Colors.black, +// ), +// ) +// : isEmpty +// ? Center( +// child: Text('This Package does\'nt exists!'), +// ) +// : PackageDetailsDataBox( +// datas: datas!, +// deviceBlockSize: _deviceBlockSize, +// goToAddLabelPage: () { +// Navigator.pushNamed( +// context, +// Routes.labelAddScreen, +// arguments: { +// "id": datas!.id, +// "name": datas!.name +// }, +// ); +// }, +// ) +// : ConnectionErrorBox(); +// }, +// ), +// ), +// ); +// } +// } diff --git a/lib/widgets/MyPackagesScreens/Detail/my_packages_detail_box_widget.dart b/lib/widgets/MyPackagesScreens/Detail/my_packages_detail_box_widget.dart index 39978e7..759e542 100755 --- a/lib/widgets/MyPackagesScreens/Detail/my_packages_detail_box_widget.dart +++ b/lib/widgets/MyPackagesScreens/Detail/my_packages_detail_box_widget.dart @@ -10,8 +10,8 @@ import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; -class MyPackageDetailsDataBox extends StatelessWidget { - const MyPackageDetailsDataBox({ +class PackageDetailsDataBox extends StatelessWidget { + const PackageDetailsDataBox({ Key? key, required this.datas, required double deviceBlockSize, @@ -50,7 +50,7 @@ class MyPackageDetailsDataBox extends StatelessWidget { color: Color.fromRGBO(235, 235, 235, 1), border: Border( left: BorderSide( - color: kDarkPurple, + color: Colors.black, width: 2, ), ), @@ -66,14 +66,14 @@ class MyPackageDetailsDataBox extends StatelessWidget { ), ), style: TextStyle( - color: kDarkPurple, + color: Colors.black, ), ), Divider(), Text( 'ID: ${datas.id}', style: TextStyle( - color: kDarkPurple, + color: Colors.black, fontWeight: FontWeight.w700, ), ), @@ -188,10 +188,6 @@ class MyPackageDetailsDataBox extends StatelessWidget { ), ], ), - Divider(), - SizedBox( - height: 5, - ), // Divider(), // SizedBox( // height: 5, @@ -274,6 +270,42 @@ class MyPackageDetailsDataBox extends StatelessWidget { ], ), Divider(), + SizedBox( + height: 5, + ), + Row( + children: [ + Container( + width: 35 * _deviceBlockSize, + child: Text( + 'Status', + style: TextStyle( + color: Colors.grey, + ), + ), + ), + Container( + width: 45 * _deviceBlockSize, + child: Text( + datas.status == 'approved' + ? 'Approved' + : datas.status == 'rejected' + ? 'Rejected' + : 'Pending..', + style: TextStyle( + fontWeight: FontWeight.w700, + color: datas.status == 'approved' + ? kBlue + : datas.status == 'rejected' + ? kPink + : Colors.grey, + ), + overflow: TextOverflow.clip, + ), + ), + ], + ), + Divider(), SizedBox( height: 30, ), @@ -319,31 +351,65 @@ class MyPackageDetailsDataBox extends StatelessWidget { itemCount: datas.items.length, ), ), + SizedBox( + height: 10, + ), + InkWell( + onTap: () async => await launch( + 'https://cssd-doc.com/Show/Package/${datas.id.toString()}', + ), + child: Container( + padding: EdgeInsets.symmetric(vertical: 10), + width: double.infinity * 2 / 3, + decoration: BoxDecoration( + color: Colors.black, + borderRadius: BorderRadius.circular(5), + ), + child: Center( + child: Text( + 'Show More Details', + style: TextStyle( + fontSize: 5.0 * _deviceBlockSize, + color: Colors.white, + ), + ), + ), + ), + ), ], ), ), SizedBox( height: 20, ), - userData['roles'].contains('Admin') - ? Container() - : TransferDestroyButton( - deviceBlockSize: _deviceBlockSize, - firstColor: kDarkPurple, - secondColor: kDarkPurpleSub, - text: 'Transfer', - onTap: () { - push(); - }, - ), - SizedBox( - height: 10.0, - ), + if (userData['roles']?.contains('Admin') || + userData['roles']?.contains('Supervisor') || + (userData['roles']?.contains('User') && + (userData['name']?.contains(datas.userName.toString())))) + if (datas.status == 'approved') + TransferDestroyButton( + deviceBlockSize: _deviceBlockSize, + firstColor: kDarkPurple, + secondColor: kDarkPurpleSub, + text: 'Transfer', + onTap: () { + push(); + }, + ), + if (userData['roles']?.contains('Admin') || + userData['roles']?.contains('Supervisor') || + (userData['roles']?.contains('User') && + (userData['name']?.contains(datas.userName.toString())))) + if (datas.status == 'approved') + SizedBox( + height: 10.0, + ), + // if ((userData['name']?.contains(datas.userName))) TransferDestroyButton( deviceBlockSize: _deviceBlockSize, firstColor: kPink, secondColor: kPinkSub, - text: 'Back Items to Item List', + text: 'Delete Package', onTap: () { showDialog( context: context, @@ -414,25 +480,6 @@ class MyPackageDetailsDataBox extends StatelessWidget { SizedBox( height: 20, ), - InkWell( - onTap: () async => await launch( - 'https://cssd-doc.com/Show/Package/${datas.id.toString()}', - ), - child: Container( - padding: EdgeInsets.symmetric(vertical: 20), - width: double.infinity, - decoration: BoxDecoration( - color: Color.fromRGBO(230, 230, 230, 1), - borderRadius: BorderRadius.circular(25), - ), - child: Center( - child: Text( - 'Show More Details', - style: TextStyle(fontWeight: FontWeight.w700), - ), - ), - ), - ), SizedBox( height: 30, ), diff --git a/lib/widgets/PackageScreens/Details/package_detail_box.dart b/lib/widgets/PackageScreens/Details/package_detail_box.dart index 68b059d..e7745db 100755 --- a/lib/widgets/PackageScreens/Details/package_detail_box.dart +++ b/lib/widgets/PackageScreens/Details/package_detail_box.dart @@ -1,393 +1,393 @@ -import 'package:cssd/config/colors.dart'; -import 'package:cssd/models/package_model.dart'; -import 'package:cssd/widgets/MyItemsScreens/Detail/transfer_destroy_button.dart'; -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:url_launcher/url_launcher.dart'; - -class PackageDetailsDataBox extends StatelessWidget { - const PackageDetailsDataBox({ - Key? key, - required this.datas, - required double deviceBlockSize, - required this.goToAddLabelPage, - }) : _deviceBlockSize = deviceBlockSize, - super(key: key); - - final PackageDetailObject datas; - final double _deviceBlockSize; - final VoidCallback goToAddLabelPage; - - @override - Widget build(BuildContext context) { - return Padding( - padding: EdgeInsets.all(20), - child: ListView( - children: [ - SizedBox( - height: 10, - ), - Text( - 'Package Details', - style: TextStyle( - fontWeight: FontWeight.w700, - fontSize: 5 * _deviceBlockSize, - letterSpacing: 3, - ), - ), - SizedBox( - height: 10, - ), - Container( - padding: EdgeInsets.all(10), - decoration: BoxDecoration( - color: Color.fromRGBO(235, 235, 235, 1), - border: Border( - left: BorderSide( - color: kPurple, - width: 2, - ), - ), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - DateFormat.yMMMd().format( - DateTime.parse( - datas.createDate, - ), - ), - style: TextStyle( - color: kPurple, - ), - ), - Divider(), - Text( - 'ID: ${datas.id}', - style: TextStyle( - color: kPurple, - fontWeight: FontWeight.w700, - ), - ), - SizedBox( - height: 30, - ), - Row( - children: [ - Container( - width: 35 * _deviceBlockSize, - child: Text( - 'Package Name', - style: TextStyle( - color: Colors.grey, - ), - ), - ), - Container( - width: 45 * _deviceBlockSize, - child: Text( - datas.name.toString(), - style: TextStyle( - fontWeight: FontWeight.w700, - ), - overflow: TextOverflow.clip, - ), - ), - ], - ), - Divider(), - SizedBox( - height: 5, - ), - Row( - children: [ - Container( - width: 35 * _deviceBlockSize, - child: Text( - 'Date', - style: TextStyle( - color: Colors.grey, - ), - ), - ), - Container( - width: 45 * _deviceBlockSize, - child: Text( - DateFormat('d-M-y').format( - DateTime.parse( - datas.createDate, - ), - ), - style: TextStyle( - fontWeight: FontWeight.w700, - ), - overflow: TextOverflow.clip, - ), - ), - ], - ), - Divider(), - SizedBox( - height: 5, - ), - Row( - children: [ - Container( - width: 35 * _deviceBlockSize, - child: Text( - 'Owner', - style: TextStyle( - color: Colors.grey, - ), - ), - ), - Container( - width: 45 * _deviceBlockSize, - child: Text( - datas.userName.toString(), - style: TextStyle( - fontWeight: FontWeight.w700, - ), - overflow: TextOverflow.clip, - ), - ), - ], - ), - Divider(), - SizedBox( - height: 5, - ), - Row( - children: [ - Container( - width: 35 * _deviceBlockSize, - child: Text( - 'Creator', - style: TextStyle( - color: Colors.grey, - ), - ), - ), - Container( - width: 45 * _deviceBlockSize, - child: Text( - datas.userCreator.toString(), - style: TextStyle( - fontWeight: FontWeight.w700, - ), - overflow: TextOverflow.clip, - ), - ), - ], - ), - Divider(), - SizedBox( - height: 5, - ), - // Row( - // children: [ - // Container( - // width: 35 * _deviceBlockSize, - // child: Text( - // 'UDI', - // style: TextStyle( - // color: Colors.grey, - // ), - // ), - // ), - // Container( - // width: 45 * _deviceBlockSize, - // child: Text( - // datas.udi.toString(), - // style: TextStyle( - // fontWeight: FontWeight.w700, - // ), - // overflow: TextOverflow.clip, - // ), - // ), - // ], - // ), - // Divider(), - // SizedBox( - // height: 5, - // ), - Row( - children: [ - Container( - width: 35 * _deviceBlockSize, - child: Text( - 'Description', - style: TextStyle( - color: Colors.grey, - ), - ), - ), - Container( - width: 45 * _deviceBlockSize, - child: Text( - datas.description.toString(), - style: TextStyle( - fontWeight: FontWeight.w700, - ), - overflow: TextOverflow.clip, - ), - ), - ], - ), - Divider(), - SizedBox( - height: 5, - ), - Row( - children: [ - Container( - width: 35 * _deviceBlockSize, - child: Text( - 'Hospital Name', - style: TextStyle( - color: Colors.grey, - ), - ), - ), - Container( - width: 45 * _deviceBlockSize, - child: Text( - datas.hospitalName, - style: TextStyle( - fontWeight: FontWeight.w700, - ), - overflow: TextOverflow.clip, - ), - ), - ], - ), - Divider(), - SizedBox( - height: 5, - ), - Row( - children: [ - Container( - width: 35 * _deviceBlockSize, - child: Text( - 'Status', - style: TextStyle( - color: Colors.grey, - ), - ), - ), - Container( - width: 45 * _deviceBlockSize, - child: Text( - datas.status == 'approved' - ? 'Approved' - : datas.status == 'rejected' - ? 'Rejected' - : 'Pending..', - style: TextStyle( - fontWeight: FontWeight.w700, - color: datas.status == 'approved' ? kBlue : datas - .status == 'rejected' - ? kPink : Colors.grey, - ), - overflow: TextOverflow.clip, - ), - ), - ], - ), - SizedBox( - height: 30, - ), - Text( - 'Items included', - style: TextStyle( - color: kPurple, - letterSpacing: 3, - fontWeight: FontWeight.w700, - fontSize: 4.5 * _deviceBlockSize, - ), - ), - Container( - width: double.infinity, - padding: EdgeInsets.symmetric(vertical: 10, horizontal: 20), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(5), - border: Border.all( - color: Colors.grey, - ), - ), - child: ListView.separated( - shrinkWrap: true, - itemBuilder: (ctx, index) => - RichText( - text: TextSpan( - text: '${index + 1}. ', - style: TextStyle( - color: Colors.grey, - fontFamily: 'montserrat', - ), - children: [ - TextSpan( - text: datas.items[index], - style: TextStyle( - fontWeight: FontWeight.bold, - color: kPurple, - ), - ), - ], - ), - ), - separatorBuilder: (ctx, index) => Divider(), - itemCount: datas.items.length, - ), - ), - SizedBox( - height: 50, - ), - TransferDestroyButton( - deviceBlockSize: _deviceBlockSize, - firstColor: kPurple, - secondColor: kPurpleSub, - onTap: goToAddLabelPage, - text: 'Make a Label For Package', - fontSize: 4.0, - ), - SizedBox( - height: 5.0, - ), - ], - ), - ), - SizedBox( - height: 20, - ), - InkWell( - onTap: () async => - await launch( - 'https://cssd-doc.com/Show/Package/${datas.id.toString()}', - ), - child: Container( - padding: EdgeInsets.symmetric(vertical: 20), - width: double.infinity, - decoration: BoxDecoration( - color: Color.fromRGBO(230, 230, 230, 1), - borderRadius: BorderRadius.circular(25), - ), - child: Center( - child: Text( - 'Show More Details', - style: TextStyle(fontWeight: FontWeight.w700), - ), - ), - ), - ), - SizedBox( - height: 30, - ), - ], - ), - ); - } -} +// import 'package:cssd/config/colors.dart'; +// import 'package:cssd/models/package_model.dart'; +// import 'package:cssd/widgets/MyItemsScreens/Detail/transfer_destroy_button.dart'; +// import 'package:flutter/material.dart'; +// import 'package:intl/intl.dart'; +// import 'package:url_launcher/url_launcher.dart'; +// +// class PackageDetailsDataBox extends StatelessWidget { +// const PackageDetailsDataBox({ +// Key? key, +// required this.datas, +// required double deviceBlockSize, +// required this.goToAddLabelPage, +// }) : _deviceBlockSize = deviceBlockSize, +// super(key: key); +// +// final PackageDetailObject datas; +// final double _deviceBlockSize; +// final VoidCallback goToAddLabelPage; +// +// @override +// Widget build(BuildContext context) { +// return Padding( +// padding: EdgeInsets.all(20), +// child: ListView( +// children: [ +// SizedBox( +// height: 10, +// ), +// Text( +// 'Package Details', +// style: TextStyle( +// fontWeight: FontWeight.w700, +// fontSize: 5 * _deviceBlockSize, +// letterSpacing: 3, +// ), +// ), +// SizedBox( +// height: 10, +// ), +// Container( +// padding: EdgeInsets.all(10), +// decoration: BoxDecoration( +// color: Color.fromRGBO(235, 235, 235, 1), +// border: Border( +// left: BorderSide( +// color: kPurple, +// width: 2, +// ), +// ), +// ), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// mainAxisSize: MainAxisSize.min, +// children: [ +// Text( +// DateFormat.yMMMd().format( +// DateTime.parse( +// datas.createDate, +// ), +// ), +// style: TextStyle( +// color: kPurple, +// ), +// ), +// Divider(), +// Text( +// 'ID: ${datas.id}', +// style: TextStyle( +// color: kPurple, +// fontWeight: FontWeight.w700, +// ), +// ), +// SizedBox( +// height: 30, +// ), +// Row( +// children: [ +// Container( +// width: 35 * _deviceBlockSize, +// child: Text( +// 'Package Name', +// style: TextStyle( +// color: Colors.grey, +// ), +// ), +// ), +// Container( +// width: 45 * _deviceBlockSize, +// child: Text( +// datas.name.toString(), +// style: TextStyle( +// fontWeight: FontWeight.w700, +// ), +// overflow: TextOverflow.clip, +// ), +// ), +// ], +// ), +// Divider(), +// SizedBox( +// height: 5, +// ), +// Row( +// children: [ +// Container( +// width: 35 * _deviceBlockSize, +// child: Text( +// 'Date', +// style: TextStyle( +// color: Colors.grey, +// ), +// ), +// ), +// Container( +// width: 45 * _deviceBlockSize, +// child: Text( +// DateFormat('d-M-y').format( +// DateTime.parse( +// datas.createDate, +// ), +// ), +// style: TextStyle( +// fontWeight: FontWeight.w700, +// ), +// overflow: TextOverflow.clip, +// ), +// ), +// ], +// ), +// Divider(), +// SizedBox( +// height: 5, +// ), +// Row( +// children: [ +// Container( +// width: 35 * _deviceBlockSize, +// child: Text( +// 'Owner', +// style: TextStyle( +// color: Colors.grey, +// ), +// ), +// ), +// Container( +// width: 45 * _deviceBlockSize, +// child: Text( +// datas.userName.toString(), +// style: TextStyle( +// fontWeight: FontWeight.w700, +// ), +// overflow: TextOverflow.clip, +// ), +// ), +// ], +// ), +// Divider(), +// SizedBox( +// height: 5, +// ), +// Row( +// children: [ +// Container( +// width: 35 * _deviceBlockSize, +// child: Text( +// 'Creator', +// style: TextStyle( +// color: Colors.grey, +// ), +// ), +// ), +// Container( +// width: 45 * _deviceBlockSize, +// child: Text( +// datas.userCreator.toString(), +// style: TextStyle( +// fontWeight: FontWeight.w700, +// ), +// overflow: TextOverflow.clip, +// ), +// ), +// ], +// ), +// Divider(), +// SizedBox( +// height: 5, +// ), +// // Row( +// // children: [ +// // Container( +// // width: 35 * _deviceBlockSize, +// // child: Text( +// // 'UDI', +// // style: TextStyle( +// // color: Colors.grey, +// // ), +// // ), +// // ), +// // Container( +// // width: 45 * _deviceBlockSize, +// // child: Text( +// // datas.udi.toString(), +// // style: TextStyle( +// // fontWeight: FontWeight.w700, +// // ), +// // overflow: TextOverflow.clip, +// // ), +// // ), +// // ], +// // ), +// // Divider(), +// // SizedBox( +// // height: 5, +// // ), +// Row( +// children: [ +// Container( +// width: 35 * _deviceBlockSize, +// child: Text( +// 'Description', +// style: TextStyle( +// color: Colors.grey, +// ), +// ), +// ), +// Container( +// width: 45 * _deviceBlockSize, +// child: Text( +// datas.description.toString(), +// style: TextStyle( +// fontWeight: FontWeight.w700, +// ), +// overflow: TextOverflow.clip, +// ), +// ), +// ], +// ), +// Divider(), +// SizedBox( +// height: 5, +// ), +// Row( +// children: [ +// Container( +// width: 35 * _deviceBlockSize, +// child: Text( +// 'Hospital Name', +// style: TextStyle( +// color: Colors.grey, +// ), +// ), +// ), +// Container( +// width: 45 * _deviceBlockSize, +// child: Text( +// datas.hospitalName, +// style: TextStyle( +// fontWeight: FontWeight.w700, +// ), +// overflow: TextOverflow.clip, +// ), +// ), +// ], +// ), +// Divider(), +// SizedBox( +// height: 5, +// ), +// Row( +// children: [ +// Container( +// width: 35 * _deviceBlockSize, +// child: Text( +// 'Status', +// style: TextStyle( +// color: Colors.grey, +// ), +// ), +// ), +// Container( +// width: 45 * _deviceBlockSize, +// child: Text( +// datas.status == 'approved' +// ? 'Approved' +// : datas.status == 'rejected' +// ? 'Rejected' +// : 'Pending..', +// style: TextStyle( +// fontWeight: FontWeight.w700, +// color: datas.status == 'approved' ? kBlue : datas +// .status == 'rejected' +// ? kPink : Colors.grey, +// ), +// overflow: TextOverflow.clip, +// ), +// ), +// ], +// ), +// SizedBox( +// height: 30, +// ), +// Text( +// 'Items included', +// style: TextStyle( +// color: kPurple, +// letterSpacing: 3, +// fontWeight: FontWeight.w700, +// fontSize: 4.5 * _deviceBlockSize, +// ), +// ), +// Container( +// width: double.infinity, +// padding: EdgeInsets.symmetric(vertical: 10, horizontal: 20), +// decoration: BoxDecoration( +// borderRadius: BorderRadius.circular(5), +// border: Border.all( +// color: Colors.grey, +// ), +// ), +// child: ListView.separated( +// shrinkWrap: true, +// itemBuilder: (ctx, index) => +// RichText( +// text: TextSpan( +// text: '${index + 1}. ', +// style: TextStyle( +// color: Colors.grey, +// fontFamily: 'montserrat', +// ), +// children: [ +// TextSpan( +// text: datas.items[index], +// style: TextStyle( +// fontWeight: FontWeight.bold, +// color: kPurple, +// ), +// ), +// ], +// ), +// ), +// separatorBuilder: (ctx, index) => Divider(), +// itemCount: datas.items.length, +// ), +// ), +// SizedBox( +// height: 50, +// ), +// TransferDestroyButton( +// deviceBlockSize: _deviceBlockSize, +// firstColor: kPurple, +// secondColor: kPurpleSub, +// onTap: goToAddLabelPage, +// text: 'Make a Label For Package', +// fontSize: 4.0, +// ), +// SizedBox( +// height: 5.0, +// ), +// ], +// ), +// ), +// SizedBox( +// height: 20, +// ), +// InkWell( +// onTap: () async => +// await launch( +// 'https://cssd-doc.com/Show/Package/${datas.id.toString()}', +// ), +// child: Container( +// padding: EdgeInsets.symmetric(vertical: 20), +// width: double.infinity, +// decoration: BoxDecoration( +// color: Color.fromRGBO(230, 230, 230, 1), +// borderRadius: BorderRadius.circular(25), +// ), +// child: Center( +// child: Text( +// 'Show More Details', +// style: TextStyle(fontWeight: FontWeight.w700), +// ), +// ), +// ), +// ), +// SizedBox( +// height: 30, +// ), +// ], +// ), +// ); +// } +// }