getTrailingButtons method

Widget getTrailingButtons(
  1. TUIThemeData theme
)

Implementation

Widget getTrailingButtons(TUIThemeData theme) {
  List<Widget> trailingWidgets = [];

  if (downloadTapped != null) {
    trailingWidgets.add(GestureDetector(
      onTap: downloadTapped,
      child: Padding(
        padding: const EdgeInsets.all(8.0),
        child: Icon(
          FluentIcons.arrow_download_16_filled,
          color: theme.colors.disabledContent,
        ),
      ),
    ));
  }

  if (deleteTapped != null) {
    trailingWidgets.add(
      GestureDetector(
        onTap: deleteTapped,
        child: Padding(
          padding: const EdgeInsets.all(8.0),
          child: Icon(
            FluentIcons.delete_16_regular,
            color: theme.colors.disabledContent,
          ),
        ),
      ),
    );
  }

  return Padding(
    padding: const EdgeInsets.all(8.0),
    child: SizedBox(
      height: 60,
      child: Row(
        children: trailingWidgets,
      ),
    ),
  );
}