mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 00:21:19 +00:00
Add background color from service + real local db update
This commit is contained in:
parent
f95b0832b8
commit
6ede91eed7
@ -61,7 +61,7 @@ class DatabaseHelper {
|
|||||||
'tabletAppContext',
|
'tabletAppContext',
|
||||||
tabletAppContext.toMap(),
|
tabletAppContext.toMap(),
|
||||||
where: "id = ?",
|
where: "id = ?",
|
||||||
whereArgs: ["1234"], //
|
whereArgs: [tabletAppContext.id],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -78,83 +78,89 @@ class _MainViewWidget extends State<MainViewWidget> {
|
|||||||
}
|
}
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
child: Column(
|
child: Container(
|
||||||
children: [
|
height: size.height,
|
||||||
Container(
|
width: size.width,
|
||||||
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,
|
||||||
height: size.height * 0.12,
|
|
||||||
child: Row(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Container(
|
||||||
padding: const EdgeInsets.only(left: 15.0, top: 10.0),
|
width: size.width,
|
||||||
child: AspectRatio(
|
height: size.height * 0.12,
|
||||||
aspectRatio: 4 / 4,
|
child: Row(
|
||||||
child: Container(
|
children: [
|
||||||
/*width: 125,
|
Padding(
|
||||||
height: 125,*/
|
padding: const EdgeInsets.only(left: 15.0, top: 10.0),
|
||||||
decoration: boxDecoration(sectionSelected, true),
|
child: AspectRatio(
|
||||||
|
aspectRatio: 4 / 4,
|
||||||
|
child: Container(
|
||||||
|
/*width: 125,
|
||||||
|
height: 125,*/
|
||||||
|
decoration: boxDecoration(sectionSelected, true),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(
|
||||||
SizedBox(
|
width: 25,
|
||||||
width: 25,
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Align(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
child: AutoSizeText(
|
|
||||||
sectionSelected.title.firstWhere((translation) => translation.language == appContext.getContext().language).value,
|
|
||||||
style: new TextStyle(fontSize: 25),
|
|
||||||
maxLines: 1,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Align(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
child: AutoSizeText(
|
|
||||||
sectionSelected.description.firstWhere((translation) => translation.language == appContext.getContext().language).value,
|
|
||||||
style: new TextStyle(fontSize: 20),
|
|
||||||
maxLines: 2,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: sectionSelected.type != SectionType.slider ? const EdgeInsets.only(left: 15.0, right: 15.0, top: 15.0) : const EdgeInsets.only(top: 15.0),
|
|
||||||
child: Container(
|
|
||||||
width: size.width,
|
|
||||||
height: size.height * 0.85,
|
|
||||||
decoration: sectionSelected.type != SectionType.video && sectionSelected.type != SectionType.web && sectionSelected.type != SectionType.slider && sectionSelected.type != SectionType.map ? BoxDecoration(
|
|
||||||
color: kBackgroundLight,
|
|
||||||
shape: BoxShape.rectangle,
|
|
||||||
borderRadius: BorderRadius.circular(30.0),
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: kBackgroundSecondGrey,
|
|
||||||
spreadRadius: 0.5,
|
|
||||||
blurRadius: 5,
|
|
||||||
offset: Offset(0, 1.5), // changes position of shadow
|
|
||||||
),
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: AutoSizeText(
|
||||||
|
sectionSelected.title.firstWhere((translation) => translation.language == appContext.getContext().language).value,
|
||||||
|
style: new TextStyle(fontSize: 25),
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: AutoSizeText(
|
||||||
|
sectionSelected.description.firstWhere((translation) => translation.language == appContext.getContext().language).value,
|
||||||
|
style: new TextStyle(fontSize: 20),
|
||||||
|
maxLines: 2,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
) : null,
|
),
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(0.0),
|
|
||||||
child: elementToShow),
|
|
||||||
),
|
),
|
||||||
)
|
Padding(
|
||||||
],
|
padding: sectionSelected.type != SectionType.slider ? const EdgeInsets.only(left: 15.0, right: 15.0, top: 15.0) : const EdgeInsets.only(top: 15.0),
|
||||||
|
child: Container(
|
||||||
|
width: size.width,
|
||||||
|
height: size.height * 0.85,
|
||||||
|
decoration: sectionSelected.type != SectionType.video && sectionSelected.type != SectionType.web && sectionSelected.type != SectionType.slider && sectionSelected.type != SectionType.map ? BoxDecoration(
|
||||||
|
color: kBackgroundLight,
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(30.0),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: kBackgroundSecondGrey,
|
||||||
|
spreadRadius: 0.5,
|
||||||
|
blurRadius: 5,
|
||||||
|
offset: Offset(0, 1.5), // changes position of shadow
|
||||||
|
),
|
||||||
|
],
|
||||||
|
) : null,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(0.0),
|
||||||
|
child: elementToShow),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.endTop,
|
floatingActionButtonLocation: FloatingActionButtonLocation.endTop,
|
||||||
|
|||||||
@ -109,7 +109,7 @@ class _MenuViewWidget extends State<MenuViewWidget> {
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
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,
|
shape: BoxShape.rectangle,
|
||||||
borderRadius: BorderRadius.circular(30.0),
|
borderRadius: BorderRadius.circular(30.0),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
|
|||||||
@ -68,7 +68,7 @@ class _SliderViewWidget extends State<SliderViewWidget> {
|
|||||||
height: MediaQuery.of(context).size.height,
|
height: MediaQuery.of(context).size.height,
|
||||||
margin: EdgeInsets.symmetric(horizontal: 5.0),
|
margin: EdgeInsets.symmetric(horizontal: 5.0),
|
||||||
decoration: BoxDecoration(
|
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),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
//border: Border.all(width: 0.3, color: kSecondGrey),
|
//border: Border.all(width: 0.3, color: kSecondGrey),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -76,7 +76,7 @@ class _MyAppState extends State<MyApp> {
|
|||||||
],*/
|
],*/
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
primarySwatch: Colors.grey,
|
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",
|
//fontFamily: "Vollkorn",
|
||||||
textTheme: TextTheme(bodyText1: TextStyle(color: kMainRed)),
|
textTheme: TextTheme(bodyText1: TextStyle(color: kMainRed)),
|
||||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user