frosty/lib/widgets/alert_message.dart
Tommy Chow 3a5f883b1f Overhaul alert and error messages (#90)
- Added new `AlertMessage` widget that displays an alert/error message
with an icon.
- Added some new error
messages for followed, search, chatters, etc.
- Changed various error messages to make them all consistent in style
2022-06-28 10:32:16 -04:00

34 lines
752 B
Dart

import 'package:flutter/material.dart';
/// A simple widget that displays an alert message in the center.
class AlertMessage extends StatelessWidget {
final String message;
final IconData icon;
const AlertMessage({
Key? key,
required this.message,
final this.icon = Icons.info,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
icon,
color: Colors.grey,
),
const SizedBox(width: 5.0),
Text(
message,
style: const TextStyle(
fontWeight: FontWeight.w500,
color: Colors.grey,
),
),
],
);
}
}