-
Notifications
You must be signed in to change notification settings - Fork 0
/
my_button.dart
37 lines (35 loc) · 997 Bytes
/
my_button.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// ignore_for_file: prefer_const_constructors, sort_child_properties_last
import 'package:flutter/material.dart';
class MYButton extends StatelessWidget {
MYButton({required this.title, required this.colour, required this.onPress});
final String title;
final Color colour;
final VoidCallback onPress;
@override
Widget build(BuildContext context) {
return Expanded(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10),
child: InkWell(
child: Container(
height: 60,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: colour,
),
child: Center(
child: Text(
title,
style: TextStyle(
fontSize: 16,
color: Colors.white,
),
),
),
),
onTap: onPress,
),
),
);
}
}