showPage<T> method
Implementation
Future<T?> showPage<T>(HarePage page, {bool flex = true, double minHeight = 120}) {
return showBuilder((uc) {
ListWidget ls = [
titlePanel(
uc,
left: IconButton(onPressed: () => page.onBackPressed(uc.context), icon: Icons.adaptive.arrow_back.icon(size: 18), color: uc.colorScheme.onPrimary),
title: page.pageLabel.text(),
right: page.actions.isEmpty ? null : RowMin(page.actions),
closable: false,
),
if (flex) page.expanded() else page,
];
if (flex) {
return ColumnMaxStretch(ls).constrainedBox(minHeight: minHeight);
} else {
return ColumnMinStretch(ls).constrainedBox(minHeight: minHeight);
}
});
}