-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefaultButtons.dart
37 lines (35 loc) · 1.07 KB
/
defaultButtons.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
import 'package:flutter/material.dart';
import 'package:new_project/constants/appcolors.dart';
class DefaultButtons extends StatelessWidget {
double? width;
final String? text;
bool isLarge;
DefaultButtons({this.width, this.isLarge = false, this.text});
@override
Widget build(BuildContext context) {
return Container(
height: 60,
width: isLarge == true ? width : width = 130,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: AppColors.mainColor),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
margin: const EdgeInsets.only(left: 10),
child: isLarge == true
? Text(
text.toString(),
style: const TextStyle(color: Colors.white),
)
: const Text(''),
),
Container(
margin: const EdgeInsets.only(left: 10),
),
Image.asset('assets/images/button-one.png')
],
),
);
}
}