-
Notifications
You must be signed in to change notification settings - Fork 0
/
splash_button.dart
52 lines (50 loc) · 1.46 KB
/
splash_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
42
43
44
45
46
47
48
49
50
51
52
import 'package:flutter/material.dart';
class SplashButton extends StatelessWidget {
final String title;
final String subText;
final Function() onPressed;
const SplashButton(
{required this.title,
required this.onPressed,
this.subText = "",
Key? key})
: super(key: key);
@override
Widget build(BuildContext context) {
return Material(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5.0)),
child: InkWell(
onTap: onPressed,
splashColor: Colors.purpleAccent,
child: Container(
width: MediaQuery.of(context).size.width,
height: 75,
padding: const EdgeInsets.all(25.0),
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(5.0)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.min,
children: [
Text(
title,
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.black),
),
Text(
subText,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.black),
),
],
),
),
),
);
}
}