From 244a2865091fe316d391c469a3ae523089d1ca0c Mon Sep 17 00:00:00 2001 From: AN12345 Date: Mon, 12 Dec 2022 14:10:41 -0500 Subject: [PATCH] refactor(ui_components): update example (#92) --- packages/wyatt_ui_components/example/lib/main.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/wyatt_ui_components/example/lib/main.dart b/packages/wyatt_ui_components/example/lib/main.dart index e8aebaa0..1587122a 100644 --- a/packages/wyatt_ui_components/example/lib/main.dart +++ b/packages/wyatt_ui_components/example/lib/main.dart @@ -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(), ), ], ),