getImageIcon method

Widget getImageIcon(
  1. BuildContext context,
  2. TUIImage? image,
  3. IconData? icon
)

Implementation

Widget getImageIcon(BuildContext context, TUIImage? image, IconData? icon) {
  final theme = TUITheme.of(context);

  return Padding(
    padding: const EdgeInsets.all(8.0),
    child: Container(
      width: 80,
      height: 60,
      clipBehavior: Clip.hardEdge,
      decoration: BoxDecoration(
        color:
            theme.colors.surfaceVariant, // Set your desired background color
        borderRadius: BorderRadius.circular(8.0), // Set the border radius
      ),
      child: _getImageOrIcon(image, icon),
    ),
  );
}