frosty/lib/widgets/modal.dart
Tommy Chow 23f48d3061 Improve haptics & fix thumbnail card sizings (#90)
Also fixed full name not showing on buttons and modal for non-english
channels.
2022-06-27 23:23:09 -04:00

38 lines
1,000 B
Dart

import 'package:flutter/material.dart';
class FrostyModal extends StatelessWidget {
final Widget child;
const FrostyModal({Key? key, required this.child}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.symmetric(horizontal: 15.0),
decoration: BoxDecoration(
color: Theme.of(context).dialogBackgroundColor,
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(20.0),
topRight: Radius.circular(20.0),
),
),
child: SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const FractionallySizedBox(
widthFactor: 0.25,
child: SizedBox(
child: Divider(
height: 25.0,
thickness: 3.0,
),
),
),
Material(child: child),
],
),
),
);
}
}