1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-26 12:58:51 +00:00

Add button to open new conversations

This commit is contained in:
Pierre HUBERT 2020-05-09 06:49:05 +02:00
parent 13cd3186f5
commit b0fd0d7d51
2 changed files with 37 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import 'package:comunic/ui/routes/main_route/main_route.dart';
import 'package:comunic/ui/widgets/tablet_mode/conversations_area_widget.dart';
import 'package:comunic/ui/widgets/tablet_mode/current_user_panel.dart';
import 'package:comunic/ui/widgets/tablet_mode/global_search_field.dart';
import 'package:comunic/ui/widgets/tablet_mode/memberships_panel.dart';
@ -25,8 +26,11 @@ class _TabletRouteState extends State<TabletRoute> {
Widget _buildAppBar() => ComunicTabletAppBarWidget();
Widget _buildBody() => Row(
children: <Widget>[_buildLeftPane(), _buildRightPane()],
Widget _buildBody() => Stack(
children: [
Row(children: <Widget>[_buildLeftPane(), _buildRightPane()]),
Positioned(right: 0, bottom: 0, child: ConversationsAreaWidget())
],
);
Widget _buildLeftPane() => Theme(

View File

@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
/// Conversations area widget
///
/// This widget allow floating conversations in tablet mode
///
/// @author Pierre
class ConversationsAreaWidget extends StatefulWidget {
@override
_ConversationsAreaWidgetState createState() =>
_ConversationsAreaWidgetState();
}
class _ConversationsAreaWidgetState extends State<ConversationsAreaWidget> {
@override
Widget build(BuildContext context) {
return Row(
children: <Widget>[_buildOpenButton()],
);
}
/// Add a button to open new conversations
Widget _buildOpenButton() => Padding(
padding: const EdgeInsets.all(15.0),
child: FloatingActionButton(
onPressed: () {},
child: Icon(Icons.message),
),
);
}