21 lines
523 B
Dart
21 lines
523 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class MyElevatedButton extends StatelessWidget {
|
||
|
final void Function()? onPressed;
|
||
|
final Widget? child;
|
||
|
|
||
|
const MyElevatedButton({super.key, this.onPressed, required this.child});
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return ElevatedButton(
|
||
|
onPressed: onPressed,
|
||
|
style: ButtonStyle(
|
||
|
backgroundColor: WidgetStateProperty.all<Color>(
|
||
|
Theme.of(context).colorScheme.surfaceContainerHigh),
|
||
|
),
|
||
|
child: child,
|
||
|
);
|
||
|
}
|
||
|
}
|