From 22fbbb051ef06f187b0c9166b8d6547ff90d3a70 Mon Sep 17 00:00:00 2001 From: Aliaksei Tratseuski Date: Sat, 20 Apr 2024 13:44:14 +0400 Subject: [PATCH] feat: infobox changed to use wrap. shown as 1 line when content fits, wraps into column when not. --- lib/ui/components/info_box/info_box.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/ui/components/info_box/info_box.dart b/lib/ui/components/info_box/info_box.dart index c2e67def..6b77de9d 100644 --- a/lib/ui/components/info_box/info_box.dart +++ b/lib/ui/components/info_box/info_box.dart @@ -11,15 +11,16 @@ class InfoBox extends StatelessWidget { final bool isWarning; @override - Widget build(final BuildContext context) => Column( - crossAxisAlignment: CrossAxisAlignment.start, + Widget build(final BuildContext context) => Wrap( + spacing: 8.0, + runSpacing: 16.0, + crossAxisAlignment: WrapCrossAlignment.center, children: [ Icon( isWarning ? Icons.warning_amber_outlined : Icons.info_outline, size: 24, color: Theme.of(context).colorScheme.onBackground, ), - const SizedBox(height: 16), Text( text, style: Theme.of(context).textTheme.bodyMedium!.copyWith(