selfprivacy.org.app/lib/ui/components/cards/outlined_card.dart

28 lines
710 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
class OutlinedCard extends StatelessWidget {
const OutlinedCard({
required this.child,
this.borderColor,
this.borderWidth,
super.key,
});
final Widget child;
final Color? borderColor;
final double? borderWidth;
@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(
color: borderColor ?? Theme.of(context).colorScheme.outline,
width: borderWidth ?? 1.0,
2022-09-15 21:08:32 +00:00
),
),
clipBehavior: Clip.antiAlias,
child: child,
);
}