This commit is contained in:
Hillel Coren 2019-11-25 14:21:32 +02:00
parent c04e9c7033
commit 794c41d1fb
1 changed files with 3 additions and 4 deletions

View File

@ -183,14 +183,13 @@ class _UserEditState extends State<UserEdit> {
title: Text(localization.administrator),
subtitle: Text(localization.administratorHelp),
value: userCompany.isAdmin ?? false,
onChanged: null,
//onChanged: (value) => viewModel
//.onUserChanged(user.rebuild((b) => b..isAdmin = value)),
onChanged: (value) => viewModel.onUserChanged(
user.rebuild((b) => b..userCompany.isAdmin = value)),
activeColor: Theme.of(context).accentColor,
),
],
),
if (userCompany.isAdmin)
if (viewModel.userCompany.isAdmin)
FormCard(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,