frosty/lib/widgets/alert_message.dart
Tommy Chow 870e8ae916 Implement custom copy notification
When copying a message in chat, a notification will now show under the
video rather than the block the textfield.
2022-07-28 21:44:28 -04:00

38 lines
852 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;
final Color? color;
const AlertMessage({
Key? key,
required this.message,
final this.icon = Icons.info,
this.color,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
icon,
color: color ?? Colors.grey,
),
const SizedBox(width: 5.0),
Flexible(
child: Text(
message,
style: TextStyle(
fontWeight: FontWeight.w500,
color: color ?? Colors.grey,
),
),
),
],
);
}
}