feat: tela de apps com logos/menu de exclusao, correcao de tema nas mini apps e sidebar de navegacao
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
import 'package:material_ui/material_ui.dart';
|
||||
import 'package:tatchat/l10n/l10n.dart';
|
||||
|
||||
/// Native implementation of [MiniAppShell] using an isolated [InAppWebView].
|
||||
@@ -42,7 +42,7 @@ class _MiniAppShellState extends State<MiniAppShell> {
|
||||
<script>
|
||||
window.addEventListener('message', function (event) {
|
||||
var msg = event.data;
|
||||
if (!msg || msg.api !== 'fromMiniApp') return;
|
||||
if (!msg || msg.api !== 'fromMiniApp' || msg.response !== undefined) return;
|
||||
window.flutter_inappwebview.callHandler('$_handlerName', msg).then(function (response) {
|
||||
var reply = Object.assign({}, msg, { response: response });
|
||||
window.postMessage(reply, '*');
|
||||
@@ -63,8 +63,9 @@ window.addEventListener('message', function (event) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(widget.title),
|
||||
backgroundColor: theme.colorScheme.primary,
|
||||
foregroundColor: theme.colorScheme.onPrimary,
|
||||
backgroundColor: theme.colorScheme.surface,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
foregroundColor: theme.colorScheme.onSurface,
|
||||
actions: [
|
||||
IconButton(
|
||||
tooltip: L10n.of(context).refresh,
|
||||
|
||||
Reference in New Issue
Block a user