1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-10-23 06:53:23 +00:00

Fix theming issues

This commit is contained in:
Pierre HUBERT 2020-05-06 17:53:27 +02:00
parent 968321b12c
commit 5c4020d511
2 changed files with 6 additions and 3 deletions

View File

@ -171,8 +171,7 @@ class _MembershipsPanelState extends SafeState<MembershipsPanel> {
try {
if (!accept &&
!await showConfirmDialog(
context: Scaffold.of(context)
.context, // Without this the text appears in white
context: context,
message:
tr("Do you really want to reject this friendship request?")))
return;

View File

@ -146,8 +146,12 @@ Future<bool> showConfirmDialog({
}) async {
if (title == null) title = tr("Confirm operation");
// Avoid potential theme issues
var ctx = Scaffold.of(context).context;
ctx = ctx!= null ? ctx : context;
final result = await showDialog<bool>(
context: context,
context: ctx,
builder: (c) => AlertDialog(
title: Text(title),
content: Text(message),