mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-10 19:28:56 +03:30
Change color of destroy and repair button in transfer items
This commit is contained in:
@@ -435,8 +435,8 @@ class MyItemsDetailsDataBox extends StatelessWidget {
|
||||
datas.status != 1))
|
||||
? TransferDestroyButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
firstColor: kPink,
|
||||
secondColor: kPinkSub,
|
||||
firstColor: Colors.black,
|
||||
secondColor: Colors.black87,
|
||||
text: 'Destroy',
|
||||
onTap: () {
|
||||
showDialog(
|
||||
@@ -471,8 +471,8 @@ class MyItemsDetailsDataBox extends StatelessWidget {
|
||||
builder: (context, itemProvider, child) {
|
||||
return TransferDestroyButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
firstColor: kPink,
|
||||
secondColor: kPinkSub,
|
||||
firstColor: Colors.black,
|
||||
secondColor: Colors.black87,
|
||||
isLoadingButton:
|
||||
itemProvider.isloadingButton,
|
||||
onTap: () async {
|
||||
@@ -523,8 +523,8 @@ class MyItemsDetailsDataBox extends StatelessWidget {
|
||||
? datas.packageId != null
|
||||
? TransferDestroyButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
firstColor: kPink,
|
||||
secondColor: kPinkSub,
|
||||
firstColor: Colors.black,
|
||||
secondColor: Colors.black87,
|
||||
text: 'Destroy',
|
||||
onTap: () {
|
||||
showDialog(
|
||||
@@ -557,8 +557,8 @@ class MyItemsDetailsDataBox extends StatelessWidget {
|
||||
),
|
||||
TransferDestroyButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
firstColor: kPink,
|
||||
secondColor: kPinkSub,
|
||||
firstColor: Colors.black,
|
||||
secondColor: Colors.black87,
|
||||
onTap: () {
|
||||
Provider.of<ItemProvider>(context,
|
||||
listen: false)
|
||||
@@ -602,8 +602,8 @@ class MyItemsDetailsDataBox extends StatelessWidget {
|
||||
userData['roles']?.contains('Supervisor'))
|
||||
? TransferDestroyButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
firstColor: Colors.black,
|
||||
secondColor: Colors.black87,
|
||||
firstColor: Colors.green,
|
||||
secondColor: Colors.lightGreen,
|
||||
text: 'Repair',
|
||||
onTap: () {
|
||||
showDialog(
|
||||
@@ -638,14 +638,16 @@ class MyItemsDetailsDataBox extends StatelessWidget {
|
||||
builder: (context, itemProvider, child) {
|
||||
return TransferDestroyButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
firstColor: Colors.black,
|
||||
secondColor: Colors.black87,
|
||||
isLoadingButton: itemProvider.isloadingButton,
|
||||
firstColor: Colors.green,
|
||||
secondColor: Colors.lightGreen,
|
||||
isLoadingButton:
|
||||
itemProvider.isloadingButton,
|
||||
onTap: () async {
|
||||
itemProvider.setLoadingButton();
|
||||
await Provider.of<MyItemProvider>(context,
|
||||
await Provider.of<MyItemProvider>(
|
||||
context,
|
||||
listen: false)
|
||||
.repairItems(datas.id, 'approved')
|
||||
.repairItems(datas.id, 'suspended')
|
||||
.then(
|
||||
(value) {
|
||||
Navigator.of(context).pop();
|
||||
@@ -685,8 +687,8 @@ class MyItemsDetailsDataBox extends StatelessWidget {
|
||||
? datas.packageId != null
|
||||
? TransferDestroyButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
firstColor: Colors.black,
|
||||
secondColor: Colors.black87,
|
||||
firstColor: Colors.green,
|
||||
secondColor: Colors.lightGreen,
|
||||
text: 'Repair',
|
||||
onTap: () {
|
||||
showDialog(
|
||||
@@ -719,13 +721,13 @@ class MyItemsDetailsDataBox extends StatelessWidget {
|
||||
),
|
||||
TransferDestroyButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
firstColor: Colors.black,
|
||||
secondColor: Colors.black87,
|
||||
firstColor: Colors.green,
|
||||
secondColor: Colors.lightGreen,
|
||||
onTap: () {
|
||||
Provider.of<MyItemProvider>(context,
|
||||
listen: false)
|
||||
.repairItems(
|
||||
datas.id, 'approved')
|
||||
datas.id, 'suspended')
|
||||
.then(
|
||||
(value) {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
Reference in New Issue
Block a user