mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 13:38:55 +03:30
latest
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:carousel_slider/carousel_slider.dart';
|
||||
import 'package:cssd/config/colors.dart';
|
||||
import 'package:cssd/models/item_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -344,20 +345,28 @@ class ItemDetailsDataBox extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
Divider(),
|
||||
SizedBox(
|
||||
if(datas.filePath!.isNotEmpty) Divider(),
|
||||
if(datas.filePath!.isNotEmpty) SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
if(datas.filePath!.isNotEmpty) Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 20),
|
||||
child: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (ctx, index) {
|
||||
child: CarouselSlider.builder(
|
||||
disableGesture: true,
|
||||
itemBuilder: (ctx, index, realIndex) {
|
||||
return Image(image: NetworkImage(datas.filePath![index]));
|
||||
},
|
||||
separatorBuilder: (ctx, index) => Divider(),
|
||||
itemCount: datas.filePath!.length,
|
||||
options: CarouselOptions(
|
||||
enlargeCenterPage: false,
|
||||
aspectRatio: 1,
|
||||
viewportFraction: 1,
|
||||
padEnds: false,
|
||||
pauseAutoPlayOnTouch: true,
|
||||
disableCenter: false,
|
||||
autoPlay: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -117,67 +117,6 @@ class ItemItemBox extends StatelessWidget {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
userData['roles']?.contains('User') ?? false
|
||||
? Container()
|
||||
: InkWell(
|
||||
customBorder: CircleBorder(),
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(
|
||||
item!.status == 1
|
||||
? 'Are you Reject this item?'
|
||||
: 'Are you Confirm this item?',
|
||||
),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Provider.of<ItemProvider>(context,
|
||||
listen: false)
|
||||
.changeStatus(item!.id)
|
||||
.then(
|
||||
(value) {
|
||||
if (value) {
|
||||
print('true');
|
||||
}
|
||||
Navigator.of(context)
|
||||
.popAndPushNamed(Routes
|
||||
.itemResultScreen);
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Text('Yes'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text('No'),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(7),
|
||||
width: 8 * _deviceBlockSize,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: item!.status == 1 ? kPink : kBlue,
|
||||
),
|
||||
child: Icon(
|
||||
item!.status == 1 ? Icons.close : Icons.check,
|
||||
size: 4 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 5.0,
|
||||
),
|
||||
// userData['roles']?.contains('User') ?? false
|
||||
// ? Container()
|
||||
// : InkWell(
|
||||
@@ -278,6 +217,67 @@ class ItemItemBox extends StatelessWidget {
|
||||
SizedBox(
|
||||
width: 5.0,
|
||||
),
|
||||
userData['roles']?.contains('User') ?? false
|
||||
? Container()
|
||||
: InkWell(
|
||||
customBorder: CircleBorder(),
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(
|
||||
item!.status == 1
|
||||
? 'Are you Reject this item?'
|
||||
: 'Are you Confirm this item?',
|
||||
),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Provider.of<ItemProvider>(context,
|
||||
listen: false)
|
||||
.changeStatus(item!.id)
|
||||
.then(
|
||||
(value) {
|
||||
if (value) {
|
||||
print('true');
|
||||
}
|
||||
Navigator.of(context)
|
||||
.popAndPushNamed(Routes
|
||||
.itemResultScreen);
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Text('Yes'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text('No'),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(7),
|
||||
width: 8 * _deviceBlockSize,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: item!.status == 1 ? kPink : kBlue,
|
||||
),
|
||||
child: Icon(
|
||||
item!.status == 1 ? Icons.close : Icons.check,
|
||||
size: 4 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 5.0,
|
||||
),
|
||||
InkWell(
|
||||
customBorder: CircleBorder(),
|
||||
onTap: () {
|
||||
|
||||
Reference in New Issue
Block a user