buildIconLineCell function

Widget buildIconLineCell({
  1. required Icon icon,
  2. required String label,
  3. Color? labelColor,
  4. Color? valueColor,
  5. VoidCallback? voidCallback,
})

Icon + Text 横向显示

Implementation

Widget buildIconLineCell({
  required Icon icon,
  required String label,
  Color? labelColor,
  Color? valueColor,
  VoidCallback? voidCallback,
}) {
  return Ink(
    child: InkWell(
      onTap: voidCallback,
      child: Container(
        alignment: Alignment.center,
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            icon,
            const SizedBox(width: 10),
            Text(
              label,
              style: TextStyle(color: valueColor ?? MiniColor.black),
              overflow: TextOverflow.ellipsis,
            ),
          ],
        ),
      ),
    ),
  );
}