You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
840B

  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_svg/svg.dart';
  3. import '../../../themes/app_colors.dart';
  4. import '../../../utils/app_images.dart';
  5. class FloatButtonWidget extends StatelessWidget {
  6. final Function onPressed;
  7. final String? icon;
  8. const FloatButtonWidget({
  9. Key? key,
  10. required this.onPressed,
  11. this.icon,
  12. }) : super(key: key);
  13. @override
  14. Widget build(BuildContext context) {
  15. return InkWell(
  16. onTap: () {
  17. onPressed();
  18. },
  19. child: Container(
  20. width: 52,
  21. height: 52,
  22. decoration: BoxDecoration(
  23. borderRadius: BorderRadius.circular(52),
  24. color: AppColors.primary2,
  25. ),
  26. padding: const EdgeInsets.all(14),
  27. child: SvgPicture.asset(
  28. icon ?? AssetSVG.icAddCircle,
  29. ),
  30. ),
  31. );
  32. }
  33. }