WT1.1.2g Sizes
This commit is contained in:
@@ -68,7 +68,7 @@ class _InputDialogState<Event> extends State<InputDialog<Event>> with Trans {
|
||||
|
||||
_buildChild(BuildContext context) => Container(
|
||||
height: 350,
|
||||
decoration: BoxDecoration(color: Colors.white60, shape: BoxShape.rectangle, borderRadius: BorderRadius.all(Radius.circular(12))),
|
||||
decoration: BoxDecoration(color: Colors.grey[700], shape: BoxShape.rectangle, borderRadius: BorderRadius.all(Radius.circular(12))),
|
||||
child: KeyboardActions(
|
||||
config: _buildConfig(context),
|
||||
child: Column(
|
||||
@@ -107,7 +107,7 @@ class _InputDialogState<Event> extends State<InputDialog<Event>> with Trans {
|
||||
]),
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white70,
|
||||
color: Colors.grey[900],
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.only(topLeft: Radius.circular(12), topRight: Radius.circular(12))),
|
||||
),
|
||||
|
||||
@@ -42,6 +42,7 @@ class _SizeState extends State<SizeWidget> with Trans {
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
child: Column(crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Stack(
|
||||
alignment: Alignment.center,
|
||||
children: getSizeFigure(),
|
||||
)
|
||||
]))),
|
||||
@@ -49,16 +50,20 @@ class _SizeState extends State<SizeWidget> with Trans {
|
||||
}
|
||||
|
||||
List<Widget> getSizeFigure() {
|
||||
//print("w " + MediaQuery.of(context).size.width.toString() + "h " + MediaQuery.of(context).size.height.toString());
|
||||
double mediaWidth = MediaQuery.of(context).size.width * .8;
|
||||
double mediaHeight = MediaQuery.of(context).size.height * .8;
|
||||
print("w " + mediaWidth.toString() + "h " + mediaHeight.toString());
|
||||
widget.exerciseBloc.setMediaDimensions(mediaWidth, mediaHeight);
|
||||
List<Widget> list = List();
|
||||
list.add(SizedBox(
|
||||
width: MediaQuery.of(context).size.width * .80,
|
||||
height: MediaQuery.of(context).size.height * .80,
|
||||
//child: Container(color: Colors.black87),
|
||||
width: mediaWidth,
|
||||
height: mediaHeight,
|
||||
));
|
||||
list.add(
|
||||
Positioned(
|
||||
top: 20,
|
||||
left: 160,
|
||||
top: mediaHeight * .07,
|
||||
left: widget.exerciseBloc.isMan ? mediaWidth * .62 : mediaWidth * .65,
|
||||
child: Stack(
|
||||
alignment: Alignment.topLeft,
|
||||
children: [
|
||||
@@ -72,7 +77,7 @@ class _SizeState extends State<SizeWidget> with Trans {
|
||||
color: Colors.black54,
|
||||
),
|
||||
],
|
||||
fontSize: 22,
|
||||
fontSize: 20,
|
||||
color: Colors.orange[500],
|
||||
)),
|
||||
Positioned(
|
||||
@@ -83,20 +88,24 @@ class _SizeState extends State<SizeWidget> with Trans {
|
||||
icon: Icon(Icons.save),
|
||||
iconSize: 40,
|
||||
hoverColor: Colors.blueAccent,
|
||||
color: widget.exerciseBloc.changedSizes ? Colors.orange[300] : Colors.black54,
|
||||
color: widget.exerciseBloc.changedSizes ? Colors.orange[300] : Colors.black87,
|
||||
onPressed: () => {print("Save"), widget.exerciseBloc.add(ExerciseNewSaveWeight())}))
|
||||
],
|
||||
)),
|
||||
);
|
||||
list.add(widget.exerciseBloc.customerRepository.sex == "Man"
|
||||
? Image.asset(
|
||||
"asset/image/man_sizes.png",
|
||||
height: MediaQuery.of(context).size.height * .80,
|
||||
)
|
||||
: Image.asset(
|
||||
"asset/image/woman_sizes.png",
|
||||
height: MediaQuery.of(context).size.height * .80,
|
||||
));
|
||||
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;
|
||||
@@ -111,18 +120,41 @@ class _SizeState extends State<SizeWidget> with Trans {
|
||||
top: element.top.toDouble(),
|
||||
left: element.left.toDouble(),
|
||||
child: element.value != 0
|
||||
? IconButton(
|
||||
icon: Icon(CustomIcon.ok_circled),
|
||||
? Container(
|
||||
width: 20,
|
||||
height: 20,
|
||||
decoration: BoxDecoration(
|
||||
color: widget.exerciseBloc.isMan ? Colors.green[800] : Color(0xFFEA776C),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20),
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
color: Colors.green[200],
|
||||
onPressed: () => onPressed(element),
|
||||
)
|
||||
: IconButton(
|
||||
icon: Icon(CustomIcon.question),
|
||||
child: IconButton(
|
||||
icon: Icon(CustomIcon.ok_circled),
|
||||
padding: EdgeInsets.zero,
|
||||
color: Colors.green[200],
|
||||
onPressed: () => onPressed(element),
|
||||
))
|
||||
: Container(
|
||||
width: 20,
|
||||
height: 20,
|
||||
padding: EdgeInsets.zero,
|
||||
color: Colors.red[800],
|
||||
onPressed: () => onPressed(element),
|
||||
)),
|
||||
decoration: BoxDecoration(
|
||||
color: widget.exerciseBloc.isMan ? Color(0xFF369fb9) : Color(0xFFEA776C),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20),
|
||||
),
|
||||
),
|
||||
child: IconButton(
|
||||
icon: Icon(
|
||||
CustomIcon.help_circled,
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
color: Colors.red[800],
|
||||
splashColor: Colors.amber,
|
||||
onPressed: () => onPressed(element),
|
||||
))),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user