Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update deps and remove unused deps #194

Merged
merged 2 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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