mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 17:11:14 +00:00
feat: infobox changed to use wrap.
shown as 1 line when content fits, wraps into column when not.
This commit is contained in:
parent
4f200ae757
commit
22fbbb051e
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue