mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 22:48:54 +03:30
set export ability to user
This commit is contained in:
@@ -272,30 +272,30 @@ class CycleResultFloatingButton extends StatelessWidget {
|
|||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (userData['roles'].contains('Supervisor') ||
|
// if (userData['roles'].contains('Supervisor') ||
|
||||||
userData['roles'].contains('Admin'))
|
// userData['roles'].contains('Admin'))
|
||||||
InkWell(
|
InkWell(
|
||||||
customBorder: CircleBorder(),
|
customBorder: CircleBorder(),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var status = await Permission.storage.request();
|
var status = await Permission.storage.request();
|
||||||
if (status.isGranted) {
|
if (status.isGranted) {
|
||||||
Provider.of<CyclesProvider>(context, listen: false)
|
Provider.of<CyclesProvider>(context, listen: false)
|
||||||
.exportCycles();
|
.exportCycles();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(_deviceBlockSize),
|
padding: EdgeInsets.all(_deviceBlockSize),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.import_export,
|
Icons.import_export,
|
||||||
size: 10 * _deviceBlockSize,
|
size: 10 * _deviceBlockSize,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 2 * _deviceBlockSize,
|
width: 2 * _deviceBlockSize,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -302,29 +302,29 @@ class ItemResultFloatingButton extends StatelessWidget {
|
|||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (userData['roles'].contains('Supervisor') ||
|
// if (userData['roles'].contains('Supervisor') ||
|
||||||
userData['roles'].contains('Admin'))
|
// userData['roles'].contains('Admin'))
|
||||||
InkWell(
|
InkWell(
|
||||||
customBorder: CircleBorder(),
|
customBorder: CircleBorder(),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var status = await Permission.storage.request();
|
var status = await Permission.storage.request();
|
||||||
if (status.isGranted) {
|
if (status.isGranted) {
|
||||||
Provider.of<ItemProvider>(context, listen: false).exportItems();
|
Provider.of<ItemProvider>(context, listen: false).exportItems();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(_deviceBlockSize),
|
padding: EdgeInsets.all(_deviceBlockSize),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.import_export,
|
Icons.import_export,
|
||||||
size: 10 * _deviceBlockSize,
|
size: 10 * _deviceBlockSize,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 2 * _deviceBlockSize,
|
width: 2 * _deviceBlockSize,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -276,30 +276,30 @@ class PackageResultFloatingButton extends StatelessWidget {
|
|||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
if (userData['roles'].contains('Supervisor') ||
|
// if (userData['roles'].contains('Supervisor') ||
|
||||||
userData['roles'].contains('Admin'))
|
// userData['roles'].contains('Admin'))
|
||||||
InkWell(
|
InkWell(
|
||||||
customBorder: CircleBorder(),
|
customBorder: CircleBorder(),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var status = await Permission.storage.request();
|
var status = await Permission.storage.request();
|
||||||
if (status.isGranted) {
|
if (status.isGranted) {
|
||||||
Provider.of<PackageProvider>(context, listen: false)
|
Provider.of<PackageProvider>(context, listen: false)
|
||||||
.exportPackages();
|
.exportPackages();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(_deviceBlockSize),
|
padding: EdgeInsets.all(_deviceBlockSize),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.import_export,
|
Icons.import_export,
|
||||||
size: 10 * _deviceBlockSize,
|
size: 10 * _deviceBlockSize,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 2 * _deviceBlockSize,
|
width: 2 * _deviceBlockSize,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user