49 lines
1.2 KiB
Dart
49 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
class CustomNextButton extends StatelessWidget {
|
|
final String text;
|
|
final Function onPressed;
|
|
final Color backgroundColor;
|
|
final double width;
|
|
final double height;
|
|
final Color textColor;
|
|
|
|
const CustomNextButton({
|
|
Key? key,
|
|
required this.text,
|
|
required this.onPressed,
|
|
this.backgroundColor = const Color(0xFFC18948),
|
|
this.width = double.infinity,
|
|
this.height = 50.0,
|
|
this.textColor = Colors.white,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ElevatedButton(
|
|
onPressed: () {
|
|
onPressed();
|
|
},
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: backgroundColor,
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
|
|
minimumSize: Size(width, height),
|
|
),
|
|
child: FittedBox(
|
|
fit: BoxFit.contain,
|
|
child: Text(
|
|
text,
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
fontFamily: "Cambria",
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 20.sp,
|
|
color: Color(0xFFFFFFFF),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|