feat : button , outlined button
fab button , fab outlined button , input , pagination widget's
This commit is contained in:
58
lib/presentation/widget/buttons/elevated.dart
Normal file
58
lib/presentation/widget/buttons/elevated.dart
Normal 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),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user