diff --git a/lib/ui/screens/conversations_list_screen.dart b/lib/ui/screens/conversations_list_screen.dart index 68e593e..57fda64 100644 --- a/lib/ui/screens/conversations_list_screen.dart +++ b/lib/ui/screens/conversations_list_screen.dart @@ -18,6 +18,12 @@ import 'package:flutter/material.dart'; /// @author Pierre HUBERT class ConversationsListScreen extends StatefulWidget { + final bool useSmallFAB; + + const ConversationsListScreen({Key key, this.useSmallFAB = false}) + : assert(useSmallFAB != null), + super(key: key); + @override State createState() => _ConversationScreenState(); } @@ -194,9 +200,10 @@ class _ConversationScreenState extends SafeState { // Add conversation button Positioned( - right: 20.0, - bottom: 20.0, + right: widget.useSmallFAB ? 5.0 : 20.0, + bottom: widget.useSmallFAB ? 5.0 : 20.0, child: FloatingActionButton( + mini: widget.useSmallFAB, onPressed: () => _createConversation(), child: Icon(Icons.add), ), diff --git a/lib/ui/widgets/tablet_mode/conversations/open_conversation_button_widget.dart b/lib/ui/widgets/tablet_mode/conversations/open_conversation_button_widget.dart index 809864f..bed360b 100644 --- a/lib/ui/widgets/tablet_mode/conversations/open_conversation_button_widget.dart +++ b/lib/ui/widgets/tablet_mode/conversations/open_conversation_button_widget.dart @@ -38,6 +38,6 @@ class _OpenConversationButtonState extends State { width: 300, height: 500, child: Card( - child: ConversationsListScreen(), + child: ConversationsListScreen(useSmallFAB: true), )); }