defaultSendButton function Default widgets

Widget Function(Function send) defaultSendButton({
  1. required Color color,
  2. IconData icon = Icons.send,
  3. EdgeInsets? padding,
  4. bool disabled = false,
})

Implementation

Widget Function(Function send) defaultSendButton({
  required Color color,
  IconData icon = Icons.send,
  EdgeInsets? padding,
  bool disabled = false,
}) =>
    (Function fct) => InkWell(
          onTap: disabled ? null : () => fct(),
          child: Padding(
            padding: padding ??
                const EdgeInsets.symmetric(horizontal: 8, vertical: 10),
            child: Icon(
              Icons.send,
              color: color,
            ),
          ),
        );