mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 17:39:42 +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 secondary;
|
||||||
final bool mergeSemantics;
|
final bool mergeSemantics;
|
||||||
@override
|
@override
|
||||||
Widget build(final BuildContext context) => Card(
|
Widget build(final BuildContext context) => Card.filled(
|
||||||
elevation: 0.0,
|
|
||||||
shape: const RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
|
||||||
),
|
|
||||||
clipBehavior: clipped ? Clip.antiAlias : Clip.none,
|
clipBehavior: clipped ? Clip.antiAlias : Clip.none,
|
||||||
color: error
|
color: error
|
||||||
? Theme.of(context).colorScheme.errorContainer
|
? Theme.of(context).colorScheme.errorContainer
|
||||||
|
@ -30,7 +26,7 @@ class FilledCard extends StatelessWidget {
|
||||||
? Theme.of(context).colorScheme.secondaryContainer
|
? Theme.of(context).colorScheme.secondaryContainer
|
||||||
: tertiary
|
: tertiary
|
||||||
? Theme.of(context).colorScheme.tertiaryContainer
|
? Theme.of(context).colorScheme.tertiaryContainer
|
||||||
: Theme.of(context).colorScheme.surfaceContainerHigh,
|
: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||||
semanticContainer: mergeSemantics,
|
semanticContainer: mergeSemantics,
|
||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
|
|
|
@ -12,7 +12,7 @@ class OutlinedCard extends StatelessWidget {
|
||||||
final Color? borderColor;
|
final Color? borderColor;
|
||||||
final double? borderWidth;
|
final double? borderWidth;
|
||||||
@override
|
@override
|
||||||
Widget build(final BuildContext context) => Card(
|
Widget build(final BuildContext context) => Card.outlined(
|
||||||
elevation: 0.0,
|
elevation: 0.0,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||||
|
|
Loading…
Reference in a new issue