refactor(ui_components): update example (#92)

This commit is contained in:
AN12345 2022-12-12 14:10:41 -05:00
parent 81a7ca5a1f
commit 244a286509

View File

@ -50,20 +50,23 @@ class Home extends StatelessWidget {
Widget build(BuildContext context) => Scaffold(
appBar: PreferredSize(
preferredSize: const Size.fromHeight(60),
child: context.components.appBar?.configure(title: 'Example title'),
child: context.components.appBar?.configure(title: 'Example title') ??
const SizedBox.shrink(),
),
body: Column(
children: [
Expanded(
child: context.components.errorWidget
.configure(error: 'Example erreur'),
?.configure(error: 'Example erreur') ??
const SizedBox.shrink(),
),
const SizedBox(
height: 10,
),
Expanded(
child: context.components.loadingWidget
.configure(color: Colors.green),
?.configure(color: Colors.green) ??
const SizedBox.shrink(),
),
],
),