2020-05-05 11:31:03 +00:00
|
|
|
import 'package:comunic/ui/routes/main_route/main_route.dart';
|
2020-05-09 05:07:14 +00:00
|
|
|
import 'package:comunic/ui/widgets/tablet_mode/conversations/conversations_area_widget.dart';
|
2020-05-05 16:18:09 +00:00
|
|
|
import 'package:comunic/ui/widgets/tablet_mode/current_user_panel.dart';
|
2020-05-08 14:06:10 +00:00
|
|
|
import 'package:comunic/ui/widgets/tablet_mode/global_search_field.dart';
|
2020-05-05 16:49:50 +00:00
|
|
|
import 'package:comunic/ui/widgets/tablet_mode/memberships_panel.dart';
|
2020-05-06 16:54:32 +00:00
|
|
|
import 'package:comunic/ui/widgets/tablet_mode/tablet_appbar_widget.dart';
|
2020-05-05 11:31:03 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
/// Main tablet route
|
|
|
|
///
|
|
|
|
/// @author Pierre Hubert
|
|
|
|
|
|
|
|
class TabletRoute extends StatefulWidget implements MainRoute {
|
|
|
|
@override
|
|
|
|
_TabletRouteState createState() => _TabletRouteState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _TabletRouteState extends State<TabletRoute> {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
appBar: _buildAppBar(),
|
|
|
|
body: _buildBody(),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2020-05-06 16:54:32 +00:00
|
|
|
Widget _buildAppBar() => ComunicTabletAppBarWidget();
|
2020-05-05 11:31:03 +00:00
|
|
|
|
2020-05-09 04:49:05 +00:00
|
|
|
Widget _buildBody() => Stack(
|
|
|
|
children: [
|
|
|
|
Row(children: <Widget>[_buildLeftPane(), _buildRightPane()]),
|
|
|
|
Positioned(right: 0, bottom: 0, child: ConversationsAreaWidget())
|
|
|
|
],
|
2020-05-05 11:31:03 +00:00
|
|
|
);
|
|
|
|
|
2020-05-05 16:18:09 +00:00
|
|
|
Widget _buildLeftPane() => Theme(
|
|
|
|
data: Theme.of(context).copyWith(
|
2020-05-05 17:33:04 +00:00
|
|
|
textTheme: TextTheme(body1: TextStyle(color: Colors.white)),
|
|
|
|
iconTheme: IconThemeData(color: Colors.white),
|
|
|
|
),
|
2020-05-05 16:18:09 +00:00
|
|
|
child: Container(
|
|
|
|
width: 300,
|
|
|
|
color: Color(0xFF222D32),
|
|
|
|
child: Column(
|
2020-05-05 16:49:50 +00:00
|
|
|
children: <Widget>[
|
|
|
|
CurrentUserPanel(),
|
2020-05-08 14:06:10 +00:00
|
|
|
Container(height: 10),
|
|
|
|
GlobalSearchField(),
|
|
|
|
Container(height: 10),
|
2020-05-05 16:49:50 +00:00
|
|
|
Expanded(child: MembershipsPanel())
|
|
|
|
],
|
2020-05-05 16:18:09 +00:00
|
|
|
),
|
|
|
|
),
|
2020-05-05 11:31:03 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
Widget _buildRightPane() => Container();
|
|
|
|
}
|