import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; // ignore: must_be_immutable class FloatingBtn extends StatefulWidget { FloatingBtn({ this.height, this.width, required this.title, this.onTap, required this.icon, }); double? height; double? width; String title; VoidCallback? onTap; IconData? icon; @override State createState() => _FloatingBtnState(); } class _FloatingBtnState extends State { @override Widget build(BuildContext context) { return FloatingActionButton( onPressed: widget.onTap, child: Icon(Icons.add), ); } }