You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
698 B
Dart
30 lines
698 B
Dart
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(
|
|
margin: EdgeInsets.only(left: 25),
|
|
width: 40,
|
|
height: 40,
|
|
decoration: BoxDecoration(
|
|
color: Colors.grey[300],
|
|
borderRadius: BorderRadius.circular(30),
|
|
),
|
|
child: IconButton(
|
|
icon: Icon(icon),
|
|
color: color,
|
|
onPressed: () async {
|
|
onPress();
|
|
},
|
|
));
|
|
}
|
|
}
|