Custom colors

This commit is contained in:
Hillel Coren 2021-07-26 22:02:00 +03:00
parent e5f1512dcc
commit ae644fdee2
2 changed files with 9 additions and 4 deletions

View File

@ -129,12 +129,12 @@ Future<AppState> _initialState(bool isTesting) async {
final prefs = await SharedPreferences.getInstance(); final prefs = await SharedPreferences.getInstance();
final prefString = prefs?.getString(kSharedPrefs); final prefString = prefs?.getString(kSharedPrefs);
String url = WebUtils.browserUrl ?? prefs.getString(kSharedPrefUrl) ?? ''; final url = WebUtils.browserUrl ?? prefs.getString(kSharedPrefUrl) ?? '';
if (!kReleaseMode) { if (!kReleaseMode) {
//url = kAppStagingUrl; //url = kAppStagingUrl;
}
//url = kAppProductionUrl; //url = kAppProductionUrl;
//url = kAppDemoUrl; //url = kAppDemoUrl;
}
var prefState = PrefState(); var prefState = PrefState();
if (prefString != null) { if (prefString != null) {

View File

@ -56,6 +56,9 @@ class MenuDrawer extends StatelessWidget {
final enableDarkMode = state.prefState.enableDarkMode; final enableDarkMode = state.prefState.enableDarkMode;
final localization = AppLocalization.of(context); final localization = AppLocalization.of(context);
final company = viewModel.selectedCompany; final company = viewModel.selectedCompany;
final inactiveColor = state.prefState
.customColors[PrefState.THEME_SIDEBAR_INACTIVE_BACKGROUND_COLOR] ??
'';
if (company == null) { if (company == null) {
return Container(); return Container();
@ -240,7 +243,9 @@ class MenuDrawer extends StatelessWidget {
? SizedBox() ? SizedBox()
: Expanded( : Expanded(
child: Container( child: Container(
color: Theme.of(context).cardColor, color: inactiveColor.isNotEmpty
? convertHexStringToColor(inactiveColor)
: Theme.of(context).cardColor,
child: ScrollableListView( child: ScrollableListView(
hideMobileThumb: true, hideMobileThumb: true,
children: <Widget>[ children: <Widget>[