mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 12:57:24 +00:00
Compare commits
12 Commits
v1.1.1
...
558832d188
Author | SHA1 | Date | |
---|---|---|---|
558832d188 | |||
2be88895ed | |||
1a110e711d | |||
1ad8329797 | |||
1cf4da66ad | |||
5dad6910fc | |||
72eb4a51ea | |||
3d49bebc44 | |||
e86f8b7f51 | |||
![]() |
20130ef89e | ||
![]() |
b76fbf040b | ||
018fb11ca5 |
27
.github/workflows/main.yml
vendored
27
.github/workflows/main.yml
vendored
@@ -107,7 +107,7 @@ jobs:
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y ninja-build libgtk-3-dev webkit2gtk-4.1
|
||||
dart pub global activate flutter_to_debian
|
||||
- run: python3 debian/build.py
|
||||
- run: python3 debian/build.py x64
|
||||
- run: dart run flutter_to_arch
|
||||
- run: |
|
||||
sudo rm -rf build/linux/arch/app.tar.gz
|
||||
@@ -122,10 +122,27 @@ jobs:
|
||||
with:
|
||||
name: arch_build
|
||||
path: build/linux/arch/
|
||||
|
||||
Build_Linux_ARM64:
|
||||
runs-on: ubuntu-22.04-arm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'master'
|
||||
flutter-version-file: pubspec.yaml
|
||||
- run: |
|
||||
flutter pub get
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y ninja-build libgtk-3-dev webkit2gtk-4.1
|
||||
dart pub global activate flutter_to_debian
|
||||
- run: python3 debian/build.py arm64
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: deb_arm64_build
|
||||
path: build/linux/x64/release/debian # This is a bug related to flutter_to_debian, but it's not a big deal.
|
||||
Release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [Build_MacOS, Build_IOS, Build_Android, Build_Windows, Build_Linux]
|
||||
needs: [Build_MacOS, Build_IOS, Build_Android, Build_Windows, Build_Linux, Build_Linux_ARM64]
|
||||
if: github.event_name == 'release' # 仅在 push 事件时执行
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
@@ -152,6 +169,10 @@ jobs:
|
||||
with:
|
||||
name: arch_build
|
||||
path: outputs
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: deb_arm64_build
|
||||
path: outputs
|
||||
- uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# pixes
|
||||
|
||||
[](https://flutter.dev/)
|
||||
[](https://flutter.dev/)
|
||||
[](https://github.com/wgh136/pixes/blob/master/LICENSE)
|
||||
[](https://github.com/wgh136/pixes)
|
||||
[](https://github.com/wgh136/pixes/stargazers)
|
||||
@@ -31,7 +31,7 @@ Run `flutter build ios/windows/macos`
|
||||
|
||||
### Build Linux
|
||||
|
||||
Use`python3 debian/build.py` to build deb package
|
||||
Use`python3 debian/build.py {ARCH}` to build deb package. Replace {ARCH} with `x64` or `arm64`.
|
||||
|
||||
For other linux distributions, you can use `flutter build linux` to build.
|
||||
You must register the `pixiv` scheme in the `.desktop` file, otherwise the login will not work.
|
||||
|
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
|
@@ -19,7 +19,7 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version "8.2.1" apply false
|
||||
id "com.android.application" version "8.9.0" apply false
|
||||
id "org.jetbrains.kotlin.android" version "2.1.0" apply false
|
||||
}
|
||||
|
||||
|
@@ -184,7 +184,8 @@
|
||||
"Emphasize artworks from following artists": "强调关注画师的作品",
|
||||
"The border of the artworks will be darker": "作品的边框将被加深",
|
||||
"Initial Page": "初始页面",
|
||||
"Close the pane to apply the settings": "关闭面板以应用设置"
|
||||
"Close the pane to apply the settings": "关闭面板以应用设置",
|
||||
"No results found": "未找到结果"
|
||||
},
|
||||
"zh_TW": {
|
||||
"Search": "搜索",
|
||||
@@ -371,6 +372,7 @@
|
||||
"Emphasize artworks from following artists": "強調關注畫師的作品",
|
||||
"The border of the artworks will be darker": "作品的邊框將被加深",
|
||||
"Initial Page": "初始頁面",
|
||||
"Close the pane to apply the settings": "關閉面板以應用設置"
|
||||
"Close the pane to apply the settings": "關閉面板以應用設置",
|
||||
"No results found": "未找到結果"
|
||||
}
|
||||
}
|
12
debian/build.py
vendored
12
debian/build.py
vendored
@@ -1,6 +1,7 @@
|
||||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
|
||||
arch = sys.argv[1]
|
||||
debianContent = ''
|
||||
desktopContent = ''
|
||||
version = ''
|
||||
@@ -13,7 +14,14 @@ with open('pubspec.yaml', 'r') as f:
|
||||
version = str.split(str.split(f.read(), 'version: ')[1], '+')[0]
|
||||
|
||||
with open('debian/debian.yaml', 'w') as f:
|
||||
f.write(debianContent.replace('{{Version}}', version))
|
||||
content = debianContent.replace('{{Version}}', version)
|
||||
if arch == 'x64':
|
||||
content = content.replace('{{Arch}}', 'x64')
|
||||
content = content.replace('{{Architecture}}', 'amd64')
|
||||
elif arch == 'arm64':
|
||||
content = content.replace('{{Arch}}', 'arm64')
|
||||
content = content.replace('{{Architecture}}', 'arm64')
|
||||
f.write(content)
|
||||
with open('debian/gui/pixes.desktop', 'w') as f:
|
||||
f.write(desktopContent.replace('{{Version}}', version))
|
||||
|
||||
|
6
debian/debian.yaml
vendored
6
debian/debian.yaml
vendored
@@ -1,6 +1,6 @@
|
||||
flutter_app:
|
||||
command: pixes
|
||||
arch: x64
|
||||
arch: {{Arch}}
|
||||
parent: /usr/local/lib
|
||||
nonInteractive: true
|
||||
execFieldCodes: u
|
||||
@@ -8,9 +8,9 @@ flutter_app:
|
||||
control:
|
||||
Package: pixes
|
||||
Version: {{Version}}
|
||||
Architecture: amd64
|
||||
Architecture: {{Architecture}}
|
||||
Priority: optional
|
||||
Depends:
|
||||
Depends: libwebkit2gtk-4.1-0, libgtk-3-0
|
||||
Maintainer: nyne
|
||||
Description: Unofficial pixiv application
|
||||
|
||||
|
315
lib/components/search_field.dart
Normal file
315
lib/components/search_field.dart
Normal file
@@ -0,0 +1,315 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart';
|
||||
import 'package:pixes/foundation/app.dart';
|
||||
|
||||
class AutoCompleteItem {
|
||||
final String title;
|
||||
final String? subtitle;
|
||||
final VoidCallback onTap;
|
||||
|
||||
const AutoCompleteItem({
|
||||
required this.title,
|
||||
this.subtitle,
|
||||
required this.onTap,
|
||||
});
|
||||
}
|
||||
|
||||
class AutoCompleteData {
|
||||
final List<AutoCompleteItem> items;
|
||||
final bool isLoading;
|
||||
|
||||
const AutoCompleteData({
|
||||
this.items = const <AutoCompleteItem>[],
|
||||
this.isLoading = false,
|
||||
});
|
||||
}
|
||||
|
||||
class SearchField extends StatefulWidget {
|
||||
const SearchField({
|
||||
super.key,
|
||||
this.autoCompleteItems = const <AutoCompleteItem>[],
|
||||
this.isLoadingAutoCompleteItems = false,
|
||||
this.enableAutoComplete = true,
|
||||
this.textEditingController,
|
||||
this.placeholder,
|
||||
this.leading,
|
||||
this.trailing,
|
||||
this.foregroundDecoration,
|
||||
this.onChanged,
|
||||
this.onSubmitted,
|
||||
this.padding,
|
||||
this.focusNode,
|
||||
this.autoCompleteNoResultsText,
|
||||
});
|
||||
|
||||
final List<AutoCompleteItem> autoCompleteItems;
|
||||
|
||||
final bool isLoadingAutoCompleteItems;
|
||||
|
||||
final bool enableAutoComplete;
|
||||
|
||||
final TextEditingController? textEditingController;
|
||||
|
||||
final String? placeholder;
|
||||
|
||||
final Widget? leading;
|
||||
|
||||
final Widget? trailing;
|
||||
|
||||
final WidgetStatePropertyAll<BoxDecoration>? foregroundDecoration;
|
||||
|
||||
final void Function(String)? onChanged;
|
||||
|
||||
final void Function(String)? onSubmitted;
|
||||
|
||||
final EdgeInsets? padding;
|
||||
|
||||
final FocusNode? focusNode;
|
||||
|
||||
final String? autoCompleteNoResultsText;
|
||||
|
||||
@override
|
||||
State<SearchField> createState() => _SearchFieldState();
|
||||
}
|
||||
|
||||
class _SearchFieldState extends State<SearchField> with TickerProviderStateMixin {
|
||||
late final ValueNotifier<AutoCompleteData> autoCompleteItems;
|
||||
|
||||
late final FocusNode focusNode;
|
||||
|
||||
final boxKey = GlobalKey();
|
||||
|
||||
OverlayEntry? _overlayEntry;
|
||||
|
||||
AnimationController? _animationController;
|
||||
Animation<double>? _fadeAnimation;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
autoCompleteItems = ValueNotifier(AutoCompleteData(
|
||||
items: widget.autoCompleteItems,
|
||||
isLoading: widget.isLoadingAutoCompleteItems,
|
||||
));
|
||||
focusNode = widget.focusNode ?? FocusNode();
|
||||
focusNode.addListener(onfocusChange);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_animationController?.dispose();
|
||||
focusNode.removeListener(onfocusChange);
|
||||
if (widget.focusNode == null) {
|
||||
focusNode.dispose();
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(covariant SearchField oldWidget) {
|
||||
if (widget.autoCompleteItems != oldWidget.autoCompleteItems ||
|
||||
widget.isLoadingAutoCompleteItems !=
|
||||
oldWidget.isLoadingAutoCompleteItems) {
|
||||
Future.microtask(() {
|
||||
autoCompleteItems.value = AutoCompleteData(
|
||||
items: widget.autoCompleteItems,
|
||||
isLoading: widget.isLoadingAutoCompleteItems,
|
||||
);
|
||||
});
|
||||
}
|
||||
super.didUpdateWidget(oldWidget);
|
||||
}
|
||||
|
||||
void onfocusChange() {
|
||||
if (focusNode.hasFocus && widget.enableAutoComplete) {
|
||||
final box = context.findRenderObject() as RenderBox?;
|
||||
if (box == null) return;
|
||||
final overlay = Overlay.of(context);
|
||||
final position = box.localToGlobal(
|
||||
Offset.zero,
|
||||
ancestor: overlay.context.findRenderObject(),
|
||||
);
|
||||
|
||||
if (_overlayEntry != null) {
|
||||
_removeOverlayWithAnimation();
|
||||
}
|
||||
|
||||
_animationController = AnimationController(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
vsync: this,
|
||||
);
|
||||
|
||||
_fadeAnimation = Tween<double>(
|
||||
begin: 0.0,
|
||||
end: 1.0,
|
||||
).animate(CurvedAnimation(
|
||||
parent: _animationController!,
|
||||
curve: Curves.easeOut,
|
||||
));
|
||||
|
||||
_overlayEntry = OverlayEntry(
|
||||
builder: (context) {
|
||||
return Positioned(
|
||||
left: position.dx,
|
||||
width: box.size.width,
|
||||
top: position.dy + box.size.height,
|
||||
child: _AnimatedOverlayWrapper(
|
||||
animation: _fadeAnimation!,
|
||||
child: _AutoCompleteOverlay(
|
||||
data: autoCompleteItems,
|
||||
noResultsText: widget.autoCompleteNoResultsText,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
overlay.insert(_overlayEntry!);
|
||||
_animationController!.forward();
|
||||
} else {
|
||||
_removeOverlayWithAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
void _removeOverlayWithAnimation() {
|
||||
if (_overlayEntry != null && _animationController != null) {
|
||||
_animationController!.reverse().then((_) {
|
||||
_overlayEntry?.remove();
|
||||
_overlayEntry = null;
|
||||
_animationController?.dispose();
|
||||
_animationController = null;
|
||||
_fadeAnimation = null;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextBox(
|
||||
controller: widget.textEditingController,
|
||||
key: boxKey,
|
||||
focusNode: focusNode,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
placeholder: widget.placeholder,
|
||||
onChanged: widget.onChanged,
|
||||
onSubmitted: widget.onSubmitted,
|
||||
foregroundDecoration: widget.foregroundDecoration,
|
||||
prefix: widget.leading,
|
||||
suffix: widget.trailing,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _AutoCompleteOverlay extends StatefulWidget {
|
||||
const _AutoCompleteOverlay({required this.data, this.noResultsText});
|
||||
|
||||
final ValueNotifier<AutoCompleteData> data;
|
||||
|
||||
final String? noResultsText;
|
||||
|
||||
@override
|
||||
State<_AutoCompleteOverlay> createState() => _AutoCompleteOverlayState();
|
||||
}
|
||||
|
||||
class _AutoCompleteOverlayState extends State<_AutoCompleteOverlay> {
|
||||
late final notifier = widget.data;
|
||||
|
||||
var items = <AutoCompleteItem>[];
|
||||
|
||||
var isLoading = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
items = notifier.value.items;
|
||||
isLoading = notifier.value.isLoading;
|
||||
notifier.addListener(onItemsChanged);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
notifier.removeListener(onItemsChanged);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void onItemsChanged() {
|
||||
setState(() {
|
||||
items = notifier.value.items;
|
||||
isLoading = notifier.value.isLoading;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var items = List<AutoCompleteItem>.from(this.items);
|
||||
|
||||
Widget? content;
|
||||
|
||||
if (isLoading) {
|
||||
content = SizedBox(
|
||||
height: 44,
|
||||
child: Center(
|
||||
child: ProgressRing(
|
||||
activeColor: FluentTheme.of(context).accentColor,
|
||||
strokeWidth: 2,
|
||||
).fixWidth(24).fixHeight(24),
|
||||
),
|
||||
);
|
||||
} else if (items.isEmpty) {
|
||||
content = ListTile(
|
||||
title: Text(widget.noResultsText ?? 'No results found'),
|
||||
onPressed: () {},
|
||||
);
|
||||
} else {
|
||||
if (items.length > 8) {
|
||||
items = items.sublist(0, 8);
|
||||
}
|
||||
content = Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: items.map((item) {
|
||||
return ListTile(
|
||||
title: Text(item.title),
|
||||
subtitle: item.subtitle != null ? Text(item.subtitle!) : null,
|
||||
onPressed: item.onTap,
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
}
|
||||
|
||||
return Card(
|
||||
backgroundColor: FluentTheme.of(context).micaBackgroundColor,
|
||||
child: AnimatedSize(
|
||||
alignment: Alignment.topCenter,
|
||||
duration: const Duration(milliseconds: 160),
|
||||
child: content,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _AnimatedOverlayWrapper extends StatelessWidget {
|
||||
const _AnimatedOverlayWrapper({
|
||||
required this.animation,
|
||||
required this.child,
|
||||
});
|
||||
|
||||
final Animation<double> animation;
|
||||
final Widget child;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnimatedBuilder(
|
||||
animation: animation,
|
||||
builder: (context, child) {
|
||||
return FadeTransition(
|
||||
opacity: animation,
|
||||
child: Transform.scale(
|
||||
scale: 0.9 + (0.1 * animation.value),
|
||||
alignment: Alignment.topCenter,
|
||||
child: child,
|
||||
),
|
||||
);
|
||||
},
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
@@ -12,7 +12,7 @@ export "state_controller.dart";
|
||||
export "navigation.dart";
|
||||
|
||||
class _App {
|
||||
final version = "1.1.0";
|
||||
final version = "1.2.0";
|
||||
|
||||
bool get isAndroid => Platform.isAndroid;
|
||||
bool get isIOS => Platform.isIOS;
|
||||
|
@@ -134,12 +134,29 @@ class MyApp extends StatelessWidget {
|
||||
throw "widget is null";
|
||||
}
|
||||
|
||||
String? font;
|
||||
List<String>? fallback;
|
||||
if (App.isLinux || App.isWindows) {
|
||||
font = 'Noto Sans CJK';
|
||||
fallback = [
|
||||
'Segoe UI',
|
||||
'Noto Sans SC',
|
||||
'Noto Sans TC',
|
||||
'Noto Sans',
|
||||
'Microsoft YaHei',
|
||||
'PingFang SC',
|
||||
'Arial',
|
||||
'sans-serif'
|
||||
];
|
||||
}
|
||||
|
||||
Widget widget = MdTheme(
|
||||
data: MdThemeData.from(
|
||||
colorScheme: colorScheme, useMaterial3: true),
|
||||
child: DefaultTextStyle.merge(
|
||||
style: TextStyle(
|
||||
fontFamily: App.isWindows ? "Microsoft YaHei UI" : null,
|
||||
fontFamily: font,
|
||||
fontFamilyFallback: fallback,
|
||||
),
|
||||
child: OverlayWidget(child),
|
||||
),
|
||||
|
@@ -152,6 +152,10 @@ class Tag {
|
||||
|
||||
@override
|
||||
int get hashCode => name.hashCode;
|
||||
|
||||
static Tag fromJson(Map<String, dynamic> json) {
|
||||
return Tag(json['name'] ?? "", json['translated_name']);
|
||||
}
|
||||
}
|
||||
|
||||
class IllustImage {
|
||||
|
@@ -583,4 +583,13 @@ class Network {
|
||||
return Res.fromErrorRes(res);
|
||||
}
|
||||
}
|
||||
|
||||
Future<Res<List<Tag>>> getAutoCompleteTags(String keyword) async {
|
||||
var res = await apiGet("/v2/search/autocomplete?merge_plain_keyword_results=true&word=${Uri.encodeComponent(keyword)}");
|
||||
if (res.success) {
|
||||
return Res((res.data["tags"] as List).map((e) => Tag.fromJson(e)).toList());
|
||||
} else {
|
||||
return Res.error(res.errorMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@ import 'dart:io';
|
||||
import 'package:fluent_ui/fluent_ui.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:image_gallery_saver/image_gallery_saver.dart';
|
||||
import 'package:image_gallery_saver_plus/image_gallery_saver_plus.dart';
|
||||
import 'package:photo_view/photo_view_gallery.dart';
|
||||
import 'package:pixes/components/md.dart';
|
||||
import 'package:pixes/components/message.dart';
|
||||
@@ -118,10 +118,11 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
|
||||
if (!fileName.contains('.')) {
|
||||
fileName += getExtensionName();
|
||||
}
|
||||
await ImageGallerySaver.saveImage(
|
||||
await ImageGallerySaverPlus.saveImage(
|
||||
await file.readAsBytes(),
|
||||
quality: 100,
|
||||
name: fileName);
|
||||
name: fileName,
|
||||
);
|
||||
if (context.mounted) {
|
||||
showToast(context, message: "Saved".tl);
|
||||
}
|
||||
|
@@ -225,10 +225,13 @@ class _MainPageState extends State<MainPage>
|
||||
body: const SizedBox.shrink(),
|
||||
),
|
||||
PaneItemSeparator(),
|
||||
PaneItem(
|
||||
PaneItemAction(
|
||||
icon: const Icon(MdIcons.settings_outlined, size: 20),
|
||||
title: Text('Settings'.tl),
|
||||
body: const SizedBox.shrink(),
|
||||
onTap: () {
|
||||
navigatorKey.currentContext?.to(() => const SettingsPage());
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -261,7 +264,6 @@ class _MainPageState extends State<MainPage>
|
||||
() => const NovelBookmarksPage(),
|
||||
() => const FollowingNovelsPage(),
|
||||
() => const NovelRankingPage(),
|
||||
() => const SettingsPage(),
|
||||
];
|
||||
|
||||
void navigate(int index) {
|
||||
|
@@ -4,6 +4,7 @@ import 'package:pixes/appdata.dart';
|
||||
import 'package:pixes/components/loading.dart';
|
||||
import 'package:pixes/components/novel.dart';
|
||||
import 'package:pixes/components/page_route.dart';
|
||||
import 'package:pixes/components/search_field.dart';
|
||||
import 'package:pixes/components/user_preview.dart';
|
||||
import 'package:pixes/foundation/app.dart';
|
||||
import 'package:pixes/network/network.dart';
|
||||
@@ -12,6 +13,7 @@ import 'package:pixes/pages/novel_page.dart';
|
||||
import 'package:pixes/pages/user_info_page.dart';
|
||||
import 'package:pixes/utils/app_links.dart';
|
||||
import 'package:pixes/utils/block.dart';
|
||||
import 'package:pixes/utils/debounce.dart';
|
||||
import 'package:pixes/utils/ext.dart';
|
||||
import 'package:pixes/utils/translation.dart';
|
||||
|
||||
@@ -21,6 +23,15 @@ import '../components/illust_widget.dart';
|
||||
import '../components/md.dart';
|
||||
import '../foundation/image_provider.dart';
|
||||
|
||||
const searchTypes = [
|
||||
"Search artwork",
|
||||
"Search novel",
|
||||
"Search user",
|
||||
"Artwork ID",
|
||||
"Artist ID",
|
||||
"Novel ID"
|
||||
];
|
||||
|
||||
class SearchPage extends StatefulWidget {
|
||||
const SearchPage({super.key});
|
||||
|
||||
@@ -29,20 +40,9 @@ class SearchPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _SearchPageState extends State<SearchPage> {
|
||||
String text = "";
|
||||
|
||||
int searchType = 0;
|
||||
|
||||
static const searchTypes = [
|
||||
"Search artwork",
|
||||
"Search novel",
|
||||
"Search user",
|
||||
"Artwork ID",
|
||||
"Artist ID",
|
||||
"Novel ID"
|
||||
];
|
||||
|
||||
void search() {
|
||||
void search(String text) {
|
||||
if (text.isURL && handleLink(Uri.parse(text))) {
|
||||
return;
|
||||
} else if ("https://$text".isURL &&
|
||||
@@ -71,9 +71,19 @@ class _SearchPageState extends State<SearchPage> {
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
content: Column(
|
||||
children: [
|
||||
buildSearchBar(),
|
||||
const SizedBox(
|
||||
height: 8,
|
||||
_SearchBar(
|
||||
searchType: searchType,
|
||||
onTypeChanged: (type) {
|
||||
setState(() {
|
||||
searchType = type;
|
||||
});
|
||||
},
|
||||
onSearch: (text) {
|
||||
if (text.isEmpty) {
|
||||
return;
|
||||
}
|
||||
search(text);
|
||||
},
|
||||
),
|
||||
const Expanded(
|
||||
child: _TrendingTagsView(),
|
||||
@@ -82,102 +92,6 @@ class _SearchPageState extends State<SearchPage> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
final optionController = FlyoutController();
|
||||
|
||||
Widget buildSearchBar() {
|
||||
return ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 560),
|
||||
child: SizedBox(
|
||||
height: 42,
|
||||
width: double.infinity,
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constrains) {
|
||||
return SizedBox(
|
||||
height: 42,
|
||||
width: constrains.maxWidth,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextBox(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
placeholder:
|
||||
'${searchTypes[searchType].tl} / ${"Open link".tl}',
|
||||
onChanged: (s) => text = s,
|
||||
onSubmitted: (s) => search(),
|
||||
foregroundDecoration: WidgetStatePropertyAll(
|
||||
BoxDecoration(
|
||||
border: Border.all(
|
||||
color: ColorScheme.of(context)
|
||||
.outlineVariant
|
||||
.toOpacity(0.6)),
|
||||
borderRadius: BorderRadius.circular(4))),
|
||||
suffix: MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: GestureDetector(
|
||||
onTap: search,
|
||||
child: const Icon(
|
||||
FluentIcons.search,
|
||||
size: 16,
|
||||
).paddingHorizontal(12),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 4,
|
||||
),
|
||||
FlyoutTarget(
|
||||
controller: optionController,
|
||||
child: Button(
|
||||
child: const SizedBox(
|
||||
height: 42,
|
||||
child: Center(
|
||||
child: Icon(FluentIcons.chevron_down),
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
optionController.showFlyout(
|
||||
placementMode: FlyoutPlacementMode.bottomCenter,
|
||||
builder: buildSearchOption,
|
||||
barrierColor: Colors.transparent);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 4,
|
||||
),
|
||||
Button(
|
||||
child: const SizedBox(
|
||||
height: 42,
|
||||
child: Center(
|
||||
child: Icon(FluentIcons.settings),
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(SideBarRoute(SearchSettings(
|
||||
isNovel: searchType == 1,
|
||||
)));
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
).paddingHorizontal(16),
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildSearchOption(BuildContext context) {
|
||||
return MenuFlyout(
|
||||
items: List.generate(
|
||||
searchTypes.length,
|
||||
(index) => MenuFlyoutItem(
|
||||
text: Text(searchTypes[index].tl),
|
||||
onPressed: () => setState(() => searchType = index))),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _TrendingTagsView extends StatefulWidget {
|
||||
@@ -803,3 +717,184 @@ class _SearchNovelResultPageState
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
class _SearchBar extends StatefulWidget {
|
||||
const _SearchBar({
|
||||
required this.searchType,
|
||||
required this.onTypeChanged,
|
||||
required this.onSearch,
|
||||
});
|
||||
|
||||
final int searchType;
|
||||
|
||||
final void Function(int) onTypeChanged;
|
||||
|
||||
final void Function(String) onSearch;
|
||||
|
||||
@override
|
||||
State<_SearchBar> createState() => _SearchBarState();
|
||||
}
|
||||
|
||||
class _SearchBarState extends State<_SearchBar> {
|
||||
final optionController = FlyoutController();
|
||||
|
||||
final textController = TextEditingController();
|
||||
|
||||
var autoCompleteItems = <AutoCompleteItem>[];
|
||||
|
||||
var debouncer = Debounce(delay: const Duration(milliseconds: 300));
|
||||
|
||||
var autoCompleteKey = 0;
|
||||
|
||||
var isLoadingAutoCompleteItems = false;
|
||||
|
||||
Widget buildSearchOption(BuildContext context) {
|
||||
return MenuFlyout(
|
||||
items: List.generate(
|
||||
searchTypes.length,
|
||||
(index) => MenuFlyoutItem(
|
||||
text: Text(searchTypes[index].tl),
|
||||
onPressed: () => widget.onTypeChanged(index),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void onTextChanged(String text) {
|
||||
if (widget.searchType == 3 ||
|
||||
widget.searchType == 4 ||
|
||||
widget.searchType == 5) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (text.isEmpty) {
|
||||
setState(() {
|
||||
autoCompleteItems = [];
|
||||
isLoadingAutoCompleteItems = false;
|
||||
});
|
||||
return;
|
||||
}
|
||||
setState(() {
|
||||
isLoadingAutoCompleteItems = true;
|
||||
});
|
||||
debouncer.call(() async {
|
||||
var key = ++autoCompleteKey;
|
||||
|
||||
var res = await Network().getAutoCompleteTags(text);
|
||||
if (res.error) {
|
||||
return;
|
||||
}
|
||||
var items = res.data.map((e) {
|
||||
return AutoCompleteItem(
|
||||
title: e.name,
|
||||
subtitle: e.translatedName,
|
||||
onTap: () {
|
||||
textController.text = e.name;
|
||||
widget.onSearch(e.name);
|
||||
},
|
||||
);
|
||||
}).toList();
|
||||
|
||||
if (key != autoCompleteKey) {
|
||||
return; // ignore old request
|
||||
}
|
||||
|
||||
setState(() {
|
||||
autoCompleteItems = items;
|
||||
isLoadingAutoCompleteItems = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 560),
|
||||
child: SizedBox(
|
||||
height: 42,
|
||||
width: double.infinity,
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constrains) {
|
||||
return SizedBox(
|
||||
height: 42,
|
||||
width: constrains.maxWidth,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SearchField(
|
||||
enableAutoComplete: widget.searchType != 3 &&
|
||||
widget.searchType != 4 &&
|
||||
widget.searchType != 5,
|
||||
textEditingController: textController,
|
||||
autoCompleteNoResultsText: "No results found".tl,
|
||||
isLoadingAutoCompleteItems: isLoadingAutoCompleteItems,
|
||||
autoCompleteItems: autoCompleteItems,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
placeholder:
|
||||
'${searchTypes[widget.searchType].tl} / ${"Open link".tl}',
|
||||
onChanged: onTextChanged,
|
||||
onSubmitted: widget.onSearch,
|
||||
foregroundDecoration: WidgetStatePropertyAll(
|
||||
BoxDecoration(
|
||||
border: Border.all(
|
||||
color: ColorScheme.of(context)
|
||||
.outlineVariant
|
||||
.toOpacity(0.6),
|
||||
),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
),
|
||||
trailing: MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: GestureDetector(
|
||||
onTap: () => widget.onSearch(textController.text),
|
||||
child: const Icon(
|
||||
FluentIcons.search,
|
||||
size: 16,
|
||||
).paddingHorizontal(12),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
FlyoutTarget(
|
||||
controller: optionController,
|
||||
child: Button(
|
||||
child: const SizedBox(
|
||||
height: 42,
|
||||
child: Center(
|
||||
child: Icon(FluentIcons.chevron_down),
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
optionController.showFlyout(
|
||||
placementMode: FlyoutPlacementMode.bottomCenter,
|
||||
builder: buildSearchOption,
|
||||
barrierColor: Colors.transparent,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Button(
|
||||
child: const SizedBox(
|
||||
height: 42,
|
||||
child: Center(
|
||||
child: Icon(FluentIcons.settings),
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(SideBarRoute(SearchSettings(
|
||||
isNovel: widget.searchType == 1,
|
||||
)));
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
).paddingHorizontal(16),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -692,6 +692,7 @@ class _SetInitialPageWidgetState extends State<_SetInitialPageWidget> {
|
||||
"Ranking",
|
||||
"Recommendation",
|
||||
"Bookmarks",
|
||||
"Following",
|
||||
"Ranking",
|
||||
];
|
||||
|
||||
|
@@ -16,15 +16,13 @@ Future<void> _register(String scheme) async {
|
||||
String appPath = Platform.resolvedExecutable;
|
||||
|
||||
String protocolRegKey = 'Software\\Classes\\$scheme';
|
||||
RegistryValue protocolRegValue = const RegistryValue(
|
||||
RegistryValue protocolRegValue = const RegistryValue.string(
|
||||
'URL Protocol',
|
||||
RegistryValueType.string,
|
||||
'',
|
||||
);
|
||||
String protocolCmdRegKey = 'shell\\open\\command';
|
||||
RegistryValue protocolCmdRegValue = RegistryValue(
|
||||
RegistryValue protocolCmdRegValue = RegistryValue.string(
|
||||
'',
|
||||
RegistryValueType.string,
|
||||
'"$appPath" "%1"',
|
||||
);
|
||||
|
||||
|
28
lib/utils/debounce.dart
Normal file
28
lib/utils/debounce.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'dart:async';
|
||||
import 'dart:ui';
|
||||
|
||||
class Debounce {
|
||||
final Duration delay;
|
||||
VoidCallback? _action;
|
||||
Timer? _timer;
|
||||
|
||||
Debounce({required this.delay});
|
||||
|
||||
void call(VoidCallback action) {
|
||||
_action = action;
|
||||
_timer?.cancel();
|
||||
_timer = Timer(delay, _execute);
|
||||
}
|
||||
|
||||
void _execute() {
|
||||
if (_action != null) {
|
||||
_action!();
|
||||
_action = null;
|
||||
}
|
||||
}
|
||||
|
||||
void cancel() {
|
||||
_timer?.cancel();
|
||||
_action = null;
|
||||
}
|
||||
}
|
@@ -29,6 +29,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
||||
Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin"))
|
||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||
FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin"))
|
||||
WebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "WebViewFlutterPlugin"))
|
||||
WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin"))
|
||||
}
|
||||
|
227
pubspec.lock
227
pubspec.lock
@@ -5,10 +5,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: app_links
|
||||
sha256: "433df2e61b10519407475d7f69e470789d23d593f28224c38ba1068597be7950"
|
||||
sha256: "85ed8fc1d25a76475914fff28cc994653bd900bc2c26e4b57a49e097febb54ba"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.3"
|
||||
version: "6.4.0"
|
||||
app_links_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -37,50 +37,50 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: archive
|
||||
sha256: "08064924cbf0ab88280a0c3f60db9dd24fec693927e725ecb176f16c629d1cb8"
|
||||
sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
version: "4.0.7"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.11.0"
|
||||
version: "2.13.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.1.2"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
||||
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
version: "1.4.0"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
||||
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
version: "1.1.2"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
|
||||
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.19.0"
|
||||
version: "1.19.1"
|
||||
cross_file:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -101,34 +101,34 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: device_info_plus
|
||||
sha256: "4fa68e53e26ab17b70ca39f072c285562cfc1589df5bb1e9295db90f6645f431"
|
||||
sha256: "98f28b42168cc509abc92f88518882fd58061ea372d7999aecc424345c7bff6a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.2.0"
|
||||
version: "11.5.0"
|
||||
device_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: device_info_plus_platform_interface
|
||||
sha256: "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2"
|
||||
sha256: e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.2"
|
||||
version: "7.0.3"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: dio
|
||||
sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260"
|
||||
sha256: "253a18bbd4851fecba42f7343a1df3a9a4c1d31a2c1b37e221086b4fa8c8dbc9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.7.0"
|
||||
version: "5.8.0+1"
|
||||
dio_web_adapter:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dio_web_adapter
|
||||
sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8"
|
||||
sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.1.1"
|
||||
dynamic_color:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -141,18 +141,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
||||
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
version: "1.3.3"
|
||||
ffi:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: ffi
|
||||
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
|
||||
sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.3"
|
||||
version: "2.1.4"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -173,10 +173,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file_selector_android
|
||||
sha256: "98ac58e878b05ea2fdb204e7f4fc4978d90406c9881874f901428e01d3b18fbc"
|
||||
sha256: "6bba3d590ee9462758879741abc132a19133600dd31832f55627442f1ebd7b54"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.1+12"
|
||||
version: "0.5.1+14"
|
||||
file_selector_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -197,10 +197,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file_selector_macos
|
||||
sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc"
|
||||
sha256: "8c9250b2bd2d8d4268e39c82543bacbaca0fda7d29e0728c3c4bbb7c820fd711"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.9.4+2"
|
||||
version: "0.9.4+3"
|
||||
file_selector_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -221,10 +221,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file_selector_windows
|
||||
sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4"
|
||||
sha256: "320fcfb6f33caa90f0b58380489fc5ac05d99ee94b61aa96ec2bff0ba81d3c2b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.9.3+3"
|
||||
version: "0.9.3+4"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -237,10 +237,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fluent_ui
|
||||
sha256: "069dc196e093864ba7252a3ed5cc4e28039f04fc9cb687f35aeaa2e2b265dd7e"
|
||||
sha256: "8645eabacb46bfc9632fadc6e106756cdc6f2a4efb5a4fed4410bd3131306fe8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.10.0"
|
||||
version: "4.12.0"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@@ -313,35 +313,34 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http
|
||||
sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010
|
||||
sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
version: "1.4.0"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360"
|
||||
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.1"
|
||||
image_gallery_saver:
|
||||
version: "4.1.2"
|
||||
image_gallery_saver_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: master
|
||||
resolved-ref: "38a38c45d3ed229cbc1d827eb2b5aaad1a4519cd"
|
||||
url: "https://github.com/wgh136/image_gallery_saver"
|
||||
source: git
|
||||
version: "2.0.0"
|
||||
name: image_gallery_saver_plus
|
||||
sha256: "199b9e24f8d85e98f11e3d35571ab68ae50626ad40e2bb85c84383f69a6950ad"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
intl:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: intl
|
||||
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
|
||||
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.19.0"
|
||||
version: "0.20.2"
|
||||
io:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -362,18 +361,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
|
||||
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.7"
|
||||
version: "10.0.9"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
|
||||
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.8"
|
||||
version: "3.0.9"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -394,10 +393,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.16+1"
|
||||
version: "0.12.17"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -410,18 +409,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: math_expressions
|
||||
sha256: e32d803d758ace61cc6c4bdfed1226ff60a6a23646b35685670d28b5616139f8
|
||||
sha256: "218dc65bed4726562bb31c53d8daa3cc824664b26fb72d77bc592757edf74ba0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.6.0"
|
||||
version: "2.7.0"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
||||
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.15.0"
|
||||
version: "1.16.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -434,10 +433,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.0"
|
||||
version: "1.9.1"
|
||||
path_provider:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -450,10 +449,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_android
|
||||
sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2"
|
||||
sha256: d0d310befe2c8ab9e7f393288ccbb11b60c019c6b5afc21973eeee4dda2b35e9
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.15"
|
||||
version: "2.2.17"
|
||||
path_provider_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -486,12 +485,20 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.0"
|
||||
photo_view:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: main
|
||||
resolved-ref: "94724a0b7f94167fd1ae061f84e14ae04cae5c39"
|
||||
resolved-ref: a1255d1b5945aad4b7323303ec2ecdf0c90ffc4c
|
||||
url: "https://github.com/wgh136/photo_view"
|
||||
source: git
|
||||
version: "0.14.0"
|
||||
@@ -515,10 +522,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: posix
|
||||
sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a
|
||||
sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.1"
|
||||
version: "6.0.3"
|
||||
recase:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -579,10 +586,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: share_plus
|
||||
sha256: "6327c3f233729374d0abaafd61f6846115b2a481b4feddd8534211dc10659400"
|
||||
sha256: fce43200aa03ea87b91ce4c3ac79f0cecd52e2a7a56c7a4185023c271fbfa6da
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.1.3"
|
||||
version: "10.1.4"
|
||||
share_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -600,10 +607,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
version: "1.10.1"
|
||||
sprintf:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -616,58 +623,58 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sqlite3
|
||||
sha256: cb7f4e9dc1b52b1fa350f7b3d41c662e75fc3d399555fa4e5efcf267e9a4fbb5
|
||||
sha256: c0503c69b44d5714e6abbf4c1f51a3c3cc42b75ce785f44404765e4635481d38
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.0"
|
||||
version: "2.7.6"
|
||||
sqlite3_flutter_libs:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sqlite3_flutter_libs
|
||||
sha256: "636b0fe8a2de894e5455572f6cbbc458f4ffecfe9f860b79439e27041ea4f0b9"
|
||||
sha256: e07232b998755fe795655c56d1f5426e0190c9c435e1752d39e7b1cd33699c71
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.27"
|
||||
version: "0.5.34"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
|
||||
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.12.0"
|
||||
version: "1.12.1"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
version: "2.1.4"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
|
||||
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
version: "1.4.1"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
version: "1.2.2"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
|
||||
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.3"
|
||||
version: "0.7.4"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -688,18 +695,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193"
|
||||
sha256: "8582d7f6fe14d2652b4c45c9b6c14c0b678c2af2d083a11b604caeba51930d79"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.14"
|
||||
version: "6.3.16"
|
||||
url_launcher_ios:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: url_launcher_ios
|
||||
sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626"
|
||||
sha256: "7f2022359d4c099eea7df3fdf739f7d3d3b9faf3166fb1dd390775176e0b76cb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.2"
|
||||
version: "6.3.3"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -728,18 +735,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_web
|
||||
sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e"
|
||||
sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.3"
|
||||
version: "2.4.1"
|
||||
url_launcher_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_windows
|
||||
sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4"
|
||||
sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.3"
|
||||
version: "3.1.4"
|
||||
uuid:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -760,66 +767,66 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
|
||||
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.3.0"
|
||||
version: "15.0.0"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web
|
||||
sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
|
||||
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "1.1.1"
|
||||
webview_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: webview_flutter
|
||||
sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec"
|
||||
sha256: c3e4fe614b1c814950ad07186007eff2f2e5dd2935eba7b9a9a1af8e5885f1ba
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.10.0"
|
||||
version: "4.13.0"
|
||||
webview_flutter_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_android
|
||||
sha256: "3d535126f7244871542b2f0b0fcf94629c9a14883250461f9abe1a6644c1c379"
|
||||
sha256: f6e6afef6e234801da77170f7a1847ded8450778caf2fe13979d140484be3678
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.2.0"
|
||||
version: "4.7.0"
|
||||
webview_flutter_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_platform_interface
|
||||
sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d
|
||||
sha256: f0dc2dc3a2b1e3a6abdd6801b9355ebfeb3b8f6cde6b9dc7c9235909c4a1f147
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.10.0"
|
||||
version: "2.13.1"
|
||||
webview_flutter_wkwebview:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_wkwebview
|
||||
sha256: b7e92f129482460951d96ef9a46b49db34bd2e1621685de26e9eaafd9674e7eb
|
||||
sha256: a3d461fe3467014e05f3ac4962e5fdde2a4bf44c561cb53e9ae5c586600fdbc3
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.16.3"
|
||||
version: "3.22.0"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: "8b338d4486ab3fbc0ba0db9f9b4f5239b6697fcee427939a40e720cbb9ee0a69"
|
||||
sha256: "66814138c3562338d05613a6e368ed8cfb237ad6d64a9e9334be3f309acfca03"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.9.0"
|
||||
version: "5.14.0"
|
||||
win32_registry:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: win32_registry
|
||||
sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852"
|
||||
sha256: "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.5"
|
||||
version: "2.1.0"
|
||||
window_manager:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -840,10 +847,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml
|
||||
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
||||
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.5.0 <4.0.0"
|
||||
flutter: ">=3.27.3"
|
||||
dart: ">=3.8.0 <4.0.0"
|
||||
flutter: ">=3.32.5"
|
||||
|
25
pubspec.yaml
25
pubspec.yaml
@@ -16,11 +16,11 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.1.0+110
|
||||
version: 1.2.0+120
|
||||
|
||||
environment:
|
||||
sdk: '>=3.3.4 <4.0.0'
|
||||
flutter: 3.27.3
|
||||
flutter: 3.32.5
|
||||
|
||||
# Dependencies specify other packages that your package needs in order to work.
|
||||
# To automatically upgrade your package dependencies to the latest versions
|
||||
@@ -36,18 +36,18 @@ dependencies:
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
window_manager: ^0.4.3
|
||||
fluent_ui: ^4.10.0
|
||||
fluent_ui: ^4.12.0
|
||||
dynamic_color: ^1.7.0
|
||||
dio: ^5.7.0
|
||||
dio: ^5.8.0
|
||||
crypto: ^3.0.6
|
||||
intl:
|
||||
path_provider: ^2.1.5
|
||||
url_launcher: ^6.3.1
|
||||
url_launcher_ios: ^6.3.2
|
||||
app_links: ^6.3.3
|
||||
win32_registry: ^1.1.0
|
||||
app_links: ^6.4.0
|
||||
win32_registry: ^2.1.0
|
||||
flutter_staggered_grid_view: ^0.7.0
|
||||
sqlite3: ^2.5.0
|
||||
sqlite3: ^2.7.6
|
||||
sqlite3_flutter_libs: any
|
||||
photo_view:
|
||||
git:
|
||||
@@ -56,14 +56,11 @@ dependencies:
|
||||
share_plus: ^10.1.3
|
||||
file_selector: ^1.0.1
|
||||
flutter_file_dialog: ^3.0.2
|
||||
archive: ^4.0.1
|
||||
webview_flutter: ^4.10.0
|
||||
archive: ^4.0.7
|
||||
webview_flutter: ^4.13.0
|
||||
flutter_acrylic: 1.0.0+2
|
||||
device_info_plus: ^11.2.0
|
||||
image_gallery_saver:
|
||||
git:
|
||||
url: https://github.com/wgh136/image_gallery_saver
|
||||
ref: master
|
||||
device_info_plus: ^11.5.0
|
||||
image_gallery_saver_plus: ^4.0.1
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
Reference in New Issue
Block a user