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; final bool isWarning;
@override @override
Widget build(final BuildContext context) => Column( Widget build(final BuildContext context) => Wrap(
crossAxisAlignment: CrossAxisAlignment.start, spacing: 8.0,
runSpacing: 16.0,
crossAxisAlignment: WrapCrossAlignment.center,
children: [ children: [
Icon( Icon(
isWarning ? Icons.warning_amber_outlined : Icons.info_outline, isWarning ? Icons.warning_amber_outlined : Icons.info_outline,
size: 24, size: 24,
color: Theme.of(context).colorScheme.onBackground, color: Theme.of(context).colorScheme.onBackground,
), ),
const SizedBox(height: 16),
Text( Text(
text, text,
style: Theme.of(context).textTheme.bodyMedium!.copyWith( style: Theme.of(context).textTheme.bodyMedium!.copyWith(