mirror of
https://github.com/tommyxchow/frosty.git
synced 2025-08-06 17:48:14 +08:00

* 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
46 lines
1.1 KiB
Dart
46 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// A custom dialog that makes the title bold, puts the actions in a column, and adds a subtle border.
|
|
class FrostyDialog extends StatelessWidget {
|
|
final String title;
|
|
final String? message;
|
|
final Widget? content;
|
|
final List<Widget>? actions;
|
|
|
|
const FrostyDialog({
|
|
super.key,
|
|
this.actions,
|
|
required this.title,
|
|
this.message,
|
|
this.content,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AlertDialog(
|
|
title: Text(
|
|
title,
|
|
// style: const TextStyle(fontWeight: FontWeight.bold),
|
|
// textAlign: TextAlign.center,
|
|
),
|
|
content: SingleChildScrollView(
|
|
child: Column(
|
|
children: [
|
|
content ?? Text(message!, textAlign: TextAlign.center),
|
|
if (actions != null) ...[
|
|
const SizedBox(height: 16),
|
|
...?actions?.map(
|
|
(action) => Container(
|
|
width: double.infinity,
|
|
padding: const EdgeInsets.only(top: 4),
|
|
child: action,
|
|
),
|
|
),
|
|
],
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|