fab static method

Widget fab(
  1. BuildContext context, {
  2. required FrontFaceChatConfig config,
  3. FrontFaceChatTheme theme = const FrontFaceChatTheme(),
  4. FrontFaceChatStrings strings = const FrontFaceChatStrings(),
  5. Color? backgroundColor,
  6. Color? foregroundColor,
  7. IconData icon = Icons.chat_bubble_outline,
  8. double extraBottomInset = 0,
})

A floating action button that opens the chat screen.

floatingActionButton: FrontFaceChat.fab(
  context,
  config: config,
  backgroundColor: Colors.black,
),

Implementation

static Widget fab(
  BuildContext context, {
  required FrontFaceChatConfig config,
  FrontFaceChatTheme theme = const FrontFaceChatTheme(),
  FrontFaceChatStrings strings = const FrontFaceChatStrings(),
  Color? backgroundColor,
  Color? foregroundColor,
  IconData icon = Icons.chat_bubble_outline,
  double extraBottomInset = 0,
}) {
  return FloatingActionButton(
    backgroundColor: backgroundColor ?? theme.primaryColor,
    foregroundColor: foregroundColor ?? theme.onPrimaryColor,
    onPressed: () => open(
      context,
      config: config,
      theme: theme,
      strings: strings,
      extraBottomInset: extraBottomInset,
    ),
    child: Icon(icon),
  );
}