Fix slider count, engine
This commit is contained in:
parent
795929186a
commit
2c9d4626d9
|
@ -76,7 +76,7 @@ VPN->代理->分流, 这三个功能如果同时设置, 您会在您手机的VPN
|
||||||
### 开发环境准备
|
### 开发环境准备
|
||||||
|
|
||||||
- [golang](https://golang.org/) (1.16以上版本)
|
- [golang](https://golang.org/) (1.16以上版本)
|
||||||
- [flutter](https://flutter.dev/) (桌面端使用2.2.3)
|
- [flutter](https://flutter.dev/) (2.5.3)(flutter不同版本api差异较大,建议使用同样版本)
|
||||||
|
|
||||||
### 环境配置
|
### 环境配置
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
|
||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion 31
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main.java.srcDirs += 'src/main/kotlin'
|
main.java.srcDirs += 'src/main/kotlin'
|
||||||
|
@ -36,7 +36,7 @@ android {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "niuhuan.pikapika"
|
applicationId "niuhuan.pikapika"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 30
|
targetSdkVersion 31
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,10 +30,6 @@ import java.util.concurrent.Executors
|
||||||
|
|
||||||
class MainActivity : FlutterActivity() {
|
class MainActivity : FlutterActivity() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) {
|
|
||||||
super.onCreate(savedInstanceState, persistentState)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 为什么换成换成线程池而不继续使用携程 : 下载图片速度慢会占满携程造成拥堵, 接口无法请求
|
// 为什么换成换成线程池而不继续使用携程 : 下载图片速度慢会占满携程造成拥堵, 接口无法请求
|
||||||
private val pool = Executors.newCachedThreadPool { runnable ->
|
private val pool = Executors.newCachedThreadPool { runnable ->
|
||||||
Thread(runnable).also { it.isDaemon = true }
|
Thread(runnable).also { it.isDaemon = true }
|
||||||
|
|
|
@ -90,7 +90,7 @@ class _PinkTheme extends _ThemePackage {
|
||||||
secondary: Colors.pink.shade200,
|
secondary: Colors.pink.shade200,
|
||||||
),
|
),
|
||||||
appBarTheme: AppBarTheme(
|
appBarTheme: AppBarTheme(
|
||||||
brightness: Brightness.dark,
|
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||||
color: Colors.pink.shade200,
|
color: Colors.pink.shade200,
|
||||||
iconTheme: IconThemeData(
|
iconTheme: IconThemeData(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
@ -119,7 +119,7 @@ class _BlackTheme extends _ThemePackage {
|
||||||
secondary: Colors.pink.shade200,
|
secondary: Colors.pink.shade200,
|
||||||
),
|
),
|
||||||
appBarTheme: AppBarTheme(
|
appBarTheme: AppBarTheme(
|
||||||
brightness: Brightness.dark,
|
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||||
color: Colors.grey.shade800,
|
color: Colors.grey.shade800,
|
||||||
iconTheme: IconThemeData(
|
iconTheme: IconThemeData(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
@ -144,12 +144,12 @@ class _DarkTheme extends _ThemePackage {
|
||||||
@override
|
@override
|
||||||
ThemeData themeData(ThemeData rawData) =>
|
ThemeData themeData(ThemeData rawData) =>
|
||||||
rawData.copyWith(
|
rawData.copyWith(
|
||||||
brightness: Brightness.dark,
|
brightness: Brightness.light,
|
||||||
colorScheme: ColorScheme.light(
|
colorScheme: ColorScheme.light(
|
||||||
secondary: Colors.pink.shade200,
|
secondary: Colors.pink.shade200,
|
||||||
),
|
),
|
||||||
appBarTheme: AppBarTheme(
|
appBarTheme: AppBarTheme(
|
||||||
brightness: Brightness.dark,
|
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||||
color: Color(0xFF1E1E1E),
|
color: Color(0xFF1E1E1E),
|
||||||
iconTheme: IconThemeData(
|
iconTheme: IconThemeData(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
@ -181,7 +181,7 @@ class _DustyBlueTheme extends _ThemePackage {
|
||||||
secondary: Colors.blue.shade200,
|
secondary: Colors.blue.shade200,
|
||||||
),
|
),
|
||||||
appBarTheme: AppBarTheme(
|
appBarTheme: AppBarTheme(
|
||||||
brightness: Brightness.dark,
|
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||||
color: Color(0xff20253b),
|
color: Color(0xff20253b),
|
||||||
iconTheme: IconThemeData(
|
iconTheme: IconThemeData(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|
|
@ -382,7 +382,7 @@ abstract class _ImageReaderContentState extends State<_ImageReaderContent> {
|
||||||
axis: Axis.horizontal,
|
axis: Axis.horizontal,
|
||||||
values: [_slider.toDouble()],
|
values: [_slider.toDouble()],
|
||||||
min: 0,
|
min: 0,
|
||||||
max: widget.struct.images.length.toDouble(),
|
max: (widget.struct.images.length - 1).toDouble(),
|
||||||
onDragging: (handlerIndex, lowerValue, upperValue) {
|
onDragging: (handlerIndex, lowerValue, upperValue) {
|
||||||
_slider = (lowerValue.toInt());
|
_slider = (lowerValue.toInt());
|
||||||
},
|
},
|
||||||
|
|
|
@ -112,7 +112,7 @@ class ResourceDownloadFileImageProvider
|
||||||
')';
|
')';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 从远端加载图片 暂时未使用 (现在都是先获取路径然后再通过file显示)
|
// 从远端加载图片
|
||||||
class ResourceRemoteImageProvider
|
class ResourceRemoteImageProvider
|
||||||
extends ImageProvider<ResourceRemoteImageProvider> {
|
extends ImageProvider<ResourceRemoteImageProvider> {
|
||||||
final String fileServer;
|
final String fileServer;
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Generated file. Do not edit.
|
// Generated file. Do not edit.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Generated file. Do not edit.
|
// Generated file. Do not edit.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
||||||
#define GENERATED_PLUGIN_REGISTRANT_
|
#define GENERATED_PLUGIN_REGISTRANT_
|
||||||
|
|
||||||
|
|
42
pubspec.lock
42
pubspec.lock
|
@ -14,7 +14,7 @@ packages:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.1"
|
version: "2.8.1"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -35,7 +35,7 @@ packages:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.1"
|
||||||
clipboard:
|
clipboard:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -63,7 +63,7 @@ packages:
|
||||||
name: cupertino_icons
|
name: cupertino_icons
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.3"
|
version: "1.0.4"
|
||||||
event:
|
event:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -167,7 +167,7 @@ packages:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.7.0"
|
||||||
modal_bottom_sheet:
|
modal_bottom_sheet:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -216,21 +216,21 @@ packages:
|
||||||
name: permission_handler
|
name: permission_handler
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "8.1.6"
|
version: "8.3.0"
|
||||||
permission_handler_platform_interface:
|
permission_handler_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: permission_handler_platform_interface
|
name: permission_handler_platform_interface
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.6.1"
|
version: "3.7.0"
|
||||||
petitparser:
|
petitparser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: petitparser
|
name: petitparser
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.1.0"
|
version: "4.4.0"
|
||||||
photo_view:
|
photo_view:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -251,7 +251,7 @@ packages:
|
||||||
name: scrollable_positioned_list
|
name: scrollable_positioned_list
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.2"
|
version: "0.2.3"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -298,7 +298,7 @@ packages:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.4.2"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -312,7 +312,21 @@ packages:
|
||||||
name: url_launcher
|
name: url_launcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.0.10"
|
version: "6.0.17"
|
||||||
|
url_launcher_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_android
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "6.0.13"
|
||||||
|
url_launcher_ios:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_ios
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "6.0.13"
|
||||||
url_launcher_linux:
|
url_launcher_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -340,7 +354,7 @@ packages:
|
||||||
name: url_launcher_web
|
name: url_launcher_web
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.4"
|
version: "2.0.5"
|
||||||
url_launcher_windows:
|
url_launcher_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -361,7 +375,7 @@ packages:
|
||||||
name: xml
|
name: xml
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.1.2"
|
version: "5.3.1"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.12.0 <3.0.0"
|
dart: ">=2.14.0 <3.0.0"
|
||||||
flutter: ">=2.0.0"
|
flutter: ">=2.5.0"
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Generated file. Do not edit.
|
// Generated file. Do not edit.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Generated file. Do not edit.
|
// Generated file. Do not edit.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
||||||
#define GENERATED_PLUGIN_REGISTRANT_
|
#define GENERATED_PLUGIN_REGISTRANT_
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue