|
- import 'package:farm_tpf/utils/const_color.dart';
- import 'package:flutter/material.dart';
-
- class ButtonWidget extends StatelessWidget {
- final Function onPressed;
- final String title;
- ButtonWidget({required this.title, required this.onPressed});
- @override
- Widget build(BuildContext context) {
- return SizedBox(
- width: double.infinity,
- height: 55,
- child: FlatButton(
- onPressed: () {
- onPressed();
- },
- color: AppColors.DEFAULT,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(7.0),
- ),
- child: Text(title.toUpperCase(), style: TextStyle(fontWeight: FontWeight.bold, color: AppColors.WHITE, fontSize: 18)),
- ),
- );
- }
- }
|