1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 21:09:21 +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(
title: Text(tr("Error")),
onClose: widget.onClose,
onToggleCollpase: _toggleVisibility,
onToggleCollapse: _toggleVisibility,
isCollapsed: _collapsed,
body: buildErrorCard(tr("Could not load conversation information!"),
actions: [
@ -93,7 +93,7 @@ class _ConversationWindowState extends SafeState<ConversationWindow> {
return ConversationWindowContainer(
title: Text(tr("Loading...")),
onClose: widget.onClose,
onToggleCollpase: _toggleVisibility,
onToggleCollapse: _toggleVisibility,
isCollapsed: _collapsed,
body: buildCenteredProgressBar(),
);
@ -101,7 +101,7 @@ class _ConversationWindowState extends SafeState<ConversationWindow> {
return ConversationWindowContainer(
title: Text(_convTitle),
onClose: widget.onClose,
onToggleCollpase: _toggleVisibility,
onToggleCollapse: _toggleVisibility,
isCollapsed: _collapsed,
body: ConversationScreen(
key: _convKey,

View File

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