import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';

import '../../../themes/app_colors.dart';
import '../../../utils/app_images.dart';

class FloatButtonWidget extends StatelessWidget {
  final Function onPressed;
  final String? icon;
  const FloatButtonWidget({
    Key? key,
    required this.onPressed,
    this.icon,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: () {
        onPressed();
      },
      child: Container(
        width: 52,
        height: 52,
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(52),
          color: AppColors.primary2,
        ),
        padding: const EdgeInsets.all(14),
        child: SvgPicture.asset(
          icon ?? AssetSVG.icAddCircle,
        ),
      ),
    );
  }
}
