selectingBuilder static method

Widget selectingBuilder(
  1. BuildContext context,
  2. ChatsTabController c
)

Builds a BottomPaddedRow for selecting the Chats.

Implementation

static Widget selectingBuilder(BuildContext context, ChatsTabController c) {
  final style = Theme.of(context).style;

  return BottomPaddedRow(
    spacer: (_) {
      return Container(
        decoration: BoxDecoration(color: style.colors.onBackgroundOpacity13),
        width: 1,
        height: 24,
      );
    },
    children: [
      WidgetButton(
        onPressed: c.readAll,
        child: Center(
          child: Padding(
            padding: const EdgeInsets.fromLTRB(10, 6.5, 10, 6.5),
            child: Text(
              'btn_read_all'.l10n,
              style: style.fonts.normal.regular.primary,
              maxLines: 1,
              overflow: TextOverflow.ellipsis,
            ),
          ),
        ),
      ),
      WidgetButton(
        onPressed: c.selectedChats.isEmpty
            ? null
            : () => _hideChats(context, c),
        child: Center(
          child: Padding(
            padding: const EdgeInsets.fromLTRB(10, 6.5, 10, 6.5),
            child: Text(
              'btn_hide'.l10n,
              style: style.fonts.normal.regular.primary,
              maxLines: 1,
              overflow: TextOverflow.ellipsis,
            ),
          ),
        ),
      ),
      WidgetButton(
        key: const Key('DeleteChatsButton'),
        onPressed: c.selectedChats.isEmpty
            ? null
            : () => _hideChats(context, c),
        child: Center(
          child: Padding(
            padding: const EdgeInsets.fromLTRB(10, 6.5, 10, 6.5),
            child: Text(
              'btn_delete'.l10n,
              style: style.fonts.normal.regular.danger,
              maxLines: 1,
              overflow: TextOverflow.ellipsis,
            ),
          ),
        ),
      ),
    ],
  );
}