Files
Tanami_App/lib/shared/components/button_widget.dart

36 lines
771 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:tanami_app/core/styles/app_color.dart';
import 'package:tanami_app/shared/components/text_widget.dart';
class ButtonWidget {
//Text Button
Widget textBtn({
2024-05-28 16:35:33 +05:30
required Widget text,
required VoidCallback function,
}) {
return TextButton(
onPressed: function,
2024-05-28 16:35:33 +05:30
child: text,
);
}
//Elevated Button
Widget elevatedBtn({
required String text,
required Color clr,
2024-05-28 16:35:33 +05:30
Color? txtClr,
required VoidCallback function,
}) {
return ElevatedButton(
onPressed: function,
style: ElevatedButton.styleFrom(
backgroundColor: clr,
),
child: TextWidget().tex14W700(
text,
2024-05-28 16:35:33 +05:30
clr: txtClr ?? AppColor.plainWhite,
),
);
}
}