44 lines
1.1 KiB
Dart
44 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rounded_loading_button_plus/rounded_loading_button.dart';
|
|
|
|
import 'Constants/Colorconstants.dart';
|
|
|
|
class RoundedButton extends StatelessWidget {
|
|
const RoundedButton(
|
|
{Key? key,
|
|
required this.onPressed,
|
|
required this.title,
|
|
required this.color,
|
|
required this.height,
|
|
required this.width,
|
|
required this.controller,
|
|
required this.textStyle})
|
|
: super(key: key);
|
|
final VoidCallback onPressed;
|
|
final String title;
|
|
final Color color;
|
|
final double height;
|
|
final double width;
|
|
final RoundedLoadingButtonController controller;
|
|
final TextStyle textStyle;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWell(
|
|
onTap: () {},
|
|
child: Center(
|
|
child: RoundedLoadingButton(
|
|
height:height,
|
|
width: width,
|
|
color: color,
|
|
controller: controller,
|
|
onPressed: onPressed,
|
|
successColor: ColorConstants.primaryColor,
|
|
child: Text(
|
|
title,
|
|
style: textStyle,
|
|
))),
|
|
);
|
|
}
|
|
}
|