WT1.1.2g Sizes fix

This commit is contained in:
bossanyit 2020-11-17 19:31:13 +01:00
parent b71544ba13
commit d984588567
2 changed files with 144 additions and 136 deletions

View File

@ -58,12 +58,17 @@ class _InputDialogState<Event> extends State<InputDialog<Event>> with Trans {
@override
Widget build(BuildContext context) {
return Dialog(
return SingleChildScrollView(
padding: EdgeInsets.only(
top: _nodeText1.hasFocus
? 0 // adjust values according to your need
: MediaQuery.of(context).size.height / 2 - 250), // adjust values according to your need
child: Dialog(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
elevation: 0,
backgroundColor: Colors.transparent,
child: _buildChild(context),
);
));
}
_buildChild(BuildContext context) => Container(
@ -74,7 +79,7 @@ class _InputDialogState<Event> extends State<InputDialog<Event>> with Trans {
child: Column(
children: <Widget>[
Container(
padding: const EdgeInsets.all(12.0),
padding: const EdgeInsets.all(0.0),
child: Column(children: [
Text(
widget.title,
@ -184,5 +189,6 @@ class _InputDialogState<Event> extends State<InputDialog<Event>> with Trans {
)
],
),
));
),
);
}

View File

@ -55,11 +55,28 @@ class _SizeState extends State<SizeWidget> with Trans {
print("w " + mediaWidth.toString() + "h " + mediaHeight.toString());
widget.exerciseBloc.setMediaDimensions(mediaWidth, mediaHeight);
List<Widget> list = List();
list.add(SizedBox(
//child: Container(color: Colors.black87),
list.add(GestureDetector(
onTap: () => {print("Save"), widget.exerciseBloc.add(ExerciseNewSaveWeight())},
child: SizedBox(
width: mediaWidth,
height: mediaHeight,
));
)));
list.add(
widget.exerciseBloc.isMan
? Image.asset(
"asset/image/man_sizes.png",
height: mediaHeight,
width: mediaWidth,
)
: Image.asset(
"asset/image/woman_sizes.png",
height: mediaHeight,
width: mediaWidth,
),
);
list.addAll(getSizeElements());
list.add(
Positioned(
top: mediaHeight * .07,
@ -93,21 +110,6 @@ class _SizeState extends State<SizeWidget> with Trans {
],
)),
);
list.add(
widget.exerciseBloc.isMan
? Image.asset(
"asset/image/man_sizes.png",
height: mediaHeight,
width: mediaWidth,
)
: Image.asset(
"asset/image/woman_sizes.png",
height: mediaHeight,
width: mediaWidth,
),
);
list.addAll(getSizeElements());
return list;
}