#
whycq
2025-03-03 6a90c5bde0facc8330ce4c7c7d89292717b7ac65
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
 
class RoundIconBtn extends StatelessWidget {
 
  final VoidCallback? onTap;
  final IconData icon;
  final double? iconSize;
  final Color? iconColor;
  final double? height;
  final double? width;
  final EdgeInsets? padding;
 
  const RoundIconBtn({
    Key? key,
    this.onTap,
    required this.icon,
    this.iconSize,
    this.iconColor,
    this.height,
    this.width,
    this.padding
  }): super(key: key);
 
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.all(2),
      child: InkWell(
        onTap: onTap ?? (){},
        borderRadius: BorderRadius.circular(50),
        highlightColor: Colors.white10,
        child: Container(
            height: height ?? 30,
            width: width ?? 30,
            padding: padding,
            child: Icon(icon,color: iconColor ?? Colors.black,)
        ),
      ),
    );
  }
}