show admin
This commit is contained in:
parent
d1d2b712f8
commit
1abd80e9ba
3 changed files with 27 additions and 23 deletions
Binary file not shown.
|
|
@ -94,6 +94,33 @@ class ProfilePage extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
),
|
||||
if (SHOW_ADMIN)
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
locator.packManager.clearCache();
|
||||
},
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
color: Colors.white,
|
||||
margin: EdgeInsets.all(8.0),
|
||||
child: Text('Clear cache'),
|
||||
height: 40.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: SharedPrefButton<bool>(
|
||||
builder: (v, _) =>
|
||||
(v ?? false) ? Text('PROD') : Text('TEST'),
|
||||
spKey: 'env',
|
||||
setOnTap: (v) => !(v ?? false),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: StreamBuilder(
|
||||
stream: locator.userManager.userStateHolder.asStream,
|
||||
|
|
|
|||
|
|
@ -70,29 +70,6 @@ class _PacksMenuWidgetState extends State<PacksMenuWidget> {
|
|||
),
|
||||
),
|
||||
),
|
||||
if (SHOW_ADMIN)
|
||||
Column(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
locator.packManager.clearCache();
|
||||
},
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
color: Colors.white,
|
||||
margin: EdgeInsets.all(8.0),
|
||||
child: Text('Clear cache'),
|
||||
height: 40.h,
|
||||
),
|
||||
),
|
||||
SharedPrefButton<bool>(
|
||||
builder: (v, _) =>
|
||||
(v ?? false) ? Text('PROD') : Text('TEST'),
|
||||
spKey: 'env',
|
||||
setOnTap: (v) => !(v ?? false),
|
||||
),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
|
|
|
|||
Loading…
Reference in a new issue