mirror of
https://github.com/haorendashu/nowser.git
synced 2025-12-17 09:54:19 +01:00
try to add linux webview support
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
import 'dart:developer';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -34,6 +35,7 @@ import 'package:provider/provider.dart';
|
||||
import 'package:quick_actions/quick_actions.dart';
|
||||
import 'package:receive_intent/receive_intent.dart' as receiveIntent;
|
||||
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
|
||||
import 'package:webview_cef/webview_cef.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
|
||||
import 'const/base.dart';
|
||||
@@ -105,6 +107,10 @@ Future<void> main() async {
|
||||
print(e);
|
||||
}
|
||||
|
||||
if (Platform.isLinux) {
|
||||
WebviewManager().initialize(userAgent: Base.USER_AGENT);
|
||||
}
|
||||
|
||||
await doInit();
|
||||
|
||||
mediaDataCache = MediaDataCache();
|
||||
|
||||
Reference in New Issue
Block a user