12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import 'package:flutter/material.dart';
- /// Description: 社交icon
- /// Time : 05/11/2023 Thursday
- /// Author : liuyuqi.gov@msn.cn
- class SocialIcon extends StatelessWidget {
- /// 颜色
- final Color color;
- /// 图标
- final IconData icon;
- /// 点击事件
- final Function press;
- const SocialIcon(
- {super.key,
- required this.color,
- required this.icon,
- required this.press});
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: EdgeInsets.only(left: 14),
- child: Container(
- width: 45,
- height: 45,
- decoration: BoxDecoration(shape: BoxShape.circle, color: color),
- child: RawMaterialButton(
- shape: CircleBorder(),
- onPressed: () {
- press();
- },
- child: Icon(
- icon,
- color: Colors.white,
- ),
- ),
- ),
- );
- }
- }
|