content method
Implementation
Widget content(BuildContext context) {
final theme = hubbleThemeData(context);
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: double.infinity,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
LottieBuilder.asset(
Assets.astroLottie.path,
height: 100.0.dp,
),
Padding(
padding: EdgeInsets.only(
left: 24.0.dp, right: 24.0.dp, bottom: 8.0.dp, top: 12.0.dp),
child: HubbleText(
'Uh-Oh',
style: theme.typography.h2
.copyWith(fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
),
),
Padding(
padding:
EdgeInsets.only(left: 44.0.dp, right: 44.0.dp, bottom: 12.0.dp),
child: HubbleText(
errorMessage.substring(0, min(200, errorMessage.length)),
style: theme.pointCaption1.copyWith(
fontWeight: FontWeight.normal,
color: theme.colors.textColorNormal,
),
maxLines: 10,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
),
),
],
),
),
SizedBox(height: 12.0.dp),
OverflowBar(
spacing: 12.0.dp,
children: [
HubbleButton.medium(
width: null,
onPressed: onRetry,
child: Padding(
padding: EdgeInsets.only(left: 10.0.dp, right: 10.0.dp),
child: HubbleText(
'RETRY',
style: theme.pointCaption1.copyWith(
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
),
),
if (extraButton != null)
HubbleButton.medium(
width: null,
onPressed: onExtraButtonPressed ?? () {},
child: Padding(
padding: EdgeInsets.only(left: 10.0.dp, right: 10.0.dp),
child: HubbleText(
extraButton,
style: theme.pointCaption1.copyWith(
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
),
),
],
)
],
),
);
}