mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 17:11:14 +00:00
refactor(ui): Use flutter's card implementations
This commit is contained in:
parent
3dce7c8f49
commit
c0de078dbb
|
@ -18,11 +18,7 @@ class FilledCard extends StatelessWidget {
|
|||
final bool secondary;
|
||||
final bool mergeSemantics;
|
||||
@override
|
||||
Widget build(final BuildContext context) => Card(
|
||||
elevation: 0.0,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
),
|
||||
Widget build(final BuildContext context) => Card.filled(
|
||||
clipBehavior: clipped ? Clip.antiAlias : Clip.none,
|
||||
color: error
|
||||
? Theme.of(context).colorScheme.errorContainer
|
||||
|
@ -30,7 +26,7 @@ class FilledCard extends StatelessWidget {
|
|||
? Theme.of(context).colorScheme.secondaryContainer
|
||||
: tertiary
|
||||
? Theme.of(context).colorScheme.tertiaryContainer
|
||||
: Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||
: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
semanticContainer: mergeSemantics,
|
||||
child: child,
|
||||
);
|
||||
|
|
|
@ -12,7 +12,7 @@ class OutlinedCard extends StatelessWidget {
|
|||
final Color? borderColor;
|
||||
final double? borderWidth;
|
||||
@override
|
||||
Widget build(final BuildContext context) => Card(
|
||||
Widget build(final BuildContext context) => Card.outlined(
|
||||
elevation: 0.0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
|
|
Loading…
Reference in a new issue