You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
776 B
Dart
35 lines
776 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class Button extends StatelessWidget {
|
|
final void Function() onPressed;
|
|
final Size deviceSize;
|
|
final String title;
|
|
final Alignment alignment;
|
|
final EdgeInsets margin;
|
|
|
|
const Button({
|
|
Key? key,
|
|
required this.onPressed,
|
|
required this.deviceSize,
|
|
required this.title,
|
|
required this.alignment,
|
|
required this.margin,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Align(
|
|
alignment: alignment,
|
|
child: Container(
|
|
margin: margin,
|
|
child: ElevatedButton(
|
|
onPressed: onPressed,
|
|
child: Text(
|
|
title,
|
|
style: const TextStyle(fontSize: 18),
|
|
),
|
|
),
|
|
));
|
|
}
|
|
}
|