Merge remote-tracking branch 'origin/mcy_new' into mcy_new

This commit is contained in:
machuanyu 2025-04-25 15:59:01 +08:00
commit 5bf70505ed
5 changed files with 61 additions and 20 deletions

View File

@ -495,7 +495,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = Z778GC45N8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -503,7 +503,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3;
MARKETING_VERSION = 4;
PRODUCT_BUNDLE_IDENTIFIER = "com.yuanxuan.makingS--buneng--choolAsignmentApp";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -689,7 +689,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = Z778GC45N8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -697,7 +697,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3;
MARKETING_VERSION = 4;
PRODUCT_BUNDLE_IDENTIFIER = com.yuanxuan.makingSchoolAsignmentApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -719,7 +719,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = Z778GC45N8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -727,7 +727,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3;
MARKETING_VERSION = 4;
PRODUCT_BUNDLE_IDENTIFIER = com.yuanxuan.makingSchoolAsignmentApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

View File

@ -4,6 +4,7 @@ import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
import 'package:making_school_asignment_app/common/job/app_version.dart';
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
import 'package:making_school_asignment_app/common/store/user_store.dart';
import 'package:making_school_asignment_app/common/utils/permission_describe_util.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:permission_handler/permission_handler.dart';
@ -27,7 +28,14 @@ class UpgradeLogic extends GetxController with RequestToolMixin {
try {
showUpgrade.value = true;
// if (['18888888888'].contains(user.loginName)) return;
final names = [
UserStore.to.userDetailInfo.value?.name,
UserStore.to.userDetailInfo.value?.account,
].whereType<String>().where((name) => name.isNotEmpty).toList();
if (names.contains('AppleTester')) return;
//
String deviceInfo;
int deviceType;

View File

@ -283,6 +283,38 @@ class QuestionImageView extends HookWidget with EventBusMixin<BottomOperationBar
//
static const int timeoutDuration = 300;
///
void toTimer(ValueNotifier<List<dynamic>> vnHandWritings) {
timer?.cancel();
timer = Timer(const Duration(milliseconds: timeoutDuration), () {
if (_activePointers > 2) {
_activePointers = 0;
if (vnHandWritings.value.last != null) {
vnHandWritings.value.add(null); // 线
sateData.handwritings = vnHandWritings.value; //
}
}
});
}
///
Offset? getLastDrop(List<dynamic> vals, int index) {
Offset? lastDrop;
if (vals.isNotEmpty) {
lastDrop = vals[index] as Offset?;
///
// if (lastDrop == null) {
// index -= 1;
// if (index > -1) {
// lastDrop = getLastDrop(vals, index);
// }
// }
}
return lastDrop;
}
@override
Widget build(BuildContext context) {
final theMaxHeight = useState<double>(maxHeight);
@ -430,17 +462,8 @@ class QuestionImageView extends HookWidget with EventBusMixin<BottomOperationBar
//
_activePointers = _activePointers + 1;
print("+++进入onPointerDown $_activePointers");
timer?.cancel();
timer = Timer(const Duration(milliseconds: timeoutDuration), () {
if (_activePointers > 0) {
_activePointers = 0;
if (vnHandWritings.value.last != null) {
vnHandWritings.value.add(null); // 线
sateData.handwritings = vnHandWritings.value; //
}
}
});
///
toTimer(vnHandWritings);
sateData.panQuestView = true;
},
onPointerUp: (PointerUpEvent details) {
@ -460,7 +483,7 @@ class QuestionImageView extends HookWidget with EventBusMixin<BottomOperationBar
onPointerMove: (PointerMoveEvent event) {
print("进入onPointerMove $_activePointers");
if (_activePointers != 1) return;
timer?.cancel();
toTimer(vnHandWritings);
if (!annotationState.pen.value) return;
Offset localPosition = event.localPosition; //
@ -500,6 +523,12 @@ class QuestionImageView extends HookWidget with EventBusMixin<BottomOperationBar
(dy - max(0, imageHeightOffsetStart) + ((zoomFile.imageHeightOffsetStart == null || zoomFile.imageHeightOffsetStart! <= 0.1) ? (sateData.zoomOffset?.dy.abs() ?? 0) : 0)) / theScale,
);
///
var lastDrop = getLastDrop(vnHandWritings.value, vnHandWritings.value.length-1);
if (lastDrop != null && ((lastDrop.dx - localPosition.dx).abs() > 40 || (lastDrop.dy - localPosition.dy).abs() > 40)) {
/// X点和上一个x点相差 10
return;
}
// print("最终位置 $localPosition");
vnHandWritings.value = List.from(vnHandWritings.value)..add(localPosition);
sateData.handwritings = vnHandWritings.value;

View File

@ -5,6 +5,8 @@
import FlutterMacOS
import Foundation
import app_installer
import app_settings
import auto_updater_macos
import connectivity_plus
import device_info_plus
@ -14,6 +16,8 @@ import sqflite
import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AppInstallerPlugin.register(with: registry.registrar(forPlugin: "AppInstallerPlugin"))
AppSettingsPlugin.register(with: registry.registrar(forPlugin: "AppSettingsPlugin"))
AutoUpdaterMacosPlugin.register(with: registry.registrar(forPlugin: "AutoUpdaterMacosPlugin"))
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))

View File

@ -16,7 +16,7 @@ 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.0.4+5
version: 1.0.3+4
environment:
sdk: '>=3.4.1 <4.0.0'