36 lines
772 B
Dart
36 lines
772 B
Dart
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({
|
|
required Widget text,
|
|
required VoidCallback function,
|
|
}) {
|
|
return TextButton(
|
|
onPressed: function,
|
|
child: text,
|
|
);
|
|
}
|
|
|
|
//Elevated Button
|
|
Widget elevatedBtn({
|
|
required String text,
|
|
required Color clr,
|
|
Color? txtClr,
|
|
required VoidCallback function,
|
|
}) {
|
|
return ElevatedButton(
|
|
onPressed: function,
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: clr,
|
|
),
|
|
child: TextWidget().text14W700(
|
|
text,
|
|
clr: txtClr ?? AppColor.plainWhite,
|
|
),
|
|
);
|
|
}
|
|
}
|