Set progress & toast for some other events

This commit is contained in:
fhkhd
2024-01-31 22:24:31 +03:30
parent 86feef9a38
commit 725b8dc30b
6 changed files with 526 additions and 358 deletions
@@ -12,7 +12,8 @@ class ItemDetailsDataBox extends StatelessWidget {
Key? key,
required this.datas,
required double deviceBlockSize,
}) : _deviceBlockSize = deviceBlockSize,
})
: _deviceBlockSize = deviceBlockSize,
super(key: key);
final ItemDetailObject datas;
@@ -336,10 +337,14 @@ class ItemDetailsDataBox 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,
),
@@ -364,10 +369,12 @@ class ItemDetailsDataBox extends StatelessWidget {
),
onTap: () {
showDialog(
context: context,
builder: (BuildContext context) => PinchZoom(
child: Image.network(datas.filePath![index])
),
context: context,
builder: (BuildContext context) =>
PinchZoom(
child: Image.network(
datas.filePath![index])
),
);
},
);
@@ -375,7 +382,7 @@ class ItemDetailsDataBox extends StatelessWidget {
itemCount: datas.filePath!.length,
options: CarouselOptions(
enlargeCenterPage: true,
aspectRatio: 16/8,
aspectRatio: 16 / 8,
viewportFraction: datas.filePath?.length == 1 ? 1 : 0.6,
padEnds: false,
pauseAutoPlayOnTouch: true,
@@ -383,7 +390,7 @@ class ItemDetailsDataBox extends StatelessWidget {
autoPlay: false,
enlargeFactor: 0.5,
enableInfiniteScroll:
datas.filePath?.length == 1 ? false : true,
datas.filePath?.length == 1 ? false : true,
),
),
),
@@ -394,7 +401,8 @@ class ItemDetailsDataBox extends StatelessWidget {
height: 20,
),
InkWell(
onTap: () async => await launch(
onTap: () async =>
await launch(
'https://cssd-doc.com/Show/Item/${datas.id.toString()}',
),
child: Container(