Accent color
This commit is contained in:
parent
db65407f73
commit
5b5cffe40e
|
|
@ -56,7 +56,12 @@ class MenuDrawer extends StatelessWidget {
|
|||
)
|
||||
: Image.asset('assets/images/logo.png', width: 32);
|
||||
|
||||
Widget _companyListItem(CompanyEntity company) => Row(
|
||||
Widget _companyListItem(CompanyEntity company) {
|
||||
final userCompany = state.userCompanyStates
|
||||
.firstWhere(
|
||||
(userCompanyState) => userCompanyState.company.id == company.id)
|
||||
.userCompany;
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
|
|
@ -71,22 +76,22 @@ class MenuDrawer extends StatelessWidget {
|
|||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
if (userCompany.settings.accentColor != null)
|
||||
Container(
|
||||
padding: const EdgeInsets.only(right: 2),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: convertHexStringToColor(state.userCompanyStates
|
||||
.firstWhere((userCompanyState) =>
|
||||
userCompanyState.company.id == company.id)
|
||||
.userCompany
|
||||
.settings
|
||||
.accentColor)),
|
||||
color: convertHexStringToColor(
|
||||
userCompany.settings.accentColor)),
|
||||
width: 10,
|
||||
height: 10,
|
||||
//color: Colors.red,
|
||||
),
|
||||
SizedBox(width: 2),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
final _collapsedCompanySelector = PopupMenuButton<String>(
|
||||
tooltip: localization.selectCompany,
|
||||
|
|
|
|||
Loading…
Reference in New Issue