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:
parent
fe17f81a40
commit
6cb9fd97e2
@ -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),
|
||||
),
|
||||
|
@ -38,6 +38,6 @@ class _OpenConversationButtonState extends State<OpenConversationButton> {
|
||||
width: 300,
|
||||
height: 500,
|
||||
child: Card(
|
||||
child: ConversationsListScreen(),
|
||||
child: ConversationsListScreen(useSmallFAB: true),
|
||||
));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user