import 'package:flutter/material.dart';

class IconWithBg extends StatelessWidget {
  final IconData icon;
  final Color color;
  final Function onPress;

  const IconWithBg({Key key, this.icon, this.color, this.onPress})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
        width: 40,
        height: 40,
        decoration: BoxDecoration(
          color: Colors.grey[200],
          borderRadius: BorderRadius.circular(30),
        ),
        child: Center(
          child: IconButton(
            icon: Icon(icon, size: 20,),
            color: color,
            onPressed: () async {
            onPress();
            },
          ),
        ));
  }
}
