mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-09-07 04:26:56 +00:00
27 lines
658 B
Dart
27 lines
658 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class FilledButton extends StatelessWidget {
|
||
|
const FilledButton({
|
||
|
Key? key,
|
||
|
this.onPressed,
|
||
|
this.title,
|
||
|
this.child,
|
||
|
}) : super(key: key);
|
||
|
|
||
|
final VoidCallback? onPressed;
|
||
|
final String? title;
|
||
|
final Widget? child;
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return ElevatedButton(
|
||
|
onPressed: onPressed,
|
||
|
child: child ?? Text(title ?? ''),
|
||
|
style: ElevatedButton.styleFrom(
|
||
|
onPrimary: Theme.of(context).colorScheme.onPrimary,
|
||
|
primary: Theme.of(context).colorScheme.primary,
|
||
|
).copyWith(elevation: ButtonStyleButton.allOrNull(0.0)),
|
||
|
);
|
||
|
}
|
||
|
}
|