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