makeLabelValueBlock method

Widget makeLabelValueBlock(
  1. String label,
  2. dynamic value, {
  3. String? tooltip,
})

makeLabelValueBlock uniformizes the display of labels with values.

Implementation

Widget makeLabelValueBlock(
  String label,
  dynamic value, {
  String? tooltip,
}) {
  Widget ret = Column(
    crossAxisAlignment: CrossAxisAlignment.start,
    children: [
      Text(
        "$label:",
        style: const TextStyle(
          fontSize: 9,
          color: Colors.blue,
        ),
      ),
      Text(value.toString(), softWrap: true),
    ],
  );
  if (tooltip != null) {
    ret = Tooltip(
      message: tooltip,
      child: ret,
    );
  }
  return (ret);
}