From 1f304344b21133bc8dc2a5286267dfaa7c6b2c20 Mon Sep 17 00:00:00 2001 From: krawieck Date: Sat, 9 Jan 2021 02:42:00 +0100 Subject: [PATCH 1/2] accomodate for situations where theres no site icon --- lib/pages/instance.dart | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/pages/instance.dart b/lib/pages/instance.dart index fe8f8be..681d882 100644 --- a/lib/pages/instance.dart +++ b/lib/pages/instance.dart @@ -117,16 +117,18 @@ class InstancePage extends HookWidget { children: [ Padding( padding: const EdgeInsets.only(top: 40), - child: FullscreenableImage( - url: site.site.icon, - child: CachedNetworkImage( - width: 100, - height: 100, - imageUrl: site.site.icon, - errorWidget: (_, __, ___) => - const Icon(Icons.warning), - ), - ), + child: site.site.icon == null + ? const SizedBox(height: 100, width: 100) + : FullscreenableImage( + url: site.site.icon, + child: CachedNetworkImage( + width: 100, + height: 100, + imageUrl: site.site.icon, + errorWidget: (_, __, ___) => + const Icon(Icons.warning), + ), + ), ), Text(site.site.name, style: theme.textTheme.headline6), From e518092adb80a54156e402f0e2566be771caee67 Mon Sep 17 00:00:00 2001 From: krawieck Date: Sat, 9 Jan 2021 02:49:01 +0100 Subject: [PATCH 2/2] add hairline border around bottom modal --- lib/widgets/bottom_modal.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/widgets/bottom_modal.dart b/lib/widgets/bottom_modal.dart index 1e9c55f..517d9a9 100644 --- a/lib/widgets/bottom_modal.dart +++ b/lib/widgets/bottom_modal.dart @@ -18,9 +18,12 @@ class BottomModal extends StatelessWidget { child: Container( padding: title != null ? const EdgeInsets.only(top: 10) : null, decoration: BoxDecoration( - color: theme.scaffoldBackgroundColor, - borderRadius: const BorderRadius.all(Radius.circular(10)), - ), + color: theme.scaffoldBackgroundColor, + borderRadius: const BorderRadius.all(Radius.circular(10)), + border: Border.all( + color: Colors.grey.withOpacity(0.5), + width: 0.2, + )), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start,