mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-30 00:36:28 +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
|
/// @author Pierre HUBERT
|
||||||
|
|
||||||
class ConversationsListScreen extends StatefulWidget {
|
class ConversationsListScreen extends StatefulWidget {
|
||||||
|
final bool useSmallFAB;
|
||||||
|
|
||||||
|
const ConversationsListScreen({Key key, this.useSmallFAB = false})
|
||||||
|
: assert(useSmallFAB != null),
|
||||||
|
super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<StatefulWidget> createState() => _ConversationScreenState();
|
State<StatefulWidget> createState() => _ConversationScreenState();
|
||||||
}
|
}
|
||||||
@ -194,9 +200,10 @@ class _ConversationScreenState extends SafeState<ConversationsListScreen> {
|
|||||||
|
|
||||||
// Add conversation button
|
// Add conversation button
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 20.0,
|
right: widget.useSmallFAB ? 5.0 : 20.0,
|
||||||
bottom: 20.0,
|
bottom: widget.useSmallFAB ? 5.0 : 20.0,
|
||||||
child: FloatingActionButton(
|
child: FloatingActionButton(
|
||||||
|
mini: widget.useSmallFAB,
|
||||||
onPressed: () => _createConversation(),
|
onPressed: () => _createConversation(),
|
||||||
child: Icon(Icons.add),
|
child: Icon(Icons.add),
|
||||||
),
|
),
|
||||||
|
@ -38,6 +38,6 @@ class _OpenConversationButtonState extends State<OpenConversationButton> {
|
|||||||
width: 300,
|
width: 300,
|
||||||
height: 500,
|
height: 500,
|
||||||
child: Card(
|
child: Card(
|
||||||
child: ConversationsListScreen(),
|
child: ConversationsListScreen(useSmallFAB: true),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user