import 'package:discover_module/contacts_module/ui_screen/newformlist.dart'; import 'package:flutter/material.dart'; class CustomFloatingBtn extends StatefulWidget { final double? height; final double? width; final Color? color; final double? borderWidth; final double? borderRadius; final IconData? icon; final Color? iconColor; final double? iconsize; final VoidCallbackAction? ontap; const CustomFloatingBtn( {super.key, this.height, this.width, this.color, this.borderRadius, this.borderWidth, this.ontap, this.icon, this.iconColor, this.iconsize}); @override State createState() => _CustomFloatingBtnState(); } class _CustomFloatingBtnState extends State { @override Widget build(BuildContext context) { return Container( width: widget.width, height: widget.height, decoration: BoxDecoration( border: Border.all( color: widget.color!, // Outer border color width: 1.8, ), borderRadius: BorderRadius.circular(widget.borderRadius!), // Rounded border boxShadow: [ BoxShadow( color: widget.color!.withOpacity(0.2), // Shadow color with opacity blurRadius: 5, // Shadow blur radius spreadRadius: 2, // Spread of the shadow offset: Offset(2, 2), // Shadow offset ), ], ), child: FloatingActionButton( // shape: CircleBorder(), shape: RoundedRectangleBorder( side: BorderSide(width: 7, color: widget.iconColor!), borderRadius: BorderRadius.circular(widget.borderRadius!)), onPressed: () async { Navigator.push( context, MaterialPageRoute(builder: (context) => FormList())); }, foregroundColor: widget.iconColor, backgroundColor: widget.color, child: Text( String.fromCharCode(widget.icon!.codePoint), style: TextStyle( color: widget.iconColor, inherit: false, fontSize: widget.iconsize, fontWeight: FontWeight.w800, fontFamily: Icons.space_dashboard_outlined.fontFamily, ), ), ), ); } }