ButtonWidget.primary constructor

ButtonWidget.primary(
  1. BuildContext context, {
  2. Key? key,
  3. required String title,
  4. Function? onPressed,
  5. Color? disabledColor,
  6. Color? color,
  7. EdgeInsetsGeometry? padding,
})

Implementation

ButtonWidget.primary(
  BuildContext context, {
  super.key,
  required String title,
  Function? onPressed,
  Color? disabledColor,
  Color? color,
  EdgeInsetsGeometry? padding,
}) : super(
       onPressed: onPressed as void Function()?,
       style: ElevatedButton.styleFrom(
         backgroundColor: Theme.of(context).primaryColor,
         padding: padding ?? const EdgeInsets.all(12),
       ),
       child: Text(
         title,
         style: const TextStyle(
           fontSize: 15,
           fontWeight: FontWeight.w700,
           color: Colors.white,
         ),
       ),
     );