mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 01:28:56 +03:30
Other Changes
This commit is contained in:
@@ -117,20 +117,28 @@ class AddItemBox extends StatelessWidget {
|
||||
height: 70,
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 0),
|
||||
child: TextFormField(
|
||||
controller: values,
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.only(
|
||||
bottom: 12,
|
||||
child: Consumer<PackageProvider>(builder: (context, packageProvider, _) {
|
||||
return TextFormField(
|
||||
controller: values,
|
||||
validator: (val) {
|
||||
if (val!.isEmpty) {
|
||||
return 'Item required!';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.only(
|
||||
bottom: 12,
|
||||
),
|
||||
isDense: true,
|
||||
),
|
||||
isDense: true,
|
||||
),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.black,
|
||||
fontSize: 4 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.black,
|
||||
fontSize: 4 * _deviceBlockSize,
|
||||
),
|
||||
);
|
||||
},),
|
||||
),
|
||||
isDense: true,
|
||||
items: vals.map((val) {
|
||||
|
||||
@@ -43,6 +43,7 @@ class PackageAddSaveButton extends StatelessWidget {
|
||||
for (TextEditingController item in itemValues) {
|
||||
items.add(item.text);
|
||||
}
|
||||
items = items.toSet().toList();
|
||||
await Provider.of<PackageProvider>(context, listen: false)
|
||||
.createPackageResult(
|
||||
nameCTRL.text,
|
||||
|
||||
@@ -281,10 +281,16 @@ class PackageDetailsDataBox extends StatelessWidget {
|
||||
Container(
|
||||
width: 45 * _deviceBlockSize,
|
||||
child: Text(
|
||||
datas.status == 'approved' ? 'Confirmed' : 'Rejected',
|
||||
datas.status == 'approved'
|
||||
? 'Confirmed'
|
||||
: datas.status == 'rejected'
|
||||
? 'Rejected'
|
||||
: 'Pending..',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
color: datas.status == 'approved' ? kBlue : kPink,
|
||||
color: datas.status == 'approved' ? kBlue : datas
|
||||
.status == 'rejected'
|
||||
? kPink : Colors.grey,
|
||||
),
|
||||
overflow: TextOverflow.clip,
|
||||
),
|
||||
@@ -314,24 +320,25 @@ class PackageDetailsDataBox extends StatelessWidget {
|
||||
),
|
||||
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],
|
||||
itemBuilder: (ctx, index) =>
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
text: '${index + 1}. ',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: kPurple,
|
||||
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,
|
||||
),
|
||||
@@ -357,7 +364,8 @@ class PackageDetailsDataBox extends StatelessWidget {
|
||||
height: 20,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async => await launch(
|
||||
onTap: () async =>
|
||||
await launch(
|
||||
'https://cssd-doc.com/Show/Package/${datas.id.toString()}',
|
||||
),
|
||||
child: Container(
|
||||
|
||||
Reference in New Issue
Block a user