Add background color from service + real local db update

This commit is contained in:
Thomas Fransolet 2021-08-25 17:22:38 +02:00
parent f95b0832b8
commit 6ede91eed7
5 changed files with 82 additions and 76 deletions

View File

@ -61,7 +61,7 @@ class DatabaseHelper {
'tabletAppContext',
tabletAppContext.toMap(),
where: "id = ?",
whereArgs: ["1234"], //
whereArgs: [tabletAppContext.id],
);
}

View File

@ -78,6 +78,11 @@ class _MainViewWidget extends State<MainViewWidget> {
}
return Scaffold(
body: SingleChildScrollView(
child: Container(
height: size.height,
width: size.width,
color: appContext.getContext().configuration == null ? kBackgroundGrey : appContext.getContext().configuration.secondaryColor != null ? new Color(int.parse(appContext.getContext().configuration.secondaryColor.split('(0x')[1].split(')')[0], radix: 16)): kBackgroundGrey,
child: Column(
children: [
Container(
@ -157,6 +162,7 @@ class _MainViewWidget extends State<MainViewWidget> {
],
),
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.endTop,
floatingActionButton: Container(
height: 150.0,

View File

@ -109,7 +109,7 @@ class _MenuViewWidget extends State<MenuViewWidget> {
},
child: Container(
decoration: BoxDecoration(
color: kBackgroundGrey,
color: appContext.getContext().configuration == null ? kBackgroundGrey : appContext.getContext().configuration.secondaryColor != null ? new Color(int.parse(appContext.getContext().configuration.secondaryColor.split('(0x')[1].split(')')[0], radix: 16)): kBackgroundGrey,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(30.0),
boxShadow: [

View File

@ -68,7 +68,7 @@ class _SliderViewWidget extends State<SliderViewWidget> {
height: MediaQuery.of(context).size.height,
margin: EdgeInsets.symmetric(horizontal: 5.0),
decoration: BoxDecoration(
color: kBackgroundGrey,
color: appContext.getContext().configuration == null ? kBackgroundGrey : appContext.getContext().configuration.secondaryColor != null ? new Color(int.parse(appContext.getContext().configuration.secondaryColor.split('(0x')[1].split(')')[0], radix: 16)): kBackgroundGrey,
borderRadius: BorderRadius.circular(10.0),
//border: Border.all(width: 0.3, color: kSecondGrey),
),

View File

@ -76,7 +76,7 @@ class _MyAppState extends State<MyApp> {
],*/
theme: ThemeData(
primarySwatch: Colors.grey,
scaffoldBackgroundColor: kBackgroundGrey,
scaffoldBackgroundColor: widget.tabletAppContext != null ? widget.tabletAppContext.configuration != null ? widget.tabletAppContext.configuration.secondaryColor != null ? new Color(int.parse(widget.tabletAppContext.configuration.secondaryColor.split('(0x')[1].split(')')[0], radix: 16)): kBackgroundGrey : kBackgroundGrey : kBackgroundGrey,
//fontFamily: "Vollkorn",
textTheme: TextTheme(bodyText1: TextStyle(color: kMainRed)),
visualDensity: VisualDensity.adaptivePlatformDensity,