2022-09-15 16:57:26 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class OutlinedCard extends StatelessWidget {
|
|
|
|
const OutlinedCard({
|
|
|
|
required this.child,
|
2023-08-14 04:10:15 +00:00
|
|
|
this.borderColor,
|
|
|
|
this.borderWidth,
|
2022-10-26 16:26:09 +00:00
|
|
|
super.key,
|
2022-09-15 16:57:26 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
final Widget child;
|
2023-08-14 04:10:15 +00:00
|
|
|
final Color? borderColor;
|
|
|
|
final double? borderWidth;
|
2022-09-15 16:57:26 +00:00
|
|
|
@override
|
|
|
|
Widget build(final BuildContext context) => Card(
|
2022-09-15 21:08:32 +00:00
|
|
|
elevation: 0.0,
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
|
|
|
side: BorderSide(
|
2023-08-14 04:10:15 +00:00
|
|
|
color: borderColor ?? Theme.of(context).colorScheme.outline,
|
|
|
|
width: borderWidth ?? 1.0,
|
2022-09-15 21:08:32 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
child: child,
|
|
|
|
);
|
2022-09-15 16:57:26 +00:00
|
|
|
}
|