fab static method
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,
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),
);
}