Change some ui in package detail

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