feat: infobox changed to use wrap.

shown as 1 line when content fits, wraps into column when not.
pull/482/head
Aliaksei Tratseuski 2024-04-20 13:44:14 +04:00
parent 4f200ae757
commit 22fbbb051e
1 changed files with 4 additions and 3 deletions

View File

@ -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(