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

37 lines
857 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 String text,
required VoidCallback function,
}) {
return TextButton(
onPressed: function,
child: TextWidget().tex14W700(text,
clr: AppColor.darkGreyColor,
textDecoration: TextDecoration.underline),
);
}
//Elevated Button
Widget elevatedBtn({
required String text,
required Color clr,
required VoidCallback function,
}) {
return ElevatedButton(
onPressed: function,
style: ElevatedButton.styleFrom(
backgroundColor: clr,
),
child: TextWidget().tex14W700(
text,
clr: AppColor.plainWhite,
),
);
}
}