1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 12:59:21 +00:00

Use small add button

This commit is contained in:
Pierre HUBERT 2020-05-09 07:10:18 +02:00
parent fe17f81a40
commit 6cb9fd97e2
2 changed files with 10 additions and 3 deletions

View File

@ -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<StatefulWidget> createState() => _ConversationScreenState();
}
@ -194,9 +200,10 @@ class _ConversationScreenState extends SafeState<ConversationsListScreen> {
// 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),
),

View File

@ -38,6 +38,6 @@ class _OpenConversationButtonState extends State<OpenConversationButton> {
width: 300,
height: 500,
child: Card(
child: ConversationsListScreen(),
child: ConversationsListScreen(useSmallFAB: true),
));
}