Skip to content

Commit

Permalink
fix(deps): update deps and remove unused deps (#194)
Browse files Browse the repository at this point in the history
* fix(deps): update deps and remove unused deps

* Update go_router version in pubspec.yaml
  • Loading branch information
MiaoMint authored Jan 19, 2024
1 parent bc03074 commit f6019be
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 129 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace "miru.miaomint"
compileSdkVersion flutter.compileSdkVersion
compileSdkVersion 34
ndkVersion flutter.ndkVersion

compileOptions {
Expand All @@ -63,7 +63,7 @@ android {
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
targetSdkVersion 28
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
4 changes: 2 additions & 2 deletions lib/views/pages/tracking/anilist_webview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class _AnilistWebViewPageState extends State<AnilistWebViewPage> {

@override
void dispose() {
CookieManager.instance().deleteCookies(url: Uri.parse(widget.url));
CookieManager.instance().deleteCookies(url: WebUri(widget.url));
super.dispose();
}

Expand All @@ -30,7 +30,7 @@ class _AnilistWebViewPageState extends State<AnilistWebViewPage> {
),
body: InAppWebView(
initialUrlRequest: URLRequest(
url: Uri.parse(widget.url),
url: WebUri(widget.url),
),
onLoadStart: (controller, url) async {
if (url != null && url.path != "/login") {
Expand Down
8 changes: 3 additions & 5 deletions lib/views/pages/webview_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,10 @@ class _WebViewPageState extends State<WebViewPage> {
),
body: InAppWebView(
initialUrlRequest: URLRequest(
url: Uri.parse(url),
url: WebUri(url),
),
initialOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
userAgent: MiruStorage.getUASetting(),
),
initialSettings: InAppWebViewSettings(
userAgent: MiruStorage.getUASetting(),
),
onLoadStart: (controller, url) {
setState(() {
Expand Down
58 changes: 30 additions & 28 deletions lib/views/widgets/cache_network_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,35 +153,37 @@ class _ThumnailPageState extends State<_ThumnailPage> {
}

Widget _buildContent(BuildContext context) {
return ExtendedImageSlidePage(
slideAxis: SlideAxis.both,
slideType: SlideType.onlyImage,
slidePageBackgroundHandler: (offset, pageSize) {
final color = Platform.isAndroid
? Theme.of(context).scaffoldBackgroundColor
: fluent.FluentTheme.of(context).scaffoldBackgroundColor;
return color.withOpacity(0);
},
child: ExtendedImage.network(
widget.url,
headers: widget.headers,
cache: true,
fit: BoxFit.contain,
mode: ExtendedImageMode.gesture,
initGestureConfigHandler: (state) {
return GestureConfig(
minScale: 0.9,
animationMinScale: 0.7,
maxScale: 3.0,
animationMaxScale: 3.5,
speed: 1.0,
inertialSpeed: 100.0,
initialScale: 1.0,
inPageView: true,
reverseMousePointerScrollDirection: true,
initialAlignment: InitialAlignment.center,
);
return Center(
child: ExtendedImageSlidePage(
slideAxis: SlideAxis.both,
slideType: SlideType.onlyImage,
slidePageBackgroundHandler: (offset, pageSize) {
final color = Platform.isAndroid
? Theme.of(context).scaffoldBackgroundColor
: fluent.FluentTheme.of(context).scaffoldBackgroundColor;
return color.withOpacity(0);
},
child: ExtendedImage.network(
widget.url,
headers: widget.headers,
cache: true,
fit: BoxFit.contain,
mode: ExtendedImageMode.gesture,
initGestureConfigHandler: (state) {
return GestureConfig(
minScale: 0.9,
animationMinScale: 0.7,
maxScale: 3.0,
animationMaxScale: 3.5,
speed: 1.0,
inertialSpeed: 100.0,
initialScale: 1.0,
inPageView: true,
reverseMousePointerScrollDirection: true,
initialAlignment: InitialAlignment.center,
);
},
),
),
);
}
Expand Down
2 changes: 2 additions & 0 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Foundation

import desktop_multi_window
import device_info_plus
import flutter_inappwebview_macos
import flutter_js
import isar_flutter_libs
import media_kit_libs_macos_video
Expand All @@ -23,6 +24,7 @@ import window_manager
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FlutterMultiWindowPlugin.register(with: registry.registrar(forPlugin: "FlutterMultiWindowPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin"))
FlutterJsPlugin.register(with: registry.registrar(forPlugin: "FlutterJsPlugin"))
IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin"))
MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin"))
Expand Down
Loading

0 comments on commit f6019be

Please sign in to comment.