Revert "Фикс сферум он линуксь"

This reverts commit 75fd6d775d.
This commit is contained in:
ivan2282
2025-11-16 09:23:30 +03:00
parent 75fd6d775d
commit a6eeee8331
6 changed files with 16 additions and 79 deletions

View File

@@ -4,8 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:intl/intl.dart';
import 'package:gwid/api_service.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'package:flutter_linux_webview/flutter_linux_webview.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:gwid/chat_screen.dart';
import 'package:gwid/manage_account_screen.dart';
import 'package:gwid/screens/settings/settings_screen.dart';
@@ -93,10 +92,6 @@ class _ChatsScreenState extends State<ChatsScreen>
@override
void initState() {
super.initState();
LinuxWebViewPlugin.initialize();
if (Platform.isLinux){
WebView.platform = LinuxWebView();
}
_loadMyProfile();
_chatsFuture = (() async {
try {
@@ -3512,33 +3507,37 @@ class _SferumWebViewPanelState extends State<SferumWebViewPanel> {
Expanded(
child: Stack(
children: [
WebView(
initialUrl: widget.url,
javascriptMode: JavascriptMode.unrestricted,
onPageStarted: (url) {
InAppWebView(
initialUrlRequest: URLRequest(url: WebUri(widget.url)),
initialSettings: InAppWebViewSettings(
javaScriptEnabled: true,
transparentBackground: true,
useShouldOverrideUrlLoading: false,
useOnLoadResource: false,
useOnDownloadStart: false,
cacheEnabled: true,
),
onLoadStart: (controller, url) {
print('🌐 WebView начало загрузки: $url');
setState(() {
_isLoading = true;
});
},
onPageFinished: (url) {
onLoadStop: (controller, url) {
print('✅ WebView загрузка завершена: $url');
setState(() {
_isLoading = false;
});
},
onWebResourceError: (error) {
onReceivedError: (controller, request, error) {
print(
'❌ WebView ошибка: ${error.description} (${error.errorCode})',
'❌ WebView ошибка: ${error.description} (${error.type})',
);
},
backgroundColor: Colors.transparent,
gestureNavigationEnabled: true,
),
if (_isLoading)
Container(
color: Colors.grey[100], // Use your theme color instead of colors.surface
color: colors.surface,
child: const Center(child: CircularProgressIndicator()),
),
],

View File

@@ -140,10 +140,3 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
endif()
# This include() command was automatically added by the flutter_linux_webview
# plugin when building the app with the plugin. The app executable must be
# linked to the CEF library for the WebView plugin to work. This command links
# the app executable to the CEF library.
include(flutter/ephemeral/.plugin_symlinks/flutter_linux_webview/linux/cmake/link_to_cef_library.cmake)

View File

@@ -8,7 +8,6 @@
#include <dynamic_color/dynamic_color_plugin.h>
#include <file_selector_linux/file_selector_plugin.h>
#include <flutter_linux_webview/flutter_linux_webview_plugin.h>
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
#include <flutter_timezone/flutter_timezone_plugin.h>
#include <gtk/gtk_plugin.h>
@@ -23,9 +22,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) flutter_linux_webview_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterLinuxWebviewPlugin");
flutter_linux_webview_plugin_register_with_registrar(flutter_linux_webview_registrar);
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);

View File

@@ -5,7 +5,6 @@
list(APPEND FLUTTER_PLUGIN_LIST
dynamic_color
file_selector_linux
flutter_linux_webview
flutter_secure_storage_linux
flutter_timezone
gtk

View File

@@ -470,14 +470,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.0.0"
flutter_linux_webview:
dependency: "direct main"
description:
name: flutter_linux_webview
sha256: a11fa8fea77a128e3ffbfefa0324e34df289af56f9d0f94e9569e0daa545bb8a
url: "https://pub.dev"
source: hosted
version: "0.1.3"
flutter_localizations:
dependency: "direct main"
description: flutter
@@ -749,14 +741,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.1.1"
logging:
dependency: transitive
description:
name: logging
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
url: "https://pub.dev"
source: hosted
version: "1.3.0"
markdown:
dependency: transitive
description:
@@ -1490,38 +1474,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.4.0"
webview_flutter:
dependency: "direct main"
description:
name: webview_flutter
sha256: "392c1d83b70fe2495de3ea2c84531268d5b8de2de3f01086a53334d8b6030a88"
url: "https://pub.dev"
source: hosted
version: "3.0.4"
webview_flutter_android:
dependency: transitive
description:
name: webview_flutter_android
sha256: "8b3b2450e98876c70bfcead876d9390573b34b9418c19e28168b74f6cb252dbd"
url: "https://pub.dev"
source: hosted
version: "2.10.4"
webview_flutter_platform_interface:
dependency: transitive
description:
name: webview_flutter_platform_interface
sha256: "812165e4e34ca677bdfbfa58c01e33b27fd03ab5fa75b70832d4b7d4ca1fa8cf"
url: "https://pub.dev"
source: hosted
version: "1.9.5"
webview_flutter_wkwebview:
dependency: transitive
description:
name: webview_flutter_wkwebview
sha256: a5364369c758892aa487cbf59ea41d9edd10f9d9baf06a94e80f1bd1b4c7bbc0
url: "https://pub.dev"
source: hosted
version: "2.9.5"
win32:
dependency: transitive
description:

View File

@@ -121,8 +121,6 @@ dependencies:
flutter_inappwebview: ^6.1.5
chewie: ^1.7.5
webview_flutter: ^3.0.4
flutter_linux_webview: ^0.1.0
dev_dependencies:
flutter_test: