Back button

This commit is contained in:
Hillel Coren 2020-03-08 17:50:08 +02:00
parent 31348c1d04
commit 0d5dc09ce9
2 changed files with 10 additions and 10 deletions

View File

@ -208,11 +208,7 @@ class MenuDrawer extends StatelessWidget {
children: <Widget>[
// Hide options while refreshing data
state.credentials.token.isEmpty
? Expanded(
child: LoadingIndicator(
height: 30,
),
)
? Expanded(child: SizedBox())
: Container(
padding:
EdgeInsets.symmetric(horizontal: 14, vertical: 3),

View File

@ -25,6 +25,10 @@ class SettingsList extends StatelessWidget {
final settingsUIState = state.uiState.settingsUIState;
final showAll = settingsUIState.entityType == EntityType.company;
if (state.credentials.token.isEmpty) {
return SizedBox();
}
if (!state.userCompany.isAdmin)
return ListView(
children: <Widget>[
@ -108,16 +112,16 @@ class SettingsList extends StatelessWidget {
viewModel: viewModel,
),
*/
if (showAll)
SettingsListTile(
section: kSettingsDeviceSettings,
viewModel: viewModel,
),
if (showAll && state.userCompany.isOwner)
SettingsListTile(
section: kSettingsAccountManagement,
viewModel: viewModel,
),
if (showAll)
SettingsListTile(
section: kSettingsDeviceSettings,
viewModel: viewModel,
),
Container(
color: Theme.of(context).bottomAppBarColor,
padding: const EdgeInsets.only(left: 19, top: 16, bottom: 16),