window enhancement v2
This commit is contained in:
parent
29735afb11
commit
ddc60e6b71
1 changed files with 26 additions and 33 deletions
|
|
@ -50,19 +50,16 @@ class _MIHWindowState extends State<MIHWindow> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getWidnowClose() {
|
Widget getWidnowClose() {
|
||||||
return Row(
|
return Container(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
alignment: Alignment.centerRight,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
child: IconButton(
|
||||||
children: [
|
onPressed: widget.onWindowTapClose,
|
||||||
IconButton(
|
icon: Icon(
|
||||||
onPressed: widget.onWindowTapClose,
|
Icons.close,
|
||||||
icon: Icon(
|
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||||
Icons.close,
|
size: 35,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -70,6 +67,7 @@ class _MIHWindowState extends State<MIHWindow> {
|
||||||
return Row(
|
return Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: widget.windowTools,
|
children: widget.windowTools,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -78,6 +76,7 @@ class _MIHWindowState extends State<MIHWindow> {
|
||||||
return Row(
|
return Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
widget.windowTitle,
|
widget.windowTitle,
|
||||||
|
|
@ -99,27 +98,24 @@ class _MIHWindowState extends State<MIHWindow> {
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
getWidnowTools(),
|
||||||
flex: 2,
|
Expanded(
|
||||||
child: getWidnowTools(),
|
|
||||||
),
|
|
||||||
Flexible(
|
|
||||||
flex: 2,
|
flex: 2,
|
||||||
child: getWidnowTitle(),
|
child: getWidnowTitle(),
|
||||||
),
|
),
|
||||||
Flexible(
|
getWidnowClose(),
|
||||||
flex: 2,
|
|
||||||
child: getWidnowClose(),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getWidnowBody() {
|
Widget getWidnowBody() {
|
||||||
return Row(
|
return Padding(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
child: Column(
|
||||||
children: widget.windowBody,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: widget.windowBody,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,14 +138,11 @@ class _MIHWindowState extends State<MIHWindow> {
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
width: 5.0),
|
width: 5.0),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Column(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
child: Column(
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
children: [header, body],
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [header, body],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue