diff --git a/lib/main.dart b/lib/main.dart index aceec8b..bfe71a6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pad_scanner/pages/registration_page.dart'; +import 'package:pad_scanner/pages/home_page.dart'; void main() { runApp(const PadScannerApp()); @@ -11,12 +11,12 @@ class PadScannerApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( - title: '上架登记', + title: 'CargoTrace', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue), useMaterial3: true, ), - home: const RegistrationPage(), + home: const HomePage(), ); } } diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart new file mode 100644 index 0000000..c3eaf13 --- /dev/null +++ b/lib/pages/home_page.dart @@ -0,0 +1,344 @@ +import 'package:flutter/material.dart'; +import 'package:pad_scanner/services/app_config_service.dart'; +import 'package:pad_scanner/pages/settings_page.dart'; +import 'package:pad_scanner/pages/registration_page.dart'; +import 'package:pad_scanner/services/api_service.dart'; + +/// Module type enum for each available feature card +enum ModuleType { registration, boxing, shelfQuery } + +/// Module status for PRD state tracking +enum ModuleStatus { online, developing, planning } + +/// Function card data model per PRD §3.3 +class FeatureCard { + final ModuleType type; + final IconData icon; + final String title; + final String description; + final ModuleStatus status; + final String? version; + final String route; + + const FeatureCard({ + required this.type, + required this.icon, + required this.title, + required this.description, + required this.status, + this.version, + required this.route, + }); +} + +class HomePage extends StatefulWidget { + const HomePage({super.key}); + + @override + State createState() => _HomePageState(); +} + +class _HomePageState extends State { + final _apiService = ApiService(); + bool _isCheckingConnection = false; + bool _isConnected = false; + String _apiAddress = ''; + + /// Module registry from PRD §3.4 + static const _modules = [ + FeatureCard( + type: ModuleType.registration, + icon: Icons.local_shipping_outlined, + title: '上架登记', + description: '扫码绑定总排号与货位', + status: ModuleStatus.online, + version: 'v1.0', + route: '/registration', + ), + FeatureCard( + type: ModuleType.boxing, + icon: Icons.view_list_outlined, + title: '装箱编号', + description: '查询箱号、录入装箱明细', + status: ModuleStatus.developing, + version: null, + route: '/boxing', + ), + FeatureCard( + type: ModuleType.shelfQuery, + icon: Icons.search_outlined, + title: '货架查询', + description: '按合同查询货架库存', + status: ModuleStatus.planning, + version: null, + route: '', + ), + ]; + + @override + void initState() { + super.initState(); + _checkConnection(); + } + + Future _checkConnection() async { + final configService = AppConfigService(); + final url = await configService.getString('api_url') ?? ''; + if (url.isEmpty) { + setState(() { + _isConnected = false; + _apiAddress = ''; + _isCheckingConnection = false; + }); + return; + } + + setState(() => _isCheckingConnection = true); + final ok = await _apiService.testConnection(url); + if (!mounted) return; + setState(() { + _isConnected = ok; + _apiAddress = url; + _isCheckingConnection = false; + }); + } + + void _onCardTap(FeatureCard card) { + switch (card.status) { + case ModuleStatus.online: + _navigateToModule(card.type); + case ModuleStatus.developing: + _showToast('该功能正在开发中'); + case ModuleStatus.planning: + _showToast('该功能规划中'); + } + } + + void _showToast(String message) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text(message), duration: const Duration(seconds: 2)), + ); + } + + void _navigateToModule(ModuleType type) { + late Widget targetPage; + switch (type) { + case ModuleType.registration: + targetPage = const RegistrationPage(); + break; + case ModuleType.boxing: + //TODO: Implement boxing page + targetPage = Scaffold( + appBar: AppBar(title: const Text('装箱编号')), + body: const Center(child: Text('开发中')), + ); + break; + case ModuleType.shelfQuery: + return; // 规划中,不导航 + } + Navigator.push( + context, + MaterialPageRoute(builder: (_) => targetPage), + ).then((_) => _checkConnection()); + } + + void _navigateToSettings() { + Navigator.push( + context, + MaterialPageRoute(builder: (_) => const SettingsPage()), + ).then((_) => _checkConnection()); + } + + Color _getConnectionStatusColor() { + if (_isCheckingConnection) return Colors.orange; + return _isConnected ? Colors.green : Colors.red; + } + + String _getConnectionStatusText() { + if (_isCheckingConnection) return '● 正在检测连接...'; + if (!_isConnected || _apiAddress.isEmpty) return '● 未连接,请检查设置'; + return '● 已连接 $_apiAddress'; + } + + @override + Widget build(BuildContext context) { + final colorScheme = Theme.of(context).colorScheme; + + return Scaffold( + appBar: AppBar( + title: const Text('CargoTrace'), + actions: [ + Padding( + padding: const EdgeInsets.only(right: 8), + child: IconButton( + icon: const Icon(Icons.settings), + onPressed: _navigateToSettings, + ), + ), + ], + ), + body: Column( + children: [ + // Function cards area + Expanded( + child: ListView.builder( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), + itemCount: _modules.length, + itemBuilder: (context, index) { + final card = _modules[index]; + return _buildFeatureCard(context, card); + }, + ), + ), + + // Bottom connection status bar + Container( + width: double.infinity, + padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16), + color: colorScheme.surfaceContainerHighest, + child: Row( + children: [ + Container( + width: 8, + height: 8, + decoration: BoxDecoration( + color: _getConnectionStatusColor(), + shape: BoxShape.circle, + ), + ), + const SizedBox(width: 8), + Expanded( + child: Text( + _getConnectionStatusText(), + style: const TextStyle(fontSize: 13), + overflow: TextOverflow.ellipsis, + ), + ), + ], + ), + ), + ], + ), + ); + } + + Widget _buildFeatureCard(BuildContext context, FeatureCard card) { + final Color statusBgColor; + final TextStyle statusTextStyle; + final String statusText; + + switch (card.status) { + case ModuleStatus.online: + statusBgColor = Colors.green.shade700; + statusTextStyle = const TextStyle(color: Colors.white, fontSize: 12); + statusText = card.version ?? '已上线'; + break; + case ModuleStatus.developing: + statusBgColor = Colors.blue.shade700; + statusTextStyle = const TextStyle(color: Colors.white, fontSize: 12); + statusText = '开发中'; + break; + case ModuleStatus.planning: + statusBgColor = Colors.grey.shade500; + statusTextStyle = const TextStyle(color: Colors.white, fontSize: 12); + statusText = '规划中'; + break; + } + + final canNavigate = card.status == ModuleStatus.online; + + return Padding( + padding: const EdgeInsets.only(bottom: 16), + child: InkWell( + onTap: () => _onCardTap(card), + borderRadius: BorderRadius.circular(8), + child: Container( + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: canNavigate ? Colors.white : Colors.grey.shade200, + borderRadius: BorderRadius.circular(8), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.05), + blurRadius: 4, + offset: const Offset(0, 2), + ), + ], + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // First row: icon + module name + Row( + children: [ + Icon( + card.icon, + size: 22, + color: canNavigate ? Colors.blue : Colors.grey, + ), + const SizedBox(width: 8), + Text( + card.title, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: canNavigate ? Colors.black87 : Colors.grey, + ), + ), + ], + ), + const SizedBox(height: 6), + // Second row: description + Text( + card.description, + style: TextStyle(fontSize: 13, color: Colors.grey.shade600), + ), + const SizedBox(height: 10), + // Third row: status badge (right aligned) + Align( + alignment: Alignment.centerRight, + child: Container( + padding: const EdgeInsets.symmetric( + horizontal: 8, + vertical: 3, + ), + decoration: BoxDecoration( + color: statusBgColor, + borderRadius: BorderRadius.circular(4), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text(statusText, style: statusTextStyle), + if (card.status == ModuleStatus.online) ...[ + const SizedBox(width: 6), + Container( + width: 6, + height: 6, + decoration: const BoxDecoration( + color: Colors.white, + shape: BoxShape.circle, + ), + ), + ] else ...[ + const SizedBox(width: 6), + Container( + width: 6, + height: 6, + decoration: BoxDecoration( + color: Colors.white.withValues(alpha: 0.5), + shape: BoxShape.circle, + ), + ), + ], + ], + ), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/registration_page.dart b/lib/pages/registration_page.dart index c952ff2..882a75c 100644 --- a/lib/pages/registration_page.dart +++ b/lib/pages/registration_page.dart @@ -1,9 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:shared_preferences/shared_preferences.dart'; +import 'package:pad_scanner/services/app_config_service.dart'; import 'package:pad_scanner/services/scanner_service.dart'; import 'package:pad_scanner/services/code_parser.dart'; import 'package:pad_scanner/services/api_service.dart'; -import 'package:pad_scanner/pages/settings_page.dart'; class RegistrationPage extends StatefulWidget { const RegistrationPage({super.key}); @@ -107,8 +106,8 @@ class _RegistrationPageState extends State { Future _submit() async { if (!_canSubmit) return; - final prefs = await SharedPreferences.getInstance(); - final baseUrl = prefs.getString('api_url') ?? ''; + final configService = AppConfigService(); + final baseUrl = await configService.getString('api_url') ?? ''; if (baseUrl.isEmpty) { _showFeedback('未配置 API 地址,请前往设置', isError: true); return; @@ -143,8 +142,7 @@ class _RegistrationPageState extends State { _locationCode = null; _locationType = null; } - _successMessage = - _isLocked ? '货位已锁定,请扫描下一张执行卡' : '上架成功'; + _successMessage = _isLocked ? '货位已锁定,请扫描下一张执行卡' : '上架成功'; }); _showFeedback('上架成功', isError: false); Future.delayed(const Duration(milliseconds: 1500), () { @@ -222,8 +220,10 @@ class _RegistrationPageState extends State { const SizedBox(height: 4), Text('登记时间:${info?["registered_at"] ?? "未知"}'), const SizedBox(height: 12), - const Text('请核查实物,确认是否操作错误。', - style: TextStyle(fontWeight: FontWeight.bold)), + const Text( + '请核查实物,确认是否操作错误。', + style: TextStyle(fontWeight: FontWeight.bold), + ), ], ), actions: [ @@ -275,17 +275,7 @@ class _RegistrationPageState extends State { child: Row( children: [ const Text('锁定货位', style: TextStyle(fontSize: 13)), - Switch( - value: _isLocked, - onChanged: _toggleLock, - ), - IconButton( - icon: const Icon(Icons.settings), - onPressed: () => Navigator.push( - context, - MaterialPageRoute(builder: (_) => const SettingsPage()), - ), - ), + Switch(value: _isLocked, onChanged: _toggleLock), ], ), ), @@ -297,8 +287,7 @@ class _RegistrationPageState extends State { if (_snackbarMessage != null) Container( width: double.infinity, - padding: - const EdgeInsets.symmetric(vertical: 10, horizontal: 16), + padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16), color: _snackbarColor, child: Text( _snackbarMessage!, @@ -316,17 +305,24 @@ class _RegistrationPageState extends State { // ---- 目标货位 (上方) ---- Row( children: [ - const Text('目标货位', - style: TextStyle( - fontSize: 14, fontWeight: FontWeight.w500)), + const Text( + '目标货位', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w500, + ), + ), if (_locationCode != null) ...[ const SizedBox(width: 8), Container( padding: const EdgeInsets.symmetric( - horizontal: 6, vertical: 2), + horizontal: 6, + vertical: 2, + ), decoration: BoxDecoration( - color: _locationLabelColor(_locationType) - .withValues(alpha: 0.15), + color: _locationLabelColor( + _locationType, + ).withValues(alpha: 0.15), borderRadius: BorderRadius.circular(4), ), child: Text( @@ -345,7 +341,9 @@ class _RegistrationPageState extends State { Container( width: double.infinity, padding: const EdgeInsets.symmetric( - horizontal: 12, vertical: 14), + horizontal: 12, + vertical: 14, + ), decoration: BoxDecoration( border: Border.all( color: _locationCode != null @@ -370,8 +368,11 @@ class _RegistrationPageState extends State { ), ), if (_isLocked) - const Icon(Icons.lock, - color: Colors.orange, size: 20), + const Icon( + Icons.lock, + color: Colors.orange, + size: 20, + ), ], ), ), @@ -381,14 +382,20 @@ class _RegistrationPageState extends State { // ---- 总排号 (下方) ---- Row( children: [ - const Text('总排号', - style: TextStyle( - fontSize: 14, fontWeight: FontWeight.w500)), + const Text( + '总排号', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w500, + ), + ), if (_isLocked && _zongpaiNos.isNotEmpty) ...[ const SizedBox(width: 8), Container( padding: const EdgeInsets.symmetric( - horizontal: 6, vertical: 2), + horizontal: 6, + vertical: 2, + ), decoration: BoxDecoration( color: Colors.blue.withValues(alpha: 0.15), borderRadius: BorderRadius.circular(4), @@ -415,14 +422,15 @@ class _RegistrationPageState extends State { width: double.infinity, padding: const EdgeInsets.all(14), decoration: BoxDecoration( - border: Border.all( - color: Colors.grey.shade400), + border: Border.all(color: Colors.grey.shade400), borderRadius: BorderRadius.circular(8), ), child: const Text( '', style: TextStyle( - fontSize: 20, color: Colors.grey), + fontSize: 20, + color: Colors.grey, + ), ), ) : ListView.separated( @@ -431,36 +439,32 @@ class _RegistrationPageState extends State { const SizedBox(height: 6), itemBuilder: (context, index) { return Dismissible( - key: ValueKey( - '${_zongpaiNos[index]}-$index'), - direction: - DismissDirection.endToStart, - onDismissed: (_) => - _removeZongpai(index), + key: ValueKey('${_zongpaiNos[index]}-$index'), + direction: DismissDirection.endToStart, + onDismissed: (_) => _removeZongpai(index), background: Container( - alignment: - Alignment.centerRight, - padding: const EdgeInsets.only( - right: 16), + alignment: Alignment.centerRight, + padding: const EdgeInsets.only(right: 16), decoration: BoxDecoration( color: Colors.red.shade100, - borderRadius: - BorderRadius.circular(8), + borderRadius: BorderRadius.circular(8), + ), + child: const Icon( + Icons.delete, + color: Colors.red, ), - child: const Icon(Icons.delete, - color: Colors.red), ), child: Container( - padding: - const EdgeInsets.symmetric( - horizontal: 12, - vertical: 12), + padding: const EdgeInsets.symmetric( + horizontal: 12, + vertical: 12, + ), decoration: BoxDecoration( border: Border.all( - color: Colors.green, - width: 2), - borderRadius: - BorderRadius.circular(8), + color: Colors.green, + width: 2, + ), + borderRadius: BorderRadius.circular(8), ), child: Row( children: [ @@ -469,21 +473,20 @@ class _RegistrationPageState extends State { _zongpaiNos[index], style: const TextStyle( fontSize: 20, - fontWeight: - FontWeight.bold, + fontWeight: FontWeight.bold, color: Colors.black87, ), ), ), IconButton( icon: const Icon( - Icons.close, - size: 20), + Icons.close, + size: 20, + ), onPressed: () => _removeZongpai(index), padding: EdgeInsets.zero, - constraints: - const BoxConstraints(), + constraints: const BoxConstraints(), ), ], ), @@ -497,7 +500,9 @@ class _RegistrationPageState extends State { Container( width: double.infinity, padding: const EdgeInsets.symmetric( - horizontal: 12, vertical: 14), + horizontal: 12, + vertical: 14, + ), decoration: BoxDecoration( border: Border.all( color: _zongpaiNos.isNotEmpty @@ -575,8 +580,8 @@ class _RegistrationPageState extends State { color: _isSubmitting ? Colors.orange : _successMessage != null - ? Colors.green - : Colors.blue, + ? Colors.green + : Colors.blue, shape: BoxShape.circle, ), ), diff --git a/lib/pages/settings_page.dart b/lib/pages/settings_page.dart index bbbb8cf..cf374b9 100644 --- a/lib/pages/settings_page.dart +++ b/lib/pages/settings_page.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:shared_preferences/shared_preferences.dart'; +import 'package:pad_scanner/services/app_config_service.dart'; import 'package:pad_scanner/services/api_service.dart'; class SettingsPage extends StatefulWidget { @@ -22,8 +22,8 @@ class _SettingsPageState extends State { } Future _loadUrl() async { - final prefs = await SharedPreferences.getInstance(); - final url = prefs.getString('api_url') ?? ''; + final configService = AppConfigService(); + final url = await configService.getString('api_url') ?? ''; _controller.text = url; } @@ -34,8 +34,8 @@ class _SettingsPageState extends State { return; } setState(() => _saving = true); - final prefs = await SharedPreferences.getInstance(); - await prefs.setString('api_url', url); + final configService = AppConfigService(); + await configService.setString('api_url', url); setState(() => _saving = false); if (mounted) { _showSnackBar('设置已保存'); @@ -52,10 +52,7 @@ class _SettingsPageState extends State { final ok = await _apiService.testConnection(url); setState(() => _testing = false); if (mounted) { - _showSnackBar( - ok ? '连接成功' : '连接失败,请检查地址和网络', - isError: !ok, - ); + _showSnackBar(ok ? '连接成功' : '连接失败,请检查地址和网络', isError: !ok); } } diff --git a/lib/services/app_config_service.dart b/lib/services/app_config_service.dart new file mode 100644 index 0000000..9f49ead --- /dev/null +++ b/lib/services/app_config_service.dart @@ -0,0 +1,53 @@ +import 'dart:io'; +import 'package:flutter/foundation.dart'; +import 'package:path_provider/path_provider.dart'; +import 'dart:convert'; + +/// 应用全局配置服务 (替代 SharedPreferences) +/// 配置数据持久化为本地 JSON 文件,覆盖安装应用时数据不丢失。 +class AppConfigService { + static const String _kConfigFileName = 'app_config.json'; + static final Map _defaults = {'api_url': ''}; + + Future get _filePath async { + final directory = await getApplicationDocumentsDirectory(); + return '${directory.path}/$_kConfigFileName'; + } + + /// 读取完整配置字典 + Future> loadConfig() async { + try { + final file = File(await _filePath); + if (await file.exists()) { + final jsonString = await file.readAsString(); + return jsonDecode(jsonString) as Map; + } + } catch (e) { + debugPrint('[AppConfig] 读取配置失败: $e'); + } + return Map.from(_defaults); + } + + /// 读取字符串配置项 + Future getString(String key) async { + final config = await loadConfig(); + return config[key] as String?; + } + + /// 保存字符串配置项 + Future setString(String key, String value) async { + final config = await loadConfig(); + config[key.toString()] = value.toString(); + await _saveConfig(config); + } + + /// 完整写入 JSON 文件 + Future _saveConfig(Map config) async { + try { + final file = File(await _filePath); + await file.writeAsString(jsonEncode(config)); + } catch (e) { + debugPrint('[AppConfig] 保存配置失败: $e'); + } + } +} diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 2e1de87..be1ee3e 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -6,6 +6,7 @@ list(APPEND FLUTTER_PLUGIN_LIST ) list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni ) set(PLUGIN_BUNDLED_LIBRARIES) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 724bb2a..cccf817 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,8 +5,6 @@ import FlutterMacOS import Foundation -import shared_preferences_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 2d76677..a51913e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,14 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" async: dependency: transitive description: @@ -33,6 +41,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.2" + code_assets: + dependency: transitive + description: + name: code_assets + sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687" + url: "https://pub.dev" + source: hosted + version: "1.0.0" collection: dependency: transitive description: @@ -41,6 +57,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.19.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf + url: "https://pub.dev" + source: hosted + version: "3.0.7" cupertino_icons: dependency: "direct main" description: @@ -91,11 +115,22 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_web_plugins: + glob: dependency: transitive - description: flutter - source: sdk - version: "0.0.0" + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" + hooks: + dependency: transitive + description: + name: hooks + sha256: "025f060e86d2d4c3c47b56e33caf7f93bf9283340f26d23424ebcfccf34f621e" + url: "https://pub.dev" + source: hosted + version: "1.0.3" http: dependency: "direct main" description: @@ -112,6 +147,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.2" + jni: + dependency: transitive + description: + name: jni + sha256: c2230682d5bc2362c1c9e8d3c7f406d9cbba23ab3f2e203a025dd47e0fb2e68f + url: "https://pub.dev" + source: hosted + version: "1.0.0" + jni_flutter: + dependency: transitive + description: + name: jni_flutter + sha256: "8b59e590786050b1cd866677dddaf76b1ade5e7bc751abe04b86e84d379d3ba6" + url: "https://pub.dev" + source: hosted + version: "1.0.1" leak_tracker: dependency: transitive description: @@ -144,6 +195,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" matcher: dependency: transitive description: @@ -168,6 +227,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.17.0" + native_toolchain_c: + dependency: transitive + description: + name: native_toolchain_c + sha256: "6ba77bb18063eebe9de401f5e6437e95e1438af0a87a3a39084fbd37c90df572" + url: "https://pub.dev" + source: hosted + version: "0.17.6" + objective_c: + dependency: transitive + description: + name: objective_c + sha256: "100a1c87616ab6ed41ec263b083c0ef3261ee6cd1dc3b0f35f8ddfa4f996fe52" + url: "https://pub.dev" + source: hosted + version: "9.3.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" + source: hosted + version: "2.2.0" path: dependency: transitive description: @@ -176,6 +259,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "69cbd515a62b94d32a7944f086b2f82b4ac40a1d45bebfc00813a430ab2dabcd" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699" + url: "https://pub.dev" + source: hosted + version: "2.6.0" path_provider_linux: dependency: transitive description: @@ -216,62 +323,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5" - url: "https://pub.dev" - source: hosted - version: "2.5.3" - shared_preferences_android: + pub_semver: dependency: transitive description: - name: shared_preferences_android - sha256: bd14436108211b0d4ee5038689a56d4ae3620fd72fd6036e113bf1345bc74d9e + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" url: "https://pub.dev" source: hosted - version: "2.4.13" - shared_preferences_foundation: + version: "2.2.0" + record_use: dependency: transitive description: - name: shared_preferences_foundation - sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03" + name: record_use + sha256: "2551bd8eecfe95d14ae75f6021ad0248be5c27f138c2ec12fcb52b500b3ba1ed" url: "https://pub.dev" source: hosted - version: "2.5.4" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 - url: "https://pub.dev" - source: hosted - version: "2.4.3" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" - url: "https://pub.dev" - source: hosted - version: "2.4.1" + version: "0.6.0" sky_engine: dependency: transitive description: flutter @@ -365,6 +432,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" sdks: - dart: ">=3.9.0-0 <4.0.0" - flutter: ">=3.29.0" + dart: ">=3.10.3 <4.0.0" + flutter: ">=3.38.4" diff --git a/pubspec.yaml b/pubspec.yaml index 56399fb..5473a74 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -35,7 +35,7 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.8 http: ^1.2.0 - shared_preferences: ^2.2.0 + path_provider: ^2.1.1 dev_dependencies: flutter_test: diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index b93c4c3..3ad69c6 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -6,6 +6,7 @@ list(APPEND FLUTTER_PLUGIN_LIST ) list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni ) set(PLUGIN_BUNDLED_LIBRARIES)