diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 556855f..3487f14 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=file:///D:/Gradle/.gradle/wrapper/dists/gradle-7.5-all.zip \ No newline at end of file +distributionUrl=file:///C:/Users/24811/.gradle/wrapper/dists/gradle-7.5-all.zip \ No newline at end of file diff --git a/lib/pages/record_page.dart b/lib/pages/record_page.dart index 73580c4..52d239b 100644 --- a/lib/pages/record_page.dart +++ b/lib/pages/record_page.dart @@ -6,7 +6,7 @@ import 'package:uuid/uuid.dart'; class RecordPage extends StatefulWidget { final Record? record; - final Function(Record) onSave; // 添加保存回调 + final Function(Record) onSave; // 添加保存回调 const RecordPage({ Key? key, @@ -18,18 +18,19 @@ class RecordPage extends StatefulWidget { State createState() => _RecordPageState(); } -class _RecordPageState extends State with SingleTickerProviderStateMixin { +class _RecordPageState extends State + with SingleTickerProviderStateMixin { late TabController _tabController; String? _selectedCategoryId; String _note = ''; double _amount = 0.0; DateTime _selectedDate = DateTime.now(); final _uuid = const Uuid(); - String _inputBuffer = '0.0'; // 用于显示的字符串 - String? _pendingOperation; // 等待执行的运算符 - double? _pendingValue; // 等待计算的第一个值 - bool _isNewInput = true; // 是否开始新的输入 - + String _inputBuffer = '0.0'; // 用于显示的字符串 + String? _pendingOperation; // 等待执行的运算符 + String? _pendingValue; // 等待计算的第一个值 + String? _inputValue; // 当前输入的值 + @override void initState() { super.initState(); @@ -50,7 +51,6 @@ class _RecordPageState extends State with SingleTickerProviderStateM _selectedDate = widget.record!.createTime; // 设置输入缓冲区为当前金额的格式化字符串 _inputBuffer = _formatNumberForDisplay(widget.record!.amount); - _isNewInput = false; } else { // 新建模式:默认选中第一个分类 _selectedCategoryId = _currentCategories.first.id; @@ -66,11 +66,11 @@ class _RecordPageState extends State with SingleTickerProviderStateM } /// 获取当前记录类型 - RecordType get _currentType => + RecordType get _currentType => _tabController.index == 0 ? RecordType.expense : RecordType.income; /// 获取当前分类列表 - List get _currentCategories => + List get _currentCategories => _currentType == RecordType.expense ? expenseCategories : incomeCategories; /// 保存记录 @@ -103,8 +103,13 @@ class _RecordPageState extends State with SingleTickerProviderStateM /// 格式化显示金额 String get _displayAmount { - if (_pendingOperation != null && _pendingValue != null) { - return '$_pendingValue $_pendingOperation ${_isNewInput ? "" : _inputBuffer}'; + if (_pendingOperation != null || + _pendingValue != null || + _inputValue != null) { + _inputBuffer = + '${_pendingValue ?? ""} ${_pendingOperation ?? ""} ${_inputValue ?? ""}'; + } else { + _inputBuffer = '0.0'; } return _inputBuffer; } @@ -112,40 +117,25 @@ class _RecordPageState extends State with SingleTickerProviderStateM /// 处理数字输入 void _handleNumber(String digit) { setState(() { - if (_isNewInput) { - // 新输入时直接替换 - _inputBuffer = digit; - _isNewInput = false; - } else if (_inputBuffer == '0' && !_inputBuffer.contains('.')) { - // 当前是0且没有小数点时,直接替换0 - _inputBuffer = digit; - } else if (_inputBuffer == '0.0') { - // 如果是默认状态,直接替换为新数字 - _inputBuffer = digit; - _isNewInput = false; + if (_inputValue == '0' || _inputValue == null) { + // 当前是0 + _inputValue = digit; } else { // 其他情况追加数字 - _inputBuffer = _inputBuffer + digit; + _inputValue = _inputValue! + digit; } - _amount = double.parse(_inputBuffer); }); } /// 处理小数点 void _handleDecimal() { setState(() { - if (!_inputBuffer.contains('.')) { - // 如果是默认状态(0.0)或只有0,直接显示0. - if (_inputBuffer == '0.0' || _inputBuffer == '0') { - _inputBuffer = '0.'; - _isNewInput = false; - } else { - // 其他数字直接加小数点 - _inputBuffer = '$_inputBuffer.'; - } - } else { - // 已有小数点时震动反馈 + if (_inputValue == null || _inputValue == '0') { + _inputValue = '0.'; + } else if (_inputValue!.contains('.')) { HapticFeedback.heavyImpact(); + } else { + _inputValue = '$_inputValue.'; } }); } @@ -153,84 +143,74 @@ class _RecordPageState extends State with SingleTickerProviderStateM /// 处理删除 void _handleDelete() { setState(() { - if (_pendingOperation != null && !_isNewInput) { - // 删除第二个数字 - if (_inputBuffer.length > 1) { - _inputBuffer = _inputBuffer.substring(0, _inputBuffer.length - 1); - if (_inputBuffer.isEmpty || _inputBuffer == '0') { - _inputBuffer = '0.0'; - _isNewInput = true; - } - } else { - _inputBuffer = '0.0'; - _isNewInput = true; + if (_inputValue != null) { + if(_inputValue!.length > 1){ + _inputValue = _inputValue!.substring(0, _inputValue!.length - 1); + }else{ + _inputValue = null; } } else if (_pendingOperation != null) { - // 删除运算符 - _inputBuffer = _pendingValue.toString(); _pendingOperation = null; - _pendingValue = null; - _isNewInput = false; - } else { - // 删除普通数字 - if (_inputBuffer.length > 1) { - _inputBuffer = _inputBuffer.substring(0, _inputBuffer.length - 1); - if (_inputBuffer.isEmpty || _inputBuffer == '0') { - _inputBuffer = '0.0'; - } - } else { - _inputBuffer = '0.0'; + } else if (_pendingValue != null) { + if(_pendingValue!.length > 1){ + _pendingValue = _pendingValue!.substring(0, _pendingValue!.length - 1); + }else{ + _pendingValue = null; } + } else { + _pendingValue = null; } - _amount = double.parse(_inputBuffer); }); } /// 处理运算符 void _handleOperator(String operator) { // 如果有待处理的运算,先计算结果 - if (_pendingOperation != null && !_isNewInput) { + if (_pendingOperation != null) { // 先保存当前运算符,因为计算可能会重置状态 final newOperator = operator; _calculateResult(); - - // 如果计算导致重置(结果为0),不添加新的运算符 - if (_inputBuffer == '0.0') { - return; - } - + + // 计算完成后,设置新的运算符 setState(() { - _pendingOperation = newOperator; - _pendingValue = double.parse(_inputBuffer); - _isNewInput = true; + // 如果计算导致重置(结果为0),不添加新的运算符 + if (_inputBuffer == '0.0') { + return; + } else { + _pendingOperation = newOperator; + } }); - } else { + } else if(_inputValue != null) { // 正常设置运算符 setState(() { _pendingOperation = operator; - _pendingValue = double.parse(_inputBuffer); - _isNewInput = true; + _pendingValue = _inputValue!; + _inputValue = null; }); + } else { + HapticFeedback.heavyImpact(); } } /// 计算结果 void _calculateResult() { - if (_pendingOperation != null && _pendingValue != null && !_isNewInput) { - final currentValue = double.parse(_inputBuffer); + if (_pendingOperation != null && + _pendingValue != null && + _inputValue != null) { + final currentValue = double.parse(_inputValue!); double result; - + switch (_pendingOperation) { case '+': - result = _pendingValue! + currentValue; + result = double.parse(_pendingValue!) + currentValue; if (result == 0) { _resetToDefault(); return; } break; case '-': - result = _pendingValue! - currentValue; + result = double.parse(_pendingValue!) - currentValue; if (result <= 0) { _resetToDefault(); return; @@ -239,14 +219,13 @@ class _RecordPageState extends State with SingleTickerProviderStateM default: return; } - + setState(() { // 格式化结果,去掉不必要的小数位 - _inputBuffer = _formatNumberForDisplay(result); + _pendingValue = _formatNumberForDisplay(result); _amount = result; _pendingOperation = null; - _pendingValue = null; - _isNewInput = true; + _inputValue = null; }); } } @@ -258,7 +237,7 @@ class _RecordPageState extends State with SingleTickerProviderStateM _amount = 0; _pendingOperation = null; _pendingValue = null; - _isNewInput = true; + _inputValue = null; }); } @@ -373,7 +352,9 @@ class _RecordPageState extends State with SingleTickerProviderStateM onTap: () => setState(() => _selectedCategoryId = category.id), child: Container( decoration: BoxDecoration( - color: isSelected ? Theme.of(context).primaryColor.withOpacity(0.1) : null, + color: isSelected + ? Theme.of(context).primaryColor.withOpacity(0.1) + : null, border: Border.all( color: isSelected ? Theme.of(context).primaryColor : Colors.grey, ), @@ -390,7 +371,8 @@ class _RecordPageState extends State with SingleTickerProviderStateM Text( category.name, style: TextStyle( - color: isSelected ? Theme.of(context).primaryColor : Colors.grey, + color: + isSelected ? Theme.of(context).primaryColor : Colors.grey, ), ), ], @@ -530,4 +512,4 @@ class _RecordPageState extends State with SingleTickerProviderStateM _tabController.dispose(); super.dispose(); } -} \ No newline at end of file +} diff --git a/lib/pages/record_page_base.dart b/lib/pages/record_page_base.dart new file mode 100644 index 0000000..73580c4 --- /dev/null +++ b/lib/pages/record_page_base.dart @@ -0,0 +1,533 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import '../models/record.dart'; +import '../data/categories.dart'; +import 'package:uuid/uuid.dart'; + +class RecordPage extends StatefulWidget { + final Record? record; + final Function(Record) onSave; // 添加保存回调 + + const RecordPage({ + Key? key, + this.record, + required this.onSave, + }) : super(key: key); + + @override + State createState() => _RecordPageState(); +} + +class _RecordPageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + String? _selectedCategoryId; + String _note = ''; + double _amount = 0.0; + DateTime _selectedDate = DateTime.now(); + final _uuid = const Uuid(); + String _inputBuffer = '0.0'; // 用于显示的字符串 + String? _pendingOperation; // 等待执行的运算符 + double? _pendingValue; // 等待计算的第一个值 + bool _isNewInput = true; // 是否开始新的输入 + + @override + void initState() { + super.initState(); + // 先初始化 TabController + _tabController = TabController( + length: 2, + vsync: this, + initialIndex: widget.record?.type == RecordType.income ? 1 : 0, + ); + _tabController.addListener(_onTabChanged); + + // 初始化数据 + if (widget.record != null) { + // 编辑模式:初始化现有记录的数据 + _selectedCategoryId = widget.record!.categoryId; + _note = widget.record!.note ?? ''; + _amount = widget.record!.amount; + _selectedDate = widget.record!.createTime; + // 设置输入缓冲区为当前金额的格式化字符串 + _inputBuffer = _formatNumberForDisplay(widget.record!.amount); + _isNewInput = false; + } else { + // 新建模式:默认选中第一个分类 + _selectedCategoryId = _currentCategories.first.id; + } + } + + /// 标签切换监听 + void _onTabChanged() { + setState(() { + // 切换类型时选中新类型的第一个分类 + _selectedCategoryId = _currentCategories.first.id; + }); + } + + /// 获取当前记录类型 + RecordType get _currentType => + _tabController.index == 0 ? RecordType.expense : RecordType.income; + + /// 获取当前分类列表 + List get _currentCategories => + _currentType == RecordType.expense ? expenseCategories : incomeCategories; + + /// 保存记录 + void _saveRecord() { + if (_selectedCategoryId == null) { + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('请选择分类')), + ); + return; + } + if (_amount <= 0) { + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('请输入金额')), + ); + return; + } + + final record = Record( + id: widget.record?.id ?? _uuid.v4(), + type: _currentType, + categoryId: _selectedCategoryId!, + note: _note.isEmpty ? null : _note, + amount: _amount, + createTime: _selectedDate, + ); + + widget.onSave(record); + Navigator.of(context).pop(); + } + + /// 格式化显示金额 + String get _displayAmount { + if (_pendingOperation != null && _pendingValue != null) { + return '$_pendingValue $_pendingOperation ${_isNewInput ? "" : _inputBuffer}'; + } + return _inputBuffer; + } + + /// 处理数字输入 + void _handleNumber(String digit) { + setState(() { + if (_isNewInput) { + // 新输入时直接替换 + _inputBuffer = digit; + _isNewInput = false; + } else if (_inputBuffer == '0' && !_inputBuffer.contains('.')) { + // 当前是0且没有小数点时,直接替换0 + _inputBuffer = digit; + } else if (_inputBuffer == '0.0') { + // 如果是默认状态,直接替换为新数字 + _inputBuffer = digit; + _isNewInput = false; + } else { + // 其他情况追加数字 + _inputBuffer = _inputBuffer + digit; + } + _amount = double.parse(_inputBuffer); + }); + } + + /// 处理小数点 + void _handleDecimal() { + setState(() { + if (!_inputBuffer.contains('.')) { + // 如果是默认状态(0.0)或只有0,直接显示0. + if (_inputBuffer == '0.0' || _inputBuffer == '0') { + _inputBuffer = '0.'; + _isNewInput = false; + } else { + // 其他数字直接加小数点 + _inputBuffer = '$_inputBuffer.'; + } + } else { + // 已有小数点时震动反馈 + HapticFeedback.heavyImpact(); + } + }); + } + + /// 处理删除 + void _handleDelete() { + setState(() { + if (_pendingOperation != null && !_isNewInput) { + // 删除第二个数字 + if (_inputBuffer.length > 1) { + _inputBuffer = _inputBuffer.substring(0, _inputBuffer.length - 1); + if (_inputBuffer.isEmpty || _inputBuffer == '0') { + _inputBuffer = '0.0'; + _isNewInput = true; + } + } else { + _inputBuffer = '0.0'; + _isNewInput = true; + } + } else if (_pendingOperation != null) { + // 删除运算符 + _inputBuffer = _pendingValue.toString(); + _pendingOperation = null; + _pendingValue = null; + _isNewInput = false; + } else { + // 删除普通数字 + if (_inputBuffer.length > 1) { + _inputBuffer = _inputBuffer.substring(0, _inputBuffer.length - 1); + if (_inputBuffer.isEmpty || _inputBuffer == '0') { + _inputBuffer = '0.0'; + } + } else { + _inputBuffer = '0.0'; + } + } + _amount = double.parse(_inputBuffer); + }); + } + + /// 处理运算符 + void _handleOperator(String operator) { + // 如果有待处理的运算,先计算结果 + if (_pendingOperation != null && !_isNewInput) { + // 先保存当前运算符,因为计算可能会重置状态 + final newOperator = operator; + _calculateResult(); + + // 如果计算导致重置(结果为0),不添加新的运算符 + if (_inputBuffer == '0.0') { + return; + } + + // 计算完成后,设置新的运算符 + setState(() { + _pendingOperation = newOperator; + _pendingValue = double.parse(_inputBuffer); + _isNewInput = true; + }); + } else { + // 正常设置运算符 + setState(() { + _pendingOperation = operator; + _pendingValue = double.parse(_inputBuffer); + _isNewInput = true; + }); + } + } + + /// 计算结果 + void _calculateResult() { + if (_pendingOperation != null && _pendingValue != null && !_isNewInput) { + final currentValue = double.parse(_inputBuffer); + double result; + + switch (_pendingOperation) { + case '+': + result = _pendingValue! + currentValue; + if (result == 0) { + _resetToDefault(); + return; + } + break; + case '-': + result = _pendingValue! - currentValue; + if (result <= 0) { + _resetToDefault(); + return; + } + break; + default: + return; + } + + setState(() { + // 格式化结果,去掉不必要的小数位 + _inputBuffer = _formatNumberForDisplay(result); + _amount = result; + _pendingOperation = null; + _pendingValue = null; + _isNewInput = true; + }); + } + } + + /// 重置到默认状态 + void _resetToDefault() { + setState(() { + _inputBuffer = '0.0'; + _amount = 0; + _pendingOperation = null; + _pendingValue = null; + _isNewInput = true; + }); + } + + /// 格式化数字用于显示 + String _formatNumberForDisplay(double number) { + // 如果是整数,直接返回整数部分 + if (number % 1 == 0) { + return number.toInt().toString(); + } + // 如果是小数,去掉末尾的0 + String numStr = number.toString(); + while (numStr.endsWith('0')) { + numStr = numStr.substring(0, numStr.length - 1); + } + if (numStr.endsWith('.')) { + numStr = numStr.substring(0, numStr.length - 1); + } + return numStr; + } + + /// 修改键盘按钮处理逻辑 + void _onKeyboardButtonPressed(String value) { + switch (value) { + case '删除': + _handleDelete(); + break; + case '保存': + _calculateResult(); + _saveRecord(); + break; + case 'again': + // TODO: 实现again功能 + break; + case '+': + case '-': + _handleOperator(value); + break; + case '.': + _handleDecimal(); + break; + default: + _handleNumber(value); + } + } + + /// 格式化日期显示 + String _formatDate(DateTime date) { + final now = DateTime.now(); + final today = DateTime(now.year, now.month, now.day); + final dateToCheck = DateTime(date.year, date.month, date.day); + final difference = today.difference(dateToCheck).inDays; + + // 检查是否是今天、昨天、前天 + switch (difference) { + case 0: + return '今天'; + case 1: + return '昨天'; + case 2: + return '前天'; + default: + // 如果是当年 + if (date.year == now.year) { + return '${date.month}/${date.day}'; + } + // 不是当年 + return '${date.year}/${date.month}/${date.day}'; + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: TabBar( + controller: _tabController, + tabs: const [ + Tab(text: '支出'), + Tab(text: '收入'), + ], + ), + ), + body: Column( + children: [ + // 分类网格 + Expanded( + child: GridView.builder( + padding: const EdgeInsets.all(16), + gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 4, + mainAxisSpacing: 16, + crossAxisSpacing: 16, + ), + itemCount: _currentCategories.length, + itemBuilder: (context, index) { + final category = _currentCategories[index]; + final isSelected = category.id == _selectedCategoryId; + return _buildCategoryItem(category, isSelected); + }, + ), + ), + // 底部编辑区域 + _buildBottomEditor(), + ], + ), + ); + } + + /// 构建分类项 + Widget _buildCategoryItem(Category category, bool isSelected) { + return InkWell( + onTap: () => setState(() => _selectedCategoryId = category.id), + child: Container( + decoration: BoxDecoration( + color: isSelected ? Theme.of(context).primaryColor.withOpacity(0.1) : null, + border: Border.all( + color: isSelected ? Theme.of(context).primaryColor : Colors.grey, + ), + borderRadius: BorderRadius.circular(8), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + category.icon, + color: isSelected ? Theme.of(context).primaryColor : Colors.grey, + ), + const SizedBox(height: 4), + Text( + category.name, + style: TextStyle( + color: isSelected ? Theme.of(context).primaryColor : Colors.grey, + ), + ), + ], + ), + ), + ); + } + + /// 构建底部编辑区域 + Widget _buildBottomEditor() { + return Container( + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.1), + blurRadius: 8, + offset: const Offset(0, -2), + ), + ], + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + // 备注和金额 + _buildNoteAndAmount(), + // 配置按钮 + Row( + children: [ + TextButton.icon( + onPressed: () { + // TODO: 实现账户选择 + }, + icon: const Icon(Icons.account_balance_wallet), + label: const Text('默认账户'), + ), + TextButton.icon( + onPressed: () async { + final date = await showDatePicker( + context: context, + initialDate: _selectedDate, + firstDate: DateTime(2000), + lastDate: DateTime.now(), + ); + if (date != null) { + setState(() => _selectedDate = date); + } + }, + icon: const Icon(Icons.calendar_today), + label: Text(_formatDate(_selectedDate)), + ), + TextButton.icon( + onPressed: () { + // TODO: 实现图片选择 + }, + icon: const Icon(Icons.photo), + label: const Text('图片'), + ), + ], + ), + // 数字键盘 + _buildNumberKeyboard(), + ], + ), + ); + } + + /// 构建数字键盘 + Widget _buildNumberKeyboard() { + return GridView.count( + shrinkWrap: true, + crossAxisCount: 4, + childAspectRatio: 2, + children: [ + _buildKeyboardButton('7'), + _buildKeyboardButton('8'), + _buildKeyboardButton('9'), + _buildKeyboardButton('删除', isFunction: true), + _buildKeyboardButton('4'), + _buildKeyboardButton('5'), + _buildKeyboardButton('6'), + _buildKeyboardButton('+'), + _buildKeyboardButton('1'), + _buildKeyboardButton('2'), + _buildKeyboardButton('3'), + _buildKeyboardButton('-'), + _buildKeyboardButton('again'), + _buildKeyboardButton('0'), + _buildKeyboardButton('.'), + _buildKeyboardButton('保存', isFunction: true), + ], + ); + } + + /// 构建键盘按钮 + Widget _buildKeyboardButton(String text, {bool isFunction = false}) { + return TextButton( + onPressed: () => _onKeyboardButtonPressed(text), + child: Text( + text, + style: TextStyle( + fontSize: 20, + color: isFunction ? Theme.of(context).primaryColor : Colors.black, + ), + ), + ); + } + + /// 构建底部编辑区域中的备注和金额行 + Widget _buildNoteAndAmount() { + return Row( + children: [ + Expanded( + child: TextField( + controller: TextEditingController(text: _note), // 使用控制器设置初始值 + decoration: const InputDecoration( + hintText: '添加备注', + border: InputBorder.none, + ), + onChanged: (value) => setState(() => _note = value), + ), + ), + Text( + _displayAmount, + style: const TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + ), + ), + ], + ); + } + + @override + void dispose() { + _tabController.dispose(); + super.dispose(); + } +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 277f82c..8664d7a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -6,7 +6,7 @@ packages: description: name: async sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "2.11.0" boolean_selector: @@ -14,7 +14,7 @@ packages: description: name: boolean_selector sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "2.1.1" characters: @@ -22,7 +22,7 @@ packages: description: name: characters sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.3.0" clock: @@ -30,7 +30,7 @@ packages: description: name: clock sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.1.1" collection: @@ -38,7 +38,7 @@ packages: description: name: collection sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.18.0" crypto: @@ -46,7 +46,7 @@ packages: description: name: crypto sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "3.0.3" cupertino_icons: @@ -54,7 +54,7 @@ packages: description: name: cupertino_icons sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.0.8" device_info_plus: @@ -62,23 +62,23 @@ packages: description: name: device_info_plus sha256: "093b02a284b4969bb641a6236bbb8e626e4035c6ec9e30c20b65d505c24b3080" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "10.0.0" device_info_plus_platform_interface: dependency: transitive description: name: device_info_plus_platform_interface - sha256: "282d3cf731045a2feb66abfe61bbc40870ae50a3ed10a4d3d217556c35c8c2ba" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + sha256: "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2" + url: "https://pub.dev" source: hosted - version: "7.0.1" + version: "7.0.2" fake_async: dependency: transitive description: name: fake_async sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.3.1" ffi: @@ -86,7 +86,7 @@ packages: description: name: ffi sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "2.1.0" file: @@ -94,7 +94,7 @@ packages: description: name: file sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "7.0.1" fixnum: @@ -102,7 +102,7 @@ packages: description: name: fixnum sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.1.1" flutter: @@ -115,7 +115,7 @@ packages: description: name: flutter_lints sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "2.0.3" flutter_test: @@ -133,7 +133,7 @@ packages: description: name: lints sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "2.1.1" logging: @@ -141,7 +141,7 @@ packages: description: name: logging sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.2.0" matcher: @@ -149,7 +149,7 @@ packages: description: name: matcher sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "0.12.16" material_color_utilities: @@ -157,7 +157,7 @@ packages: description: name: material_color_utilities sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "0.5.0" meta: @@ -165,7 +165,7 @@ packages: description: name: meta sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.10.0" path: @@ -173,7 +173,7 @@ packages: description: name: path sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.8.3" plugin_platform_interface: @@ -181,7 +181,7 @@ packages: description: name: plugin_platform_interface sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "2.1.8" sensors_plus: @@ -189,7 +189,7 @@ packages: description: name: sensors_plus sha256: "362c8f4f001838b90dd5206b898bbad941bc0142479eab9a3415f0f79e622908" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.4.1" sensors_plus_platform_interface: @@ -197,7 +197,7 @@ packages: description: name: sensors_plus_platform_interface sha256: bc472d6cfd622acb4f020e726433ee31788b038056691ba433fec80e448a094f - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.2.0" sensors_plus_web: @@ -205,7 +205,7 @@ packages: description: name: sensors_plus_web sha256: fca8d7d9ab6233b2a059952666415508e252420be1ef54f092d07884da53ec5e - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.1.2" sky_engine: @@ -218,7 +218,7 @@ packages: description: name: source_span sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.10.0" sprintf: @@ -226,7 +226,7 @@ packages: description: name: sprintf sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "7.0.0" sqflite: @@ -234,7 +234,7 @@ packages: description: name: sqflite sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "2.3.2" sqflite_common: @@ -242,7 +242,7 @@ packages: description: name: sqflite_common sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "2.5.3" stack_trace: @@ -250,7 +250,7 @@ packages: description: name: stack_trace sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.11.1" stream_channel: @@ -258,7 +258,7 @@ packages: description: name: stream_channel sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "2.1.2" string_scanner: @@ -266,7 +266,7 @@ packages: description: name: string_scanner sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.2.0" synchronized: @@ -274,7 +274,7 @@ packages: description: name: synchronized sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "3.1.0+1" term_glyph: @@ -282,7 +282,7 @@ packages: description: name: term_glyph sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: @@ -290,7 +290,7 @@ packages: description: name: test_api sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "0.6.1" typed_data: @@ -298,7 +298,7 @@ packages: description: name: typed_data sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.3.2" uuid: @@ -306,7 +306,7 @@ packages: description: name: uuid sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "4.5.1" vector_math: @@ -314,7 +314,7 @@ packages: description: name: vector_math sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "2.1.4" vibration: @@ -322,7 +322,7 @@ packages: description: name: vibration sha256: "06588a845a4ebc73ab7ff7da555c2b3dbcd9676164b5856a38bf0b2287f1045d" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.9.0" vibration_platform_interface: @@ -330,7 +330,7 @@ packages: description: name: vibration_platform_interface sha256: f66b39aab2447038978c16f3d6f77228e49ef5717556e3da02313e044e4a7600 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "0.0.2" web: @@ -338,7 +338,7 @@ packages: description: name: web sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "0.3.0" win32: @@ -346,7 +346,7 @@ packages: description: name: win32 sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "5.2.0" win32_registry: @@ -354,7 +354,7 @@ packages: description: name: win32_registry sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.dev" source: hosted version: "1.1.2" sdks: