2022-09-14 16:45:50 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class InfoBox extends StatelessWidget {
|
|
|
|
const InfoBox({
|
|
|
|
required this.text,
|
|
|
|
this.isWarning = false,
|
2022-10-26 16:26:09 +00:00
|
|
|
super.key,
|
2022-09-14 16:45:50 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
final String text;
|
|
|
|
final bool isWarning;
|
|
|
|
|
|
|
|
@override
|
2024-04-20 09:44:14 +00:00
|
|
|
Widget build(final BuildContext context) => Wrap(
|
|
|
|
spacing: 8.0,
|
|
|
|
runSpacing: 16.0,
|
|
|
|
crossAxisAlignment: WrapCrossAlignment.center,
|
2022-09-15 21:08:32 +00:00
|
|
|
children: [
|
|
|
|
Icon(
|
|
|
|
isWarning ? Icons.warning_amber_outlined : Icons.info_outline,
|
|
|
|
size: 24,
|
|
|
|
color: Theme.of(context).colorScheme.onBackground,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
text,
|
|
|
|
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
|
|
|
color: Theme.of(context).colorScheme.onBackground,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
2022-09-14 16:45:50 +00:00
|
|
|
}
|