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,31 +351,65 @@ 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') &&
deviceBlockSize: _deviceBlockSize, (userData['name']?.contains(datas.userName.toString()))))
firstColor: kDarkPurple, if (datas.status == 'approved')
secondColor: kDarkPurpleSub, TransferDestroyButton(
text: 'Transfer', deviceBlockSize: _deviceBlockSize,
onTap: () { firstColor: kDarkPurple,
push(); secondColor: kDarkPurpleSub,
}, text: 'Transfer',
), onTap: () {
SizedBox( push();
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')
SizedBox(
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,393 +1,393 @@
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( // Row(
children: <Widget>[ // children: <Widget>[
Container( // Container(
width: 35 * _deviceBlockSize, // width: 35 * _deviceBlockSize,
child: Text( // child: Text(
'Package Name', // 'Package Name',
style: TextStyle( // style: TextStyle(
color: Colors.grey, // color: Colors.grey,
), // ),
), // ),
), // ),
Container( // Container(
width: 45 * _deviceBlockSize, // width: 45 * _deviceBlockSize,
child: Text( // child: Text(
datas.name.toString(), // datas.name.toString(),
style: TextStyle( // style: TextStyle(
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
), // ),
overflow: TextOverflow.clip, // overflow: TextOverflow.clip,
), // ),
), // ),
], // ],
), // ),
Divider(), // Divider(),
SizedBox( // SizedBox(
height: 5, // height: 5,
), // ),
Row( // Row(
children: <Widget>[ // children: <Widget>[
Container( // Container(
width: 35 * _deviceBlockSize, // width: 35 * _deviceBlockSize,
child: Text( // child: Text(
'Date', // 'Date',
style: TextStyle( // style: TextStyle(
color: Colors.grey, // color: Colors.grey,
), // ),
), // ),
), // ),
Container( // Container(
width: 45 * _deviceBlockSize, // width: 45 * _deviceBlockSize,
child: Text( // child: Text(
DateFormat('d-M-y').format( // DateFormat('d-M-y').format(
DateTime.parse( // DateTime.parse(
datas.createDate, // datas.createDate,
), // ),
), // ),
style: TextStyle( // style: TextStyle(
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
), // ),
overflow: TextOverflow.clip, // overflow: TextOverflow.clip,
), // ),
), // ),
], // ],
), // ),
Divider(), // Divider(),
SizedBox( // SizedBox(
height: 5, // height: 5,
), // ),
Row( // Row(
children: <Widget>[ // children: <Widget>[
Container( // Container(
width: 35 * _deviceBlockSize, // width: 35 * _deviceBlockSize,
child: Text( // child: Text(
'Owner', // 'Owner',
style: TextStyle( // style: TextStyle(
color: Colors.grey, // color: Colors.grey,
), // ),
), // ),
), // ),
Container( // Container(
width: 45 * _deviceBlockSize, // width: 45 * _deviceBlockSize,
child: Text( // child: Text(
datas.userName.toString(), // datas.userName.toString(),
style: TextStyle( // style: TextStyle(
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
), // ),
overflow: TextOverflow.clip, // overflow: TextOverflow.clip,
), // ),
), // ),
], // ],
), // ),
Divider(), // Divider(),
SizedBox( // SizedBox(
height: 5, // height: 5,
), // ),
Row( // Row(
children: <Widget>[ // children: <Widget>[
Container( // Container(
width: 35 * _deviceBlockSize, // width: 35 * _deviceBlockSize,
child: Text( // child: Text(
'Creator', // 'Creator',
style: TextStyle( // style: TextStyle(
color: Colors.grey, // color: Colors.grey,
), // ),
), // ),
), // ),
Container( // Container(
width: 45 * _deviceBlockSize, // width: 45 * _deviceBlockSize,
child: Text( // child: Text(
datas.userCreator.toString(), // datas.userCreator.toString(),
style: TextStyle( // style: TextStyle(
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
), // ),
overflow: TextOverflow.clip, // overflow: TextOverflow.clip,
), // ),
), // ),
], // ],
), // ),
Divider(), // Divider(),
SizedBox( // SizedBox(
height: 5, // height: 5,
), // ),
// Row( // // Row(
// children: <Widget>[ // // children: <Widget>[
// Container( // // Container(
// width: 35 * _deviceBlockSize, // // width: 35 * _deviceBlockSize,
// child: Text( // // child: Text(
// 'UDI', // // 'UDI',
// style: TextStyle( // // style: TextStyle(
// color: Colors.grey, // // color: Colors.grey,
// ), // // ),
// ), // // ),
// ), // // ),
// Container( // // Container(
// width: 45 * _deviceBlockSize, // // width: 45 * _deviceBlockSize,
// child: Text( // // child: Text(
// datas.udi.toString(), // // datas.udi.toString(),
// style: TextStyle( // // style: TextStyle(
// fontWeight: FontWeight.w700, // // fontWeight: FontWeight.w700,
// ), // // ),
// overflow: TextOverflow.clip, // // overflow: TextOverflow.clip,
// ), // // ),
// ), // // ),
// ], // // ],
// ), // // ),
// Divider(), // // Divider(),
// 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', // 'Description',
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(), // datas.description.toString(),
style: TextStyle( // style: TextStyle(
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
), // ),
overflow: TextOverflow.clip, // overflow: TextOverflow.clip,
), // ),
), // ),
], // ],
), // ),
Divider(), // Divider(),
SizedBox( // SizedBox(
height: 5, // height: 5,
), // ),
Row( // Row(
children: <Widget>[ // children: <Widget>[
Container( // Container(
width: 35 * _deviceBlockSize, // width: 35 * _deviceBlockSize,
child: Text( // child: Text(
'Hospital Name', // 'Hospital Name',
style: TextStyle( // style: TextStyle(
color: Colors.grey, // color: Colors.grey,
), // ),
), // ),
), // ),
Container( // Container(
width: 45 * _deviceBlockSize, // width: 45 * _deviceBlockSize,
child: Text( // child: Text(
datas.hospitalName, // datas.hospitalName,
style: TextStyle( // style: TextStyle(
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
), // ),
overflow: TextOverflow.clip, // overflow: TextOverflow.clip,
), // ),
), // ),
], // ],
), // ),
Divider(), // Divider(),
SizedBox( // SizedBox(
height: 5, // height: 5,
), // ),
Row( // Row(
children: <Widget>[ // children: <Widget>[
Container( // Container(
width: 35 * _deviceBlockSize, // width: 35 * _deviceBlockSize,
child: Text( // child: Text(
'Status', // 'Status',
style: TextStyle( // style: TextStyle(
color: Colors.grey, // color: Colors.grey,
), // ),
), // ),
), // ),
Container( // Container(
width: 45 * _deviceBlockSize, // width: 45 * _deviceBlockSize,
child: Text( // child: Text(
datas.status == 'approved' // datas.status == 'approved'
? 'Approved' // ? 'Approved'
: datas.status == 'rejected' // : datas.status == 'rejected'
? 'Rejected' // ? 'Rejected'
: 'Pending..', // : 'Pending..',
style: TextStyle( // style: TextStyle(
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
color: datas.status == 'approved' ? kBlue : datas // color: datas.status == 'approved' ? kBlue : datas
.status == 'rejected' // .status == 'rejected'
? kPink : Colors.grey, // ? kPink : Colors.grey,
), // ),
overflow: TextOverflow.clip, // overflow: TextOverflow.clip,
), // ),
), // ),
], // ],
), // ),
SizedBox( // SizedBox(
height: 30, // height: 30,
), // ),
Text( // Text(
'Items included', // 'Items included',
style: TextStyle( // style: TextStyle(
color: kPurple, // color: kPurple,
letterSpacing: 3, // letterSpacing: 3,
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
fontSize: 4.5 * _deviceBlockSize, // fontSize: 4.5 * _deviceBlockSize,
), // ),
), // ),
Container( // Container(
width: double.infinity, // width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 20), // padding: EdgeInsets.symmetric(vertical: 10, horizontal: 20),
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5), // borderRadius: BorderRadius.circular(5),
border: Border.all( // border: Border.all(
color: Colors.grey, // color: Colors.grey,
), // ),
), // ),
child: ListView.separated( // child: ListView.separated(
shrinkWrap: true, // shrinkWrap: true,
itemBuilder: (ctx, index) => // itemBuilder: (ctx, index) =>
RichText( // RichText(
text: TextSpan( // text: TextSpan(
text: '${index + 1}. ', // text: '${index + 1}. ',
style: TextStyle( // style: TextStyle(
color: Colors.grey, // color: Colors.grey,
fontFamily: 'montserrat', // fontFamily: 'montserrat',
), // ),
children: <TextSpan>[ // children: <TextSpan>[
TextSpan( // TextSpan(
text: datas.items[index], // text: datas.items[index],
style: TextStyle( // style: TextStyle(
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: kPurple, // color: kPurple,
), // ),
), // ),
], // ],
), // ),
), // ),
separatorBuilder: (ctx, index) => Divider(), // separatorBuilder: (ctx, index) => Divider(),
itemCount: datas.items.length, // itemCount: datas.items.length,
), // ),
), // ),
SizedBox( // SizedBox(
height: 50, // height: 50,
), // ),
TransferDestroyButton( // TransferDestroyButton(
deviceBlockSize: _deviceBlockSize, // deviceBlockSize: _deviceBlockSize,
firstColor: kPurple, // firstColor: kPurple,
secondColor: kPurpleSub, // secondColor: kPurpleSub,
onTap: goToAddLabelPage, // onTap: goToAddLabelPage,
text: 'Make a Label For Package', // text: 'Make a Label For Package',
fontSize: 4.0, // fontSize: 4.0,
), // ),
SizedBox( // SizedBox(
height: 5.0, // height: 5.0,
), // ),
], // ],
), // ),
), // ),
SizedBox( // SizedBox(
height: 20, // height: 20,
), // ),
InkWell( // InkWell(
onTap: () async => // onTap: () async =>
await launch( // await launch(
'https://cssd-doc.com/Show/Package/${datas.id.toString()}', // 'https://cssd-doc.com/Show/Package/${datas.id.toString()}',
), // ),
child: Container( // child: Container(
padding: EdgeInsets.symmetric(vertical: 20), // padding: EdgeInsets.symmetric(vertical: 20),
width: double.infinity, // width: double.infinity,
decoration: BoxDecoration( // decoration: BoxDecoration(
color: Color.fromRGBO(230, 230, 230, 1), // color: Color.fromRGBO(230, 230, 230, 1),
borderRadius: BorderRadius.circular(25), // borderRadius: BorderRadius.circular(25),
), // ),
child: Center( // child: Center(
child: Text( // child: Text(
'Show More Details', // 'Show More Details',
style: TextStyle(fontWeight: FontWeight.w700), // style: TextStyle(fontWeight: FontWeight.w700),
), // ),
), // ),
), // ),
), // ),
SizedBox( // SizedBox(
height: 30, // height: 30,
), // ),
], // ],
), // ),
); // );
} // }
} // }