diff --git a/android/app/src/main/res/values-night-v31/styles.xml b/android/app/src/main/res/values-night-v31/styles.xml index 7640c57..f317218 100755 --- a/android/app/src/main/res/values-night-v31/styles.xml +++ b/android/app/src/main/res/values-night-v31/styles.xml @@ -1,21 +1,16 @@ - - - - - + \ No newline at end of file diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml index dbc9ea9..62c77ec 100755 --- a/android/app/src/main/res/values-night/styles.xml +++ b/android/app/src/main/res/values-night/styles.xml @@ -1,22 +1,14 @@ - - - - - + \ No newline at end of file diff --git a/android/app/src/main/res/values-v31/styles.xml b/android/app/src/main/res/values-v31/styles.xml index e437c38..006daf6 100755 --- a/android/app/src/main/res/values-v31/styles.xml +++ b/android/app/src/main/res/values-v31/styles.xml @@ -1,21 +1,16 @@ - - - - - + \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 0d1fa8f..62c77ec 100755 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -1,22 +1,14 @@ - - - - - + \ No newline at end of file diff --git a/assets/images/icon-3.svg b/assets/images/icon-3.svg index 35c137e..dcf5eaf 100644 --- a/assets/images/icon-3.svg +++ b/assets/images/icon-3.svg @@ -1,10 +1,10 @@ - + - + - + diff --git a/assets/images/icon-4.svg b/assets/images/icon-4.svg index a78722a..900164f 100644 --- a/assets/images/icon-4.svg +++ b/assets/images/icon-4.svg @@ -1,3 +1,3 @@ - - + + diff --git a/assets/images/icon-5.svg b/assets/images/icon-5.svg index ed3b0dc..5014501 100644 --- a/assets/images/icon-5.svg +++ b/assets/images/icon-5.svg @@ -1,10 +1,10 @@ - + - + - + diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 79e61d1..745dcf0 100755 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -16,6 +16,9 @@ PODS: - flutter_udid (0.0.1): - Flutter - SAMKeychain + - in_app_purchase_storekit (0.0.1): + - Flutter + - FlutterMacOS - OrderedSet (6.0.3) - package_info_plus (0.4.5): - Flutter @@ -41,6 +44,7 @@ DEPENDENCIES: - Flutter (from `Flutter`) - flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`) - flutter_udid (from `.symlinks/plugins/flutter_udid/ios`) + - in_app_purchase_storekit (from `.symlinks/plugins/in_app_purchase_storekit/darwin`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) @@ -66,6 +70,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_inappwebview_ios/ios" flutter_udid: :path: ".symlinks/plugins/flutter_udid/ios" + in_app_purchase_storekit: + :path: ".symlinks/plugins/in_app_purchase_storekit/darwin" package_info_plus: :path: ".symlinks/plugins/package_info_plus/ios" path_provider_foundation: @@ -86,6 +92,7 @@ SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4 flutter_udid: b2417673f287ee62817a1de3d1643f47b9f508ab + in_app_purchase_storekit: a1ce04056e23eecc666b086040239da7619cd783 OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 3f2a227..3d1c872 100755 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -24,6 +24,7 @@ 0736958B2B3AC96D007249BE /* Bundle+Properties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0736958A2B3AC96D007249BE /* Bundle+Properties.swift */; }; 075637BA2B01583F005AFB8E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 60F1D4AAC33ACF5C8307310D /* Pods_Runner.framework */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 186131822EE29AB0007DB19F /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 186131812EE29AAF007DB19F /* StoreKit.framework */; }; 2A9DDE222DCF45350006D7FC /* KRActiveGroupsEventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A9DDE192DCF45350006D7FC /* KRActiveGroupsEventHandler.swift */; }; 2A9DDE232DCF45350006D7FC /* KRLogsEventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A9DDE1D2DCF45350006D7FC /* KRLogsEventHandler.swift */; }; 2A9DDE242DCF45350006D7FC /* KRFileMethodHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A9DDE1B2DCF45350006D7FC /* KRFileMethodHandler.swift */; }; @@ -126,6 +127,7 @@ 07A63AA12B1E72FC00CAFA4D /* Sentry.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Sentry.xcframework; path = ../build/ios/framework/release/Sentry.xcframework; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 186131812EE29AAF007DB19F /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; 2A04EFFC2E2C75F5005FA780 /* RunnerRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerRelease.entitlements; sourceTree = ""; }; 2A04EFFD2E2C784A005FA780 /* PacketTunnelRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PacketTunnelRelease.entitlements; sourceTree = ""; }; 2A9DDE192DCF45350006D7FC /* KRActiveGroupsEventHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KRActiveGroupsEventHandler.swift; sourceTree = ""; }; @@ -188,6 +190,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 186131822EE29AB0007DB19F /* StoreKit.framework in Frameworks */, 075637BA2B01583F005AFB8E /* Pods_Runner.framework in Frameworks */, 68885DD72B4EF33400D214BA /* NetworkExtension.framework in Frameworks */, ); @@ -367,6 +370,7 @@ B8133545EEE13EDD5549E6A3 /* Frameworks */ = { isa = PBXGroup; children = ( + 186131812EE29AAF007DB19F /* StoreKit.framework */, 413270612C752158003A1E9B /* Libcore.xcframework */, 0736954E2B1FEB3E007249BE /* mobile_scanner.xcframework */, 07A63A932B1E72FB00CAFA4D /* cupertino_http.xcframework */, @@ -962,7 +966,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ENABLE_MODULES = YES; @@ -1190,7 +1193,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ENABLE_MODULES = YES; @@ -1244,7 +1246,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CLANG_ENABLE_MODULES = YES; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index e16b2a7..53ae014 100755 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -33,7 +33,7 @@ com.hi.ios CFBundleURLSchemes - HiFastVPN + $(PRODUCT_BUNDLE_IDENTIFIER) diff --git a/lib/app/modules/kr_login/views/kr_login_view.dart b/lib/app/modules/kr_login/views/kr_login_view.dart index 13b6b0f..d8a2e75 100755 --- a/lib/app/modules/kr_login/views/kr_login_view.dart +++ b/lib/app/modules/kr_login/views/kr_login_view.dart @@ -203,7 +203,7 @@ class KRLoginView extends GetView { controller: controller.accountController, hintText: 'Email', ), - SizedBox(height: 10.w), + SizedBox(height: 10), _buildStandardInputField( controller: controller.psdController, hintText: '密码', @@ -226,7 +226,7 @@ class KRLoginView extends GetView { bool isPassword = false, }) { return SizedBox( - height: 50, // 固定高度 + // height: 50, // 固定高度 child: TextField( controller: controller, obscureText: isPassword, diff --git a/lib/app/modules/kr_purchase_membership/controllers/kr_purchase_membership_controller.dart b/lib/app/modules/kr_purchase_membership/controllers/kr_purchase_membership_controller.dart index d57a449..c88bd23 100755 --- a/lib/app/modules/kr_purchase_membership/controllers/kr_purchase_membership_controller.dart +++ b/lib/app/modules/kr_purchase_membership/controllers/kr_purchase_membership_controller.dart @@ -17,6 +17,7 @@ import '../../../services/api_service/kr_api.user.dart'; import '../../../utils/kr_event_bus.dart'; import '../../../network/http_util.dart'; import 'package:flutter/foundation.dart'; +import 'package:flutter_stripe/flutter_stripe.dart'; /// 会员购买控制器 /// 负责处理会员套餐选择、支付方式选择和订阅流程 @@ -460,18 +461,54 @@ class KRPurchaseMembershipController extends GetxController { /// 处理购买和结账流程 Future kr_processPurchaseAndCheckout() async { - final selectedPlan = kr_plans[kr_selectedPlanIndex.value]; +// ========================================================================= + // 🔽 支付方式选择优化:iOS 优先使用 Stripe 🔽 + // ========================================================================= + final isIOS = Platform.isIOS; - // ⚠️ 支付方式接口暂未实现,使用默认支付方式 ID (1) 和平台 'alipay' - final paymentMethodId = kr_paymentMethods.isNotEmpty && kr_selectedPaymentMethodIndex.value >= 0 - ? kr_paymentMethods[kr_selectedPaymentMethodIndex.value].id - : 1; - final paymentPlatform = kr_paymentMethods.isNotEmpty && kr_selectedPaymentMethodIndex.value >= 0 - ? kr_paymentMethods[kr_selectedPaymentMethodIndex.value].platform - : 'alipay'; + // 1. 初始化为默认回退值 + int finalPaymentMethodId = 1; + String finalPaymentPlatform = 'alipay'; - // 获取选中的数量 + if (kr_paymentMethods.isNotEmpty) { + // 检查是否有用户已选中且索引有效 + final bool isIndexValid = kr_selectedPaymentMethodIndex.value >= 0 && + kr_selectedPaymentMethodIndex.value < kr_paymentMethods.length; + + if (isIOS) { + // 2. iOS 专属:查找 'stripe' + final stripeMethod = kr_paymentMethods.firstWhere( + (method) => method.platform == 'Stripe', + ); + + if (stripeMethod != null) { + // 找到了 Stripe,使用它 + finalPaymentMethodId = stripeMethod.id; + finalPaymentPlatform = stripeMethod.platform; + } else if (isIndexValid) { + // 找不到 Stripe,但用户有选中,使用选中的方式 + finalPaymentMethodId = + kr_paymentMethods[kr_selectedPaymentMethodIndex.value].id; + finalPaymentPlatform = + kr_paymentMethods[kr_selectedPaymentMethodIndex.value].platform; + } + } else { + // 3. 非 iOS 环境:如果用户有选中,使用选中的方式 + if (isIndexValid) { + finalPaymentMethodId = + kr_paymentMethods[kr_selectedPaymentMethodIndex.value].id; + finalPaymentPlatform = + kr_paymentMethods[kr_selectedPaymentMethodIndex.value].platform; + } + } + } + + final paymentMethodId = finalPaymentMethodId; + final paymentPlatform = finalPaymentPlatform; + // ========================================================================= + // 🔼 支付方式选择优化结束 🔼 + // ========================================================================= final quantity = kr_getSelectedQuantity(); // 判断是续订还是新购 @@ -805,6 +842,20 @@ class KRPurchaseMembershipController extends GetxController { print(' Stripe Client Secret: ${checkoutResponse.stripe?.clientSecret}'); print('💳 显示 Stripe 支付表单...'); print('═══════════════════════════════════════'); + await Stripe.instance.initPaymentSheet( + paymentSheetParameters: SetupPaymentSheetParameters( + // ⚠️ Stripe SDK 必须在 main() 中初始化过 publishableKey + paymentIntentClientSecret: checkoutResponse.stripe?.clientSecret, + merchantDisplayName: 'Hi快VPN', + // 确保 customerId 和 ephemeralKeySecret 也被设置,如果需要保存卡片信息 + ), + ); + + // B. 显示支付表单给用户 + await Stripe.instance.presentPaymentSheet(); + + // C. 支付成功 + print('✅ Stripe 支付成功!'); Get.toNamed( Routes.KR_ORDER_STATUS, diff --git a/lib/app/widgets/hi_fixed_scrollbar.dart b/lib/app/widgets/hi_fixed_scrollbar.dart index cb1254f..c52c5bf 100644 --- a/lib/app/widgets/hi_fixed_scrollbar.dart +++ b/lib/app/widgets/hi_fixed_scrollbar.dart @@ -1,4 +1,7 @@ +import 'dart:async'; import 'package:flutter/material.dart'; +import 'package:flutter/scheduler.dart'; +import 'package:flutter/rendering.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class HiFixedScrollbar extends StatefulWidget { @@ -6,21 +9,13 @@ class HiFixedScrollbar extends StatefulWidget { final ScrollController controller; final bool isShowScrollbar; - - /// 距离右边的间距(默认 18) final double right; - - /// 滚动条宽度 final double thickness; - - /// 滚动条颜色(默认白色 30%) final Color thumbColor; - - /// 背景轨道颜色(默认白色 15%) final Color trackColor; - - /// 滚动条固定高度(默认 50) final double thumbHeight; + final Duration fadeDuration; + final Duration fadeDelay; const HiFixedScrollbar({ super.key, @@ -32,24 +27,81 @@ class HiFixedScrollbar extends StatefulWidget { this.thumbHeight = 50, this.thumbColor = const Color.fromRGBO(255, 255, 255, 0.3), this.trackColor = const Color.fromRGBO(255, 255, 255, 0.15), + this.fadeDuration = const Duration(milliseconds: 300), + this.fadeDelay = const Duration(milliseconds: 500), }); @override State createState() => _HiFixedScrollbarState(); } -class _HiFixedScrollbarState extends State { +class _HiFixedScrollbarState extends State + with SingleTickerProviderStateMixin { double _thumbOffset = 0.0; - bool _hasScrolled = false; + late AnimationController _fadeController; + Timer? _fadeTimer; @override void initState() { super.initState(); + _fadeController = AnimationController( + vsync: this, + duration: widget.fadeDuration, + ); + // 1. 监听位置变化 (仅更新 _thumbOffset) widget.controller.addListener(_updateThumbPosition); + SchedulerBinding.instance.addPostFrameCallback((_) { + if (!mounted) return; + if (widget.controller.hasClients) { + _updateThumbPosition(); + } + }); + } + + @override + void didUpdateWidget(covariant HiFixedScrollbar oldWidget) { + super.didUpdateWidget(oldWidget); + + if (widget.controller != oldWidget.controller) { + // 移除旧控制器的位置监听 + oldWidget.controller.removeListener(_updateThumbPosition); + // 添加新控制器的位置监听 + widget.controller.addListener(_updateThumbPosition); + _fadeTimer?.cancel(); + SchedulerBinding.instance.addPostFrameCallback((_) { + if (!mounted) return; + if (widget.controller.hasClients) { + _updateThumbPosition(); + } + }); + } + } + + bool _onScrollNotification(ScrollNotification notification) { + if (!mounted) return false; + if (_fadeTimer != null && _fadeTimer!.isActive) { + _fadeTimer?.cancel(); + } + if (notification is ScrollStartNotification || + notification is ScrollUpdateNotification) { + _fadeController.forward(); + _updateThumbPosition(); + } else if (notification is ScrollEndNotification || + (notification is UserScrollNotification && + notification.direction == ScrollDirection.idle)) { + _fadeTimer = Timer(widget.fadeDelay, () { + if (mounted) { + _fadeController.reverse(); + } else { + _fadeTimer?.cancel(); + } + }); + } + return false; } void _updateThumbPosition() { - if (!mounted) return; + if (!mounted || !widget.controller.hasClients) return; final position = widget.controller.position; if (!position.hasPixels || !position.hasContentDimensions) return; @@ -57,19 +109,43 @@ class _HiFixedScrollbarState extends State { final offset = position.pixels; final viewport = position.viewportDimension; - // ✅ 固定高度滚动条,只根据滚动比例移动位置 - final trackHeight = viewport - widget.thumbHeight; - final scrollRatio = maxScrollExtent == 0 ? 0 : offset / maxScrollExtent; + if (maxScrollExtent <= 0) { + if (_thumbOffset != 0.0) { + setState(() => _thumbOffset = 0.0); + } + if (_fadeController.status != AnimationStatus.dismissed) { + _fadeController.reverse(); + } + return; + } - setState(() { - _thumbOffset = (trackHeight * scrollRatio).clamp(0, trackHeight); - _hasScrolled = offset > 0; - }); + final trackHeight = viewport - widget.thumbHeight.h; + final scrollRatio = offset / maxScrollExtent; + final newOffset = (trackHeight * scrollRatio).clamp(0.0, trackHeight); + + if (_thumbOffset != newOffset) { + setState(() { + _thumbOffset = newOffset; + }); + if (_fadeTimer != null && _fadeTimer!.isActive) { + _fadeTimer?.cancel(); + } + _fadeController.forward(); + _fadeTimer = Timer(widget.fadeDelay, () { + if (mounted) { + _fadeController.reverse(); + } else { + _fadeTimer?.cancel(); + } + }); + } } @override void dispose() { widget.controller.removeListener(_updateThumbPosition); + _fadeController.dispose(); + _fadeTimer?.cancel(); super.dispose(); } @@ -77,44 +153,62 @@ class _HiFixedScrollbarState extends State { Widget build(BuildContext context) { return LayoutBuilder( builder: (_, constraints) { - final showScrollbar = widget.isShowScrollbar && - widget.controller.hasClients && - widget.controller.position.maxScrollExtent > 0 && - _hasScrolled; + final position = + widget.controller.hasClients ? widget.controller.position : null; + + if (position == null || !position.hasContentDimensions) { + return widget.child; + } + + final maxScrollExtent = position.maxScrollExtent; + final canShowScrollbar = widget.isShowScrollbar && maxScrollExtent > 0; + return Stack( children: [ - // 滚动内容 - widget.child, + NotificationListener( + onNotification: _onScrollNotification, + child: widget.child, + ), + if (canShowScrollbar) + AnimatedBuilder( + animation: _fadeController, + builder: (context, child) { + return Opacity( + opacity: _fadeController.value, + child: Stack( + children: [ + // 滚动条轨道 (Track) + Positioned( + right: widget.right.w.toDouble(), + top: 0, + bottom: 0, + child: Container( + width: widget.thickness.w.toDouble(), + decoration: BoxDecoration( + color: widget.trackColor, + borderRadius: BorderRadius.circular(4), + ), + ), + ), - if (showScrollbar) ...[ - // 滚动条轨道 - Positioned( - right: widget.right.w, - top: 0, - bottom: 0, - child: Container( - width: widget.thickness.w, - decoration: BoxDecoration( - color: widget.trackColor, - borderRadius: BorderRadius.circular(4), - ), - ), + // 滚动条拇指 (Thumb) + Positioned( + right: widget.right.w.toDouble(), + top: _thumbOffset, + child: Container( + width: widget.thickness.w.toDouble(), + height: widget.thumbHeight.h.toDouble(), + decoration: BoxDecoration( + color: widget.thumbColor, + borderRadius: BorderRadius.circular(4), + ), + ), + ), + ], + ), + ); + }, ), - - // 滚动条拇指 - Positioned( - right: widget.right.w, - top: _thumbOffset, - child: Container( - width: widget.thickness.w, - height: widget.thumbHeight, - decoration: BoxDecoration( - color: widget.thumbColor, - borderRadius: BorderRadius.circular(4), - ), - ), - ), - ] ], ); }, diff --git a/lib/main.dart b/lib/main.dart index bf601d9..7cbf428 100755 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,6 +8,7 @@ import 'package:flutter/services.dart'; // import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart'; import 'package:get/get.dart'; +import 'package:flutter_stripe/flutter_stripe.dart'; import 'package:kaer_with_panels/app/themes/kr_theme_service.dart'; import 'package:kaer_with_panels/app/localization/getx_translations.dart'; @@ -47,6 +48,8 @@ void main() async { // 初始化日志系统 KRLogUtil.kr_init(); + Stripe.publishableKey = 'pk_live_51SbuYxAawOMH8rEEkz6f4mnxAUjGC72eQ6qdm5tT6whC4hULkxxdbiPsB4gSCIMnNIGCsIgeASTXBakUcbOuUwQO00jSWjuufx'; + // 初始化 Hive await KRSecureStorage().kr_initHive(); diff --git a/pubspec.lock b/pubspec.lock index 2eda2e8..b30efdd 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -651,6 +651,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.9.3" + flutter_stripe: + dependency: "direct main" + description: + name: flutter_stripe + sha256: "6c10f839e2623a336de79023a95a49c8d177032d5fd54b1f7ee9755fc577e227" + url: "https://pub.dev" + source: hosted + version: "10.2.0" flutter_svg: dependency: "direct main" description: @@ -1578,6 +1586,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + stripe_android: + dependency: transitive + description: + name: stripe_android + sha256: "74c977ae0a918949e84796a8a3524a68610f4719c66170f01592b4bc5196f049" + url: "https://pub.dev" + source: hosted + version: "10.2.1" + stripe_ios: + dependency: transitive + description: + name: stripe_ios + sha256: eb91cb9b971e22f865937309b0e5e4e0f5bcbfc39e671bd41c0fdaddbb5ad948 + url: "https://pub.dev" + source: hosted + version: "10.2.0" + stripe_platform_interface: + dependency: transitive + description: + name: stripe_platform_interface + sha256: "1a2e3fe106bc723c0c0cda2f97f15bfef16944507621639c636041845a96ff57" + url: "https://pub.dev" + source: hosted + version: "10.2.0" term_glyph: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 0ea3bf8..ca3fd1d 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: kaer_with_panels description: "Hi快VPN 客户端应用,提供安全的 VPN 连接服务,支持多平台。" # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: "none" # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 0.0.4+107 environment: - sdk: '>=3.5.0 <4.0.0' + sdk: ">=3.5.0 <4.0.0" flutter: ">=3.19.0" # Dependencies specify other packages that your package needs in order to work. @@ -61,7 +61,7 @@ dependencies: fpdart: ^1.1.0 dartx: ^1.2.0 rxdart: ^0.27.7 - combine: 0.5.7 # 精确版本,兼容 Flutter 3.24.3(与 hiddify-app 相同) + combine: 0.5.7 # 精确版本,兼容 Flutter 3.24.3(与 hiddify-app 相同) encrypt: ^5.0.0 path: ^1.8.3 path_provider: ^2.1.1 @@ -70,14 +70,13 @@ dependencies: # 存储和安全 flutter_udid: ^4.0.0 - # 平台集成 window_manager: ^0.4.3 webview_flutter: ^4.7.0 url_launcher: ^6.3.1 - flutter_inappwebview: ^6.1.5 # 最新稳定版本 - crisp_sdk: ^1.1.0 # 使用 crisp_sdk,配合最新的 flutter_inappwebview + flutter_inappwebview: ^6.1.5 # 最新稳定版本 + crisp_sdk: ^1.1.0 # 使用 crisp_sdk,配合最新的 flutter_inappwebview protocol_handler_windows: ^0.2.0 share_plus: ^7.2.2 @@ -113,11 +112,11 @@ dependencies: # 新添加的依赖 tray_manager: ^0.2.0 device_info_plus: ^11.3.0 - + flutter_stripe: ^10.1.0 dev_dependencies: flutter_test: sdk: flutter - + # 代码质量 lint: ^2.3.0 dependency_validator: ^3.2.3 @@ -133,7 +132,7 @@ dev_dependencies: flutter_gen_runner: ^5.4.0 go_router_builder: ^2.4.1 dart_mappable_builder: ^4.2.1 - + # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec @@ -278,18 +277,17 @@ flutter: - assets/map_tiles/6/62/ - assets/map_tiles/6/63/ - uses-material-design: true fonts: - - family: AlibabaPuHuiTi-Medium - fonts: - - asset: assets/fonts/AlibabaPuHuiTi-Medium.ttf - - family: AlibabaPuHuiTi-Regular - fonts: - - asset: assets/fonts/AlibabaPuHuiTi-Regular.ttf - - family: Emoji - fonts: - - asset: assets/fonts/Emoji.ttf + - family: AlibabaPuHuiTi-Medium + fonts: + - asset: assets/fonts/AlibabaPuHuiTi-Medium.ttf + - family: AlibabaPuHuiTi-Regular + fonts: + - asset: assets/fonts/AlibabaPuHuiTi-Regular.ttf + - family: Emoji + fonts: + - asset: assets/fonts/Emoji.ttf flutter_gen: output: lib/gen/