feat : button , outlined button

fab button , fab outlined button ,
input , pagination widget's
This commit is contained in:
2025-04-06 15:39:00 +03:30
parent 822e22d541
commit 50cc84461e
34 changed files with 3150 additions and 27 deletions

View File

@@ -0,0 +1,58 @@
import 'package:flutter/material.dart';
import 'package:rasadyar_app/presentation/common/app_color.dart';
import 'package:rasadyar_app/presentation/common/app_fonts.dart';
class RElevated extends StatefulWidget {
RElevated({
super.key,
required this.text,
required this.onPressed,
foregroundColor,
backgroundColor,
disabledBackgroundColor,
disabledForegroundColor,
radius,
textStyle,
this.width = 150.0,
this.height = 56.0,
});
final String text;
final VoidCallback? onPressed;
final double width;
final double height;
Color? foregroundColor;
Color? backgroundColor;
Color? disabledForegroundColor;
Color? disabledBackgroundColor;
double? radius;
TextStyle? textStyle;
@override
State<RElevated> createState() => _RElevatedState();
}
class _RElevatedState extends State<RElevated> {
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: () {
setState(() {});
},
style: ElevatedButton.styleFrom(
backgroundColor: widget.backgroundColor ?? AppColor.blueNormal,
foregroundColor: widget.foregroundColor ?? Colors.white,
disabledBackgroundColor:
widget.disabledBackgroundColor ?? AppColor.blueNormal.withAlpha(38),
disabledForegroundColor: widget.disabledForegroundColor ?? Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(widget.radius ?? 8),
),
fixedSize: Size(widget.width, widget.height),
padding: EdgeInsets.zero,
textStyle: widget.textStyle ?? AppFonts.yekan24Regular,
),
child: Text(widget.text),
);
}
}