allow scrolling if not in full screen
This commit is contained in:
@@ -139,6 +139,32 @@ class _MIHWindowState extends State<MIHWindow> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget createWindow(Widget header, Widget body) {
|
Widget createWindow(Widget header, Widget body) {
|
||||||
|
Widget visibleItems;
|
||||||
|
if (widget.fullscreen) {
|
||||||
|
visibleItems = Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
header,
|
||||||
|
//const Divider(),
|
||||||
|
body,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
visibleItems = SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
header,
|
||||||
|
//const Divider(),
|
||||||
|
body,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
return Dialog(
|
return Dialog(
|
||||||
insetPadding: EdgeInsets.symmetric(
|
insetPadding: EdgeInsets.symmetric(
|
||||||
horizontal: horizontralWindowPadding,
|
horizontal: horizontralWindowPadding,
|
||||||
@@ -157,16 +183,7 @@ class _MIHWindowState extends State<MIHWindow> {
|
|||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
width: 5.0),
|
width: 5.0),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: visibleItems,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
header,
|
|
||||||
//const Divider(),
|
|
||||||
body,
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user