33 lines
965 B
Dart
33 lines
965 B
Dart
|
import 'package:flutter/cupertino.dart';
|
||
|
import 'package:flutter/material.dart';
|
||
|
import 'package:flutter/src/foundation/key.dart';
|
||
|
import 'package:flutter/src/widgets/framework.dart';
|
||
|
import 'package:sqflite_pust_local_notification/utils/colors.dart';
|
||
|
|
||
|
class MyButton extends StatelessWidget {
|
||
|
final String label;
|
||
|
final Function()? onTap;
|
||
|
const MyButton({Key? key, required this.label, required this.onTap})
|
||
|
: super(key: key);
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return GestureDetector(
|
||
|
onTap: onTap,
|
||
|
child: Container(
|
||
|
alignment: Alignment.center,
|
||
|
width: 120,
|
||
|
height: 50,
|
||
|
decoration: BoxDecoration(
|
||
|
borderRadius: BorderRadius.circular(20), color: primaryClr),
|
||
|
child: Text(
|
||
|
label,
|
||
|
textAlign: TextAlign.center,
|
||
|
style: TextStyle(
|
||
|
color: Colors.white, fontSize: 15, fontWeight: FontWeight.bold),
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|