fix: Add missing safearea

This commit is contained in:
Christian Pauly 2020-11-07 10:18:51 +01:00
parent 03c3ffac0f
commit caab868895

View File

@ -577,7 +577,8 @@ class _ChatState extends State<_Chat> {
width: double.infinity, width: double.infinity,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
Column( SafeArea(
child: Column(
children: <Widget>[ children: <Widget>[
ConnectionStatusHeader(), ConnectionStatusHeader(),
Expanded( Expanded(
@ -648,8 +649,8 @@ class _ChatState extends State<_Chat> {
? Alignment.topRight ? Alignment.topRight
: Alignment.topLeft, : Alignment.topLeft,
child: Container( child: Container(
padding: padding: EdgeInsets.symmetric(
EdgeInsets.symmetric(horizontal: 4), horizontal: 4),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context) color: Theme.of(context)
.scaffoldBackgroundColor .scaffoldBackgroundColor
@ -662,8 +663,8 @@ class _ChatState extends State<_Chat> {
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: color: Theme.of(context)
Theme.of(context).primaryColor, .primaryColor,
), ),
), ),
), ),
@ -723,7 +724,8 @@ class _ChatState extends State<_Chat> {
); );
} }
}, },
scrollToEventId: (String eventId) => scrollToEventId:
(String eventId) =>
_scrollToEventId(eventId, _scrollToEventId(eventId,
context: context), context: context),
longPressSelect: longPressSelect:
@ -757,7 +759,8 @@ class _ChatState extends State<_Chat> {
} }
var emojis = List<String>.from(AppEmojis.emojis); var emojis = List<String>.from(AppEmojis.emojis);
final allReactionEvents = selectedEvents.first final allReactionEvents = selectedEvents.first
.aggregatedEvents(timeline, RelationshipTypes.Reaction) .aggregatedEvents(
timeline, RelationshipTypes.Reaction)
?.where((event) => ?.where((event) =>
event.senderId == event.room.client.userID && event.senderId == event.room.client.userID &&
event.type == 'm.reaction'); event.type == 'm.reaction');
@ -828,7 +831,8 @@ class _ChatState extends State<_Chat> {
color: Theme.of(context).secondaryHeaderColor, color: Theme.of(context).secondaryHeaderColor,
thickness: 1, thickness: 1,
), ),
room.canSendDefaultMessages && room.membership == Membership.join room.canSendDefaultMessages &&
room.membership == Membership.join
? Container( ? Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).backgroundColor, color: Theme.of(context).backgroundColor,
@ -862,7 +866,8 @@ class _ChatState extends State<_Chat> {
onPressed: () => replyAction(), onPressed: () => replyAction(),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Text(L10n.of(context).reply), Text(
L10n.of(context).reply),
Icon(Icons Icon(Icons
.keyboard_arrow_right), .keyboard_arrow_right),
], ],
@ -916,8 +921,8 @@ class _ChatState extends State<_Chat> {
foregroundColor: Colors.white, foregroundColor: Colors.white,
child: Icon(Icons.attachment), child: Icon(Icons.attachment),
), ),
title: title: Text(
Text(L10n.of(context).sendFile), L10n.of(context).sendFile),
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
), ),
), ),
@ -939,13 +944,15 @@ class _ChatState extends State<_Chat> {
value: 'camera', value: 'camera',
child: ListTile( child: ListTile(
leading: CircleAvatar( leading: CircleAvatar(
backgroundColor: Colors.purple, backgroundColor:
Colors.purple,
foregroundColor: Colors.white, foregroundColor: Colors.white,
child: Icon(Icons.camera_alt), child: Icon(Icons.camera_alt),
), ),
title: Text( title: Text(L10n.of(context)
L10n.of(context).openCamera), .openCamera),
contentPadding: EdgeInsets.all(0), contentPadding:
EdgeInsets.all(0),
), ),
), ),
if (PlatformInfos.isMobile) if (PlatformInfos.isMobile)
@ -959,7 +966,8 @@ class _ChatState extends State<_Chat> {
), ),
title: Text(L10n.of(context) title: Text(L10n.of(context)
.voiceMessage), .voiceMessage),
contentPadding: EdgeInsets.all(0), contentPadding:
EdgeInsets.all(0),
), ),
), ),
], ],
@ -1022,7 +1030,8 @@ class _ChatState extends State<_Chat> {
), ),
), ),
), ),
if (PlatformInfos.isMobile && inputText.isEmpty) if (PlatformInfos.isMobile &&
inputText.isEmpty)
Container( Container(
height: 56, height: 56,
alignment: Alignment.center, alignment: Alignment.center,
@ -1048,6 +1057,7 @@ class _ChatState extends State<_Chat> {
: Container(), : Container(),
], ],
), ),
),
], ],
), ),
); );