From 36f97936d9c6f73805ae08568e726d5738b80d0c Mon Sep 17 00:00:00 2001 From: perol Date: Fri, 24 Jul 2020 10:26:00 +0800 Subject: [PATCH] soup --- .flutter-plugins-dependencies | 2 +- lib/constraint.dart | 4 +- lib/page/soup/soup_store.dart | 84 +++++++++++++++++------------------ 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index c9599f965..89a0645f6 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+4/","dependencies":[]},{"name":"flutter_downloader","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_downloader-1.4.4/","dependencies":[]},{"name":"flutter_inapp_purchase","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_inapp_purchase-2.2.0/","dependencies":[]},{"name":"image_picker","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+4/","dependencies":[]},{"name":"package_info","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.1/","dependencies":[]},{"name":"path_provider","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.11/","dependencies":[]},{"name":"permission_handler","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/permission_handler-5.0.1+1/","dependencies":[]},{"name":"receive_sharing_intent","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/receive_sharing_intent-1.4.0+2/","dependencies":[]},{"name":"save_in_gallery","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/save_in_gallery-0.1.3/","dependencies":[]},{"name":"screen","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/screen-0.0.5/","dependencies":[]},{"name":"share","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.4+3/","dependencies":[]},{"name":"share_extend","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/share_extend-1.1.9/","dependencies":[]},{"name":"shared_preferences","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.8/","dependencies":[]},{"name":"sqflite","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1/","dependencies":[]},{"name":"uni_links","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.5.0/","dependencies":[]},{"name":"video_player","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/video_player-0.10.11+2/","dependencies":[]},{"name":"wakelock","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/wakelock-0.1.4+2/","dependencies":[]},{"name":"webview_flutter","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.22+1/","dependencies":[]}],"android":[{"name":"device_info","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+4/","dependencies":[]},{"name":"flutter_displaymode","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_displaymode-0.1.0/","dependencies":[]},{"name":"flutter_downloader","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_downloader-1.4.4/","dependencies":[]},{"name":"flutter_inapp_purchase","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_inapp_purchase-2.2.0/","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-1.0.8/","dependencies":[]},{"name":"image_picker","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+4/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"package_info","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.1/","dependencies":[]},{"name":"path_provider","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.11/","dependencies":[]},{"name":"permission_handler","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/permission_handler-5.0.1+1/","dependencies":[]},{"name":"receive_sharing_intent","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/receive_sharing_intent-1.4.0+2/","dependencies":[]},{"name":"save_in_gallery","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/save_in_gallery-0.1.3/","dependencies":[]},{"name":"screen","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/screen-0.0.5/","dependencies":[]},{"name":"share","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.4+3/","dependencies":[]},{"name":"share_extend","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/share_extend-1.1.9/","dependencies":[]},{"name":"shared_preferences","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.8/","dependencies":[]},{"name":"sqflite","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1/","dependencies":[]},{"name":"uni_links","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.5.0/","dependencies":[]},{"name":"video_player","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/video_player-0.10.11+2/","dependencies":[]},{"name":"wakelock","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/wakelock-0.1.4+2/","dependencies":[]},{"name":"webview_flutter","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.22+1/","dependencies":[]}],"macos":[{"name":"package_info","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.1/","dependencies":[]},{"name":"path_provider_macos","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+3/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+10/","dependencies":[]},{"name":"sqflite","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+7/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-0.0.1+2/","dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+1/","dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-0.0.1+1/","dependencies":[]}],"windows":[],"web":[{"name":"shared_preferences_web","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.2/","dependencies":[]},{"name":"video_player_web","path":"/Users/perol/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/video_player_web-0.1.3+2/","dependencies":[]}]},"dependencyGraph":[{"name":"device_info","dependencies":[]},{"name":"flutter_displaymode","dependencies":[]},{"name":"flutter_downloader","dependencies":[]},{"name":"flutter_inapp_purchase","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"receive_sharing_intent","dependencies":[]},{"name":"save_in_gallery","dependencies":[]},{"name":"screen","dependencies":[]},{"name":"share","dependencies":[]},{"name":"share_extend","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"uni_links","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_linux","url_launcher_macos"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"video_player","dependencies":["video_player_web"]},{"name":"video_player_web","dependencies":[]},{"name":"wakelock","dependencies":[]},{"name":"webview_flutter","dependencies":[]}],"date_created":"2020-07-23 21:01:36.684682","version":"1.17.5"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info-0.4.2+4\\\\","dependencies":[]},{"name":"flutter_downloader","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_downloader-1.4.4\\\\","dependencies":[]},{"name":"flutter_inapp_purchase","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_inapp_purchase-2.2.0\\\\","dependencies":[]},{"name":"image_picker","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\image_picker-0.6.7+4\\\\","dependencies":[]},{"name":"package_info","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\package_info-0.4.1\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider-1.6.11\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler-5.0.1+1\\\\","dependencies":[]},{"name":"receive_sharing_intent","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\receive_sharing_intent-1.4.0+2\\\\","dependencies":[]},{"name":"save_in_gallery","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\save_in_gallery-0.1.3\\\\","dependencies":[]},{"name":"screen","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\screen-0.0.5\\\\","dependencies":[]},{"name":"share","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\share-0.6.4+3\\\\","dependencies":[]},{"name":"share_extend","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\share_extend-1.1.9\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences-0.5.8\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\sqflite-1.3.1\\\\","dependencies":[]},{"name":"uni_links","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\uni_links-0.4.0\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher-5.5.0\\\\","dependencies":[]},{"name":"video_player","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\video_player-0.10.11+2\\\\","dependencies":[]},{"name":"wakelock","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\wakelock-0.1.4+2\\\\","dependencies":[]},{"name":"webview_flutter","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\webview_flutter-0.3.22+1\\\\","dependencies":[]}],"android":[{"name":"device_info","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\device_info-0.4.2+4\\\\","dependencies":[]},{"name":"flutter_displaymode","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_displaymode-0.1.0\\\\","dependencies":[]},{"name":"flutter_downloader","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_downloader-1.4.4\\\\","dependencies":[]},{"name":"flutter_inapp_purchase","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_inapp_purchase-2.2.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_plugin_android_lifecycle-1.0.8\\\\","dependencies":[]},{"name":"image_picker","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\image_picker-0.6.7+4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"package_info","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\package_info-0.4.1\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider-1.6.11\\\\","dependencies":[]},{"name":"permission_handler","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler-5.0.1+1\\\\","dependencies":[]},{"name":"receive_sharing_intent","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\receive_sharing_intent-1.4.0+2\\\\","dependencies":[]},{"name":"save_in_gallery","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\save_in_gallery-0.1.3\\\\","dependencies":[]},{"name":"screen","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\screen-0.0.5\\\\","dependencies":[]},{"name":"share","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\share-0.6.4+3\\\\","dependencies":[]},{"name":"share_extend","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\share_extend-1.1.9\\\\","dependencies":[]},{"name":"shared_preferences","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences-0.5.8\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\sqflite-1.3.1\\\\","dependencies":[]},{"name":"uni_links","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\uni_links-0.4.0\\\\","dependencies":[]},{"name":"url_launcher","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher-5.5.0\\\\","dependencies":[]},{"name":"video_player","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\video_player-0.10.11+2\\\\","dependencies":[]},{"name":"wakelock","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\wakelock-0.1.4+2\\\\","dependencies":[]},{"name":"webview_flutter","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\webview_flutter-0.3.22+1\\\\","dependencies":[]}],"macos":[{"name":"package_info","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\package_info-0.4.1\\\\","dependencies":[]},{"name":"path_provider_macos","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_macos-0.0.4+3\\\\","dependencies":[]},{"name":"shared_preferences_macos","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_macos-0.0.1+10\\\\","dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\sqflite-1.3.1\\\\","dependencies":[]},{"name":"url_launcher_macos","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher_macos-0.0.1+7\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-0.0.1+2\\\\","dependencies":[]},{"name":"shared_preferences_linux","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_linux-0.0.2+1\\\\","dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher_linux-0.0.1+1\\\\","dependencies":[]}],"windows":[],"web":[{"name":"shared_preferences_web","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_web-0.1.2+7\\\\","dependencies":[]},{"name":"url_launcher_web","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\url_launcher_web-0.1.2\\\\","dependencies":[]},{"name":"video_player_web","path":"C:\\\\Users\\\\Perol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\video_player_web-0.1.3+2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"device_info","dependencies":[]},{"name":"flutter_displaymode","dependencies":[]},{"name":"flutter_downloader","dependencies":[]},{"name":"flutter_inapp_purchase","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"receive_sharing_intent","dependencies":[]},{"name":"save_in_gallery","dependencies":[]},{"name":"screen","dependencies":[]},{"name":"share","dependencies":[]},{"name":"share_extend","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"uni_links","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_linux","url_launcher_macos"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"video_player","dependencies":["video_player_web"]},{"name":"video_player_web","dependencies":[]},{"name":"wakelock","dependencies":[]},{"name":"webview_flutter","dependencies":[]}],"date_created":"2020-07-24 10:17:18.229717","version":"1.17.5"} \ No newline at end of file diff --git a/lib/constraint.dart b/lib/constraint.dart index 33cf07d02..60930c5b7 100644 --- a/lib/constraint.dart +++ b/lib/constraint.dart @@ -1,4 +1,4 @@ class Constrains { - static String tagName = "0.1.1"; - static bool isGooglePlay = true; + static String tagName = "0.1.2"; + static bool isGooglePlay = false; } diff --git a/lib/page/soup/soup_store.dart b/lib/page/soup/soup_store.dart index 8944c0164..4b4dab191 100644 --- a/lib/page/soup/soup_store.dart +++ b/lib/page/soup/soup_store.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:dio/dio.dart'; +import 'package:flutter/cupertino.dart'; import 'package:mobx/mobx.dart'; import 'package:html/parser.dart' show parse; import 'package:pixez/models/amwork.dart'; @@ -11,65 +12,64 @@ part 'soup_store.g.dart'; class SoupStore = _SoupStoreBase with _$SoupStore; abstract class _SoupStoreBase with Store { - final dio = Dio(BaseOptions(headers: { - HttpHeaders.acceptLanguageHeader:ApiClient.Accept_Language, + final dio = Dio(BaseOptions(headers: { + HttpHeaders.acceptLanguageHeader: ApiClient.Accept_Language, 'user-agent': - 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.26 Safari/537.36 Edg/85.0.564.13', HttpHeaders.refererHeader: 'https://www.pixivision.net/zh/', })); ObservableList amWorks = ObservableList(); @observable String description; + @action fetch(String url) async { Response response = await dio.request(url); print(response.data); var document = parse(response.data); - var workInfo = document.getElementsByClassName("am__body"); - var nodes = workInfo.first.nodes; - var amWorkGtmDocument = parse(workInfo.first.innerHtml); - description = document - .getElementsByClassName('am__description _medium-editor-text') + var workInfo = document + .getElementsByTagName("article") + .first + .getElementsByTagName('header'); + var nodes = document + .getElementsByTagName("article") + .first + .getElementsByClassName('am__body') .first - .innerHtml - .replaceAll('

', '') - .replaceAll('

', '') - .replaceAll('
', '') - .replaceAll('
', ''); - for (int i = 1; i <= nodes.length; i++) { + .children; + description = workInfo.first + .getElementsByTagName('p') + .map((e) => e.text) + .toList() + .toString().replaceAll('[', '').replaceAll(']', '').replaceAll(',', ''); + amWorks.clear(); + for (var value in nodes) { try { + if(!value.attributes['class'].contains('illust')){ + continue; + } AmWork amWork = AmWork(); - var amWorkGtm = amWorkGtmDocument.getElementsByClassName( - "am__work gtm__illust-collection-illusts-${i}"); - var infoDoc = parse(amWorkGtm.first.innerHtml) - .getElementsByClassName("am__work__info"); - var link = infoDoc.first.getElementsByTagName("a"); - amWork.title = infoDoc.first - .getElementsByTagName('h3') - .first - .getElementsByTagName('a') - .first - .text; - amWork.user = infoDoc.first - .getElementsByTagName('p') - .first - .getElementsByTagName('a') - .first - .text; - amWork.userImage = - infoDoc.first.getElementsByTagName('img').first.attributes['src']; - amWork.userLink = link.first.attributes['href']; - var mainDoc = parse(amWorkGtm.first.innerHtml) - .getElementsByClassName("am__work__main"); - amWork.arworkLink = - mainDoc.first.getElementsByTagName('a').first.attributes['href']; - amWork.showImage = - mainDoc.first.getElementsByTagName('img').first.attributes['src']; - amWorks.clear(); + for (var aa in value.getElementsByTagName('a')) { + var a = aa.attributes['href']; + if (a.contains('https://www.pixiv.net/artworks')) { + amWork.arworkLink = a; + amWork.showImage = + value.getElementsByTagName('img')[1].attributes['src']; + amWork.title = value.getElementsByTagName('h3').first.text; + } + if (a.contains('https://www.pixiv.net/users')) { + amWork.userLink = a; + amWork.user = value.getElementsByTagName('p').first.text; + amWork.userImage = + value.getElementsByTagName('img').first.attributes['src']; + } + } + if (amWork.userLink == null || amWork.arworkLink == null) { + continue; + } amWorks.add(amWork); } catch (e) { print(e); - continue; } } }