mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-11 17:35:01 +00:00
32 lines
735 B
Dart
32 lines
735 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class CustomButton extends StatelessWidget {
|
|
const CustomButton(
|
|
{required this.width,
|
|
required this.height,
|
|
required this.onPressed,
|
|
required this.color,
|
|
required this.child,
|
|
Key? key})
|
|
: super(key: key);
|
|
final double width;
|
|
final double height;
|
|
final void Function() onPressed;
|
|
final Widget child;
|
|
final Color color;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
width: width,
|
|
height: height,
|
|
child: MaterialButton(
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5.0)),
|
|
color: color,
|
|
onPressed: onPressed,
|
|
child: child,
|
|
),
|
|
);
|
|
}
|
|
}
|