frosty/lib/widgets/notification.dart
Tommy Chow f68de827cd
Refresh themes and styling (#394)
* consolidate themes

* update and tweak styles, add border styling

* add borders between video and chat

* tweak heights

* improve reply threads
- taller new design
- can now tap parent's reply
- fix crash when tapping self

* tweak border colors

* tweak theme

* tweak theme

* tweak theme

* add accent color picker in settings

* overhaul colors and styles

* remove print

* add divider to chat user modal and revert height

* increase deleted message opacity

* revert highlight color

* tweak color

* tweak colors

* tweak padding

* tweak padding

* tweak placeholder color

* revert input fill color

* use error color
2024-09-06 21:43:27 -07:00

55 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
class FrostyNotification extends StatelessWidget {
final String message;
final bool showPasteButton;
final Function() onButtonPressed;
const FrostyNotification({
super.key,
required this.message,
required this.showPasteButton,
required this.onButtonPressed,
});
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainer,
borderRadius: BorderRadius.circular(8),
),
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
child: Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(8),
child: Row(
children: [
const Icon(
Icons.info_outline_rounded,
),
const SizedBox(width: 8),
Expanded(
child: Text(
message,
style: const TextStyle(
overflow: TextOverflow.ellipsis,
),
),
),
],
),
),
),
if (showPasteButton)
TextButton(
onPressed: onButtonPressed,
child: const Text('Paste'),
),
],
),
);
}
}