-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathnavigation_button.dart
41 lines (38 loc) · 974 Bytes
/
navigation_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
38
39
40
41
import 'package:flutter/material.dart';
import 'package:sizer/sizer.dart';
class NavigationButton extends StatelessWidget {
NavigationButton(
{required this.text,
required this.background,
required this.foreground,
required this.onPressed});
final Color background;
final Color foreground;
final Function onPressed;
final String text;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
onPressed();
},
child: Container(
height: 10.0.h,
width: double.infinity,
decoration: BoxDecoration(
color: background,
borderRadius: BorderRadius.all(Radius.circular(7.w))),
child: Center(
child: Text(
text,
style: TextStyle(
fontSize: 20.sp,
color: foreground,
fontWeight: FontWeight.bold,
),
),
),
),
);
}
}