mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 00:21:19 +00:00
Fix bugs + optimize layout
This commit is contained in:
parent
1e4baa7ecd
commit
a28eeedf61
BIN
RELEASE/app-release_version_2_0_5.aab
Normal file
BIN
RELEASE/app-release_version_2_0_5.aab
Normal file
Binary file not shown.
@ -111,7 +111,7 @@ class _EventPopupState extends State<EventPopup> {
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.0)),
|
||||
color: kBackgroundColor,
|
||||
),
|
||||
height: size.height * 0.8,
|
||||
height: size.height * 0.85,
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
@ -181,14 +181,15 @@ class _EventPopupState extends State<EventPopup> {
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: SizedBox(
|
||||
height: size.height * 0.11,
|
||||
width: size.width * 0.7,
|
||||
child: Container(
|
||||
color: Colors.green,
|
||||
height: size.height * 0.13,
|
||||
width: size.width * 0.65,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: size.height * 0.06,
|
||||
height: size.height * 0.08,
|
||||
child: HtmlWidget(
|
||||
widget.eventAgenda.name!,
|
||||
textStyle: TextStyle(fontSize: 23.0),
|
||||
|
||||
@ -455,79 +455,26 @@ class _MainViewWidget extends State<MainViewWidget> {
|
||||
},
|
||||
child: Container(
|
||||
decoration: boxDecoration(appContext, sectionsLocal![index], false),
|
||||
padding: const EdgeInsets.all(25),
|
||||
padding: const EdgeInsets.all(18),
|
||||
margin: EdgeInsets.symmetric(vertical: 25, horizontal: 25),
|
||||
child: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: FractionallySizedBox(
|
||||
heightFactor: 0.4,
|
||||
heightFactor: 0.5,
|
||||
child: Container(
|
||||
//color: Colors.green,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
//color: Colors.orange,
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: HtmlWidget(
|
||||
sectionsLocal![index].title!.firstWhere((translation) => translation.language == appContext.getContext().language).value ?? "",
|
||||
customStylesBuilder: (element) {
|
||||
return {'text-align': 'right'};
|
||||
},
|
||||
textStyle: TextStyle(fontSize: isPortrait ? 10 : 25),//calculateFontSize(constraints.maxWidth, constraints.maxHeight, kIsWeb ? kWebMenuTitleDetailSize : kMenuTitleDetailSize)),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: HtmlWidget(
|
||||
sectionsLocal![index].title!.firstWhere((translation) => translation.language == appContext.getContext().language).value ?? "",
|
||||
customStylesBuilder: (element) {
|
||||
return {'text-align': 'right'};
|
||||
},
|
||||
textStyle: TextStyle(fontSize: isPortrait ? 10 : 25),//calculateFontSize(constraints.maxWidth, constraints.maxHeight, kIsWeb ? kWebMenuTitleDetailSize : kMenuTitleDetailSize)),
|
||||
),
|
||||
Container(
|
||||
//color: Colors.red,
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: HtmlWidget(
|
||||
sectionsLocal![index].description!.firstWhere((translation) => translation.language == appContext.getContext().language).value ?? "",
|
||||
customStylesBuilder: (element) {
|
||||
return {'text-align': 'right'};
|
||||
},
|
||||
textStyle: TextStyle(fontSize: isPortrait ? 5 : 15),//calculateFontSize(constraints.maxWidth, constraints.maxHeight, kIsWeb ? kWebMenuTitleDetailSize : kMenuTitleDetailSize)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
/*Container(
|
||||
color: Colors.orange,
|
||||
child: FittedBox(
|
||||
fit: BoxFit.fitWidth,
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: HtmlWidget(
|
||||
snapshot.data[index].title.firstWhere((translation) => translation.language == appContext.getContext().language).value,
|
||||
customStylesBuilder: (element) {
|
||||
return {'text-align': 'right'};
|
||||
},
|
||||
textStyle: new TextStyle(fontSize: calculateFontSize(context, kIsWeb ? kWebMenuTitleDetailSize: kMenuTitleDetailSize)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
FittedBox(
|
||||
fit: BoxFit.fill,
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: HtmlWidget(
|
||||
snapshot.data[index].description.firstWhere((translation) => translation.language == appContext.getContext().language).value,
|
||||
customStylesBuilder: (element) {
|
||||
return {'text-align': 'right'};
|
||||
},
|
||||
textStyle: new TextStyle(fontSize: calculateFontSize(context, kIsWeb ? kWebMenuDescriptionDetailSize: kMenuDescriptionDetailSize), fontFamily: ""),
|
||||
),
|
||||
),
|
||||
),*/
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
@ -568,7 +515,7 @@ boxDecoration(AppContext appContext, SectionDTO section, bool isSelected) {
|
||||
borderRadius: BorderRadius.circular(30.0),
|
||||
image: section.imageSource != null ? new DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
colorFilter: !isSelected? new ColorFilter.mode(Colors.black.withOpacity(kIsWeb ? 0.3 : 0.3), BlendMode.dstATop) : null,
|
||||
colorFilter: !isSelected? new ColorFilter.mode(kBackgroundLight.withOpacity(0.2), BlendMode.dstATop) : null,
|
||||
image: ImageCustomProvider.getImageProvider(appContext, section.imageId!, section.imageSource!),
|
||||
): null,
|
||||
boxShadow: [
|
||||
|
||||
@ -100,29 +100,31 @@ class _MenuView extends State<MenuView> {
|
||||
return Stack(
|
||||
children: [
|
||||
Center(
|
||||
child: Container(
|
||||
width: size.width,
|
||||
height: kIsWeb ? size.height * 0.8 : size.height * 0.8,
|
||||
decoration: selectedSection!.type != SectionType.video && selectedSection!.type != SectionType.web && selectedSection!.type != SectionType.slider && selectedSection!.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.only(left: 15.0, right: 15.0),
|
||||
child: elementToShow),
|
||||
child: Padding(
|
||||
padding: selectedSection!.type == SectionType.video || selectedSection!.type == SectionType.web ? EdgeInsets.all(8.0) : EdgeInsets.all(0.0),
|
||||
child: Container(
|
||||
width: size.width,
|
||||
decoration: selectedSection!.type != SectionType.video && selectedSection!.type != SectionType.web && selectedSection!.type != SectionType.slider && selectedSection!.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.only(left: 15.0, right: 15.0),
|
||||
child: elementToShow),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: kIsWeb ? 5: 20, right: kIsWeb ? 5: 20),
|
||||
padding: const EdgeInsets.only(bottom: 5, right: 5),
|
||||
child: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: InkWell(
|
||||
@ -174,11 +176,11 @@ class _MenuView extends State<MenuView> {
|
||||
child: Container(
|
||||
decoration: boxDecoration(appContext, menuDTO.sections![index], false),
|
||||
padding: const EdgeInsets.all(25),
|
||||
margin: EdgeInsets.symmetric(vertical: kIsWeb ? 15 : 25, horizontal: kIsWeb ? 15 : 25),
|
||||
margin: EdgeInsets.symmetric(vertical: 15, horizontal: 15),
|
||||
child: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: FractionallySizedBox(
|
||||
heightFactor: kIsWeb ? 0.3 : 0.4,
|
||||
heightFactor: 0.45,
|
||||
child: Column(
|
||||
children: [
|
||||
Align(
|
||||
@ -220,8 +222,8 @@ boxDecoration(AppContext appContext, SectionDTO section, bool isSelected) {
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(30.0),
|
||||
image: section.imageSource != null ? new DecorationImage(
|
||||
fit: kIsWeb ? BoxFit.cover : BoxFit.contain,
|
||||
colorFilter: !isSelected? new ColorFilter.mode(Colors.black.withOpacity(0.3), BlendMode.dstATop) : null,
|
||||
fit: BoxFit.cover,
|
||||
colorFilter: !isSelected? new ColorFilter.mode(kBackgroundLight.withOpacity(0.2), BlendMode.dstATop) : null,
|
||||
image: ImageCustomProvider.getImageProvider(appContext, section.imageId!, section.imageSource!),
|
||||
): null,
|
||||
boxShadow: [
|
||||
|
||||
@ -130,7 +130,7 @@ class _PDFViewWidget extends State<PDFViewWidget> {
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: ValueListenableBuilder<PDFFileDTO?>(
|
||||
valueListenable: selectedPdf,
|
||||
builder: (context, value, _) {
|
||||
@ -177,7 +177,7 @@ class _PDFViewWidget extends State<PDFViewWidget> {
|
||||
),
|
||||
Positioned(
|
||||
bottom: 20,
|
||||
right: 20,
|
||||
left: 20,
|
||||
child: ValueListenableBuilder<Map<String, int>>(
|
||||
valueListenable: currentState,
|
||||
builder: (context, value, _) {
|
||||
|
||||
@ -92,14 +92,14 @@ class _PuzzlePieceState extends State<PuzzlePiece> {
|
||||
top = Random().nextInt((imageHeight - pieceHeight).ceil()).toDouble();
|
||||
var test = top!;
|
||||
test -= widget.row * pieceHeight;
|
||||
top = test /2.2; // TODO change ?
|
||||
top = test /7; // TODO change ?
|
||||
}
|
||||
|
||||
if (left == null) {
|
||||
left = Random().nextInt((imageWidth - pieceWidth).ceil()).toDouble();
|
||||
var test = left!;
|
||||
test -= widget.col * pieceWidth;
|
||||
left = test /2.2; // TODO change ?
|
||||
left = test /7; // TODO change ?
|
||||
}
|
||||
|
||||
if(widget.row == 0 && widget.col == 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user