1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-29 16:26:27 +00:00
This commit is contained in:
Pierre HUBERT 2020-05-09 10:20:44 +02:00
parent 2cea14a012
commit b020895a8c
2 changed files with 7 additions and 7 deletions

View File

@ -76,7 +76,7 @@ class _ConversationWindowState extends SafeState<ConversationWindow> {
return ConversationWindowContainer( return ConversationWindowContainer(
title: Text(tr("Error")), title: Text(tr("Error")),
onClose: widget.onClose, onClose: widget.onClose,
onToggleCollpase: _toggleVisibility, onToggleCollapse: _toggleVisibility,
isCollapsed: _collapsed, isCollapsed: _collapsed,
body: buildErrorCard(tr("Could not load conversation information!"), body: buildErrorCard(tr("Could not load conversation information!"),
actions: [ actions: [
@ -93,7 +93,7 @@ class _ConversationWindowState extends SafeState<ConversationWindow> {
return ConversationWindowContainer( return ConversationWindowContainer(
title: Text(tr("Loading...")), title: Text(tr("Loading...")),
onClose: widget.onClose, onClose: widget.onClose,
onToggleCollpase: _toggleVisibility, onToggleCollapse: _toggleVisibility,
isCollapsed: _collapsed, isCollapsed: _collapsed,
body: buildCenteredProgressBar(), body: buildCenteredProgressBar(),
); );
@ -101,7 +101,7 @@ class _ConversationWindowState extends SafeState<ConversationWindow> {
return ConversationWindowContainer( return ConversationWindowContainer(
title: Text(_convTitle), title: Text(_convTitle),
onClose: widget.onClose, onClose: widget.onClose,
onToggleCollpase: _toggleVisibility, onToggleCollapse: _toggleVisibility,
isCollapsed: _collapsed, isCollapsed: _collapsed,
body: ConversationScreen( body: ConversationScreen(
key: _convKey, key: _convKey,

View File

@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
class ConversationWindowContainer extends StatelessWidget { class ConversationWindowContainer extends StatelessWidget {
final Widget title; final Widget title;
final void Function() onClose; final void Function() onClose;
final void Function() onToggleCollpase; final void Function() onToggleCollapse;
final bool isCollapsed; final bool isCollapsed;
final Widget body; final Widget body;
@ -18,12 +18,12 @@ class ConversationWindowContainer extends StatelessWidget {
@required this.title, @required this.title,
@required this.onClose, @required this.onClose,
@required this.body, @required this.body,
@required this.onToggleCollpase, @required this.onToggleCollapse,
@required this.isCollapsed, @required this.isCollapsed,
}) : assert(title != null), }) : assert(title != null),
assert(onClose != null), assert(onClose != null),
assert(body != null), assert(body != null),
assert(onToggleCollpase != null), assert(onToggleCollapse != null),
assert(isCollapsed != null), assert(isCollapsed != null),
super(key: key); super(key: key);
@ -35,7 +35,7 @@ class ConversationWindowContainer extends StatelessWidget {
height: !isCollapsed ? 400 : 40, height: !isCollapsed ? 400 : 40,
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
title: GestureDetector(child: title, onTap: onToggleCollpase), title: GestureDetector(child: title, onTap: onToggleCollapse),
actions: <Widget>[ actions: <Widget>[
IconButton(icon: Icon(Icons.close), onPressed: onClose), IconButton(icon: Icon(Icons.close), onPressed: onClose),
], ],