From a010670dad048962d2493991d1887355d564e44d Mon Sep 17 00:00:00 2001 From: luzixun <869322496@qq.com> Date: Mon, 1 Apr 2024 14:59:20 +0800 Subject: [PATCH] feat: 1 --- lib/config.dart | 8 +- lib/screens/inventory/inventory.dart | 3 +- lib/screens/landing/landing.dart | 25 +- .../components/inventory_search.dart | 329 ++++---- .../new_inventory_inout.dart | 8 +- .../components/data_sources.dart | 692 ---------------- .../sale_quotation/components/data_table.dart | 754 ------------------ .../sale_quotation/components/helper.dart | 176 ---- .../sale_quotation/components/nav_helper.dart | 71 -- .../sale_quotation/sale_quotation.dart | 104 +-- lib/widgets/sk_appbar.dart | 6 +- pubspec.lock | 366 +++++---- pubspec.yaml | 1 - 13 files changed, 442 insertions(+), 2101 deletions(-) delete mode 100644 lib/screens/sale_quotation/components/data_sources.dart delete mode 100644 lib/screens/sale_quotation/components/data_table.dart delete mode 100644 lib/screens/sale_quotation/components/helper.dart delete mode 100644 lib/screens/sale_quotation/components/nav_helper.dart diff --git a/lib/config.dart b/lib/config.dart index 64a31e5..02b0257 100644 --- a/lib/config.dart +++ b/lib/config.dart @@ -5,10 +5,10 @@ class GloablConfig { // static const BASE_URL = "http://10.0.2.2:8001/api/"; // static const OSS_URL = "http://10.0.2.2:8001"; - // static const BASE_URL = "http://144.123.43.138:3001/api/"; - // static const OSS_URL = "http://144.123.43.138:3001"; - static const BASE_URL = "http://192.168.60.220:8001/api/"; - static const OSS_URL = "http://192.168.60.220:8001"; + static const BASE_URL = "http://144.123.43.138:3001/api/"; + static const OSS_URL = "http://144.123.43.138:3001"; + // static const BASE_URL = "http://192.168.60.220:8001/api/"; + // static const OSS_URL = "http://192.168.60.220:8001"; static const DOMAIN_NAME = "山矿通"; static const DEBUG = true; static const PRIVACY_POLICY = 'http://h5.heeru.xyz/privacyPolicy.html'; diff --git a/lib/screens/inventory/inventory.dart b/lib/screens/inventory/inventory.dart index 1ffa79c..a8d8e35 100644 --- a/lib/screens/inventory/inventory.dart +++ b/lib/screens/inventory/inventory.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:sk_base_mobile/screens/new_inventory_inout/components/inventory_search.dart'; +import 'package:sk_base_mobile/widgets/sk_appbar.dart'; class InventoryPage extends StatelessWidget { const InventoryPage({super.key}); @@ -7,7 +8,7 @@ class InventoryPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: const Text('库存管理')), + appBar: const SkAppbar(title: '库存管理'), body: InventorySearch(), ); } diff --git a/lib/screens/landing/landing.dart b/lib/screens/landing/landing.dart index 3c34c65..b0f85c1 100644 --- a/lib/screens/landing/landing.dart +++ b/lib/screens/landing/landing.dart @@ -16,20 +16,19 @@ class LandingPage extends StatelessWidget { return Material( child: Stack(children: [ const BackColors(), - Scaffold( - floatingActionButtonLocation: - FloatingActionButtonLocation.centerDocked, - // floatingActionButton: [0].indexWhere( - // (item) => item == controller.currentIndex.value) > - // -1 - // ? FloatingCreateButton() - // : null, - floatingActionButton: FloatingCreateButton(), - bottomNavigationBar: BottomNavBar(), - backgroundColor: Colors.transparent, - body: Obx(() => controller.pages[controller.currentIndex.value]), - ) + Obx(() => Scaffold( + floatingActionButtonLocation: + FloatingActionButtonLocation.centerDocked, + floatingActionButton: buildBody(), + bottomNavigationBar: BottomNavBar(), + backgroundColor: Colors.transparent, + body: Obx(() => controller.pages[controller.currentIndex.value]), + )) ]), ); } + + Widget? buildBody() { + return controller.currentIndex.value == 0 ? FloatingCreateButton() : null; + } } diff --git a/lib/screens/new_inventory_inout/components/inventory_search.dart b/lib/screens/new_inventory_inout/components/inventory_search.dart index 5660192..3f7f401 100644 --- a/lib/screens/new_inventory_inout/components/inventory_search.dart +++ b/lib/screens/new_inventory_inout/components/inventory_search.dart @@ -192,178 +192,180 @@ class InventorySearch extends StatelessWidget { // 库存列表 Widget buildInventoryList() { final textStyle = TextStyle(fontSize: ScreenAdaper.height(25)); - return Obx(() => SmartRefresher( - enablePullDown: true, - enablePullUp: true, - controller: controller.refreshController, - onLoading: controller.onLoading, - onRefresh: controller.onRefresh, - child: controller.refreshController.isLoading - ? const SizedBox() - : controller.inventories.isEmpty - ? const Center( - child: Empty(text: '暂无库存'), - ) - : !ScreenAdaper.isLandspace() - ? buildPortraitList() - : Table(columnWidths: { - 0: const MinColumnWidth( - FixedColumnWidth(80), FixedColumnWidth(80)), - 1: MinColumnWidth( - FixedColumnWidth( - ScreenAdaper.screenShortDistance() / 5), - FixedColumnWidth( - ScreenAdaper.screenShortDistance() / 5)), - 2: FlexColumnWidth( - ScreenAdaper.screenShortDistance() / 4), - 3: FlexColumnWidth( - ScreenAdaper.screenShortDistance() / 4), - 4: MinColumnWidth( - FixedColumnWidth( - ScreenAdaper.screenShortDistance() / 5), - FixedColumnWidth( - ScreenAdaper.screenShortDistance() / 5)), - 5: MinColumnWidth( - FixedColumnWidth( - ScreenAdaper.screenShortDistance() / 6), - FixedColumnWidth( - ScreenAdaper.screenShortDistance() / 6)), - }, children: [ - // table header - TableRow( - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide( - color: AppTheme.dividerColor))), - children: [ - TableCell( - verticalAlignment: - TableCellVerticalAlignment.middle, - child: Container( - alignment: Alignment.centerLeft, - height: ScreenAdaper.height(60), + return Obx(() => SafeArea( + child: SmartRefresher( + enablePullDown: true, + enablePullUp: true, + controller: controller.refreshController, + onLoading: controller.onLoading, + onRefresh: controller.onRefresh, + child: controller.refreshController.isLoading + ? const SizedBox() + : controller.inventories.isEmpty + ? const Center( + child: Empty(text: '暂无库存'), + ) + : !ScreenAdaper.isLandspace() + ? buildPortraitList() + : Table(columnWidths: { + 0: const MinColumnWidth( + FixedColumnWidth(80), FixedColumnWidth(80)), + 1: MinColumnWidth( + FixedColumnWidth( + ScreenAdaper.screenShortDistance() / 5), + FixedColumnWidth( + ScreenAdaper.screenShortDistance() / 5)), + 2: FlexColumnWidth( + ScreenAdaper.screenShortDistance() / 4), + 3: FlexColumnWidth( + ScreenAdaper.screenShortDistance() / 4), + 4: MinColumnWidth( + FixedColumnWidth( + ScreenAdaper.screenShortDistance() / 5), + FixedColumnWidth( + ScreenAdaper.screenShortDistance() / 5)), + 5: MinColumnWidth( + FixedColumnWidth( + ScreenAdaper.screenShortDistance() / 6), + FixedColumnWidth( + ScreenAdaper.screenShortDistance() / 6)), + }, children: [ + // table header + TableRow( + decoration: const BoxDecoration( + border: Border( + bottom: BorderSide( + color: AppTheme.dividerColor))), + children: [ + TableCell( + verticalAlignment: + TableCellVerticalAlignment.middle, + child: Container( + alignment: Alignment.centerLeft, + height: ScreenAdaper.height(60), + child: Text( + '库存编号', + style: listTitleTextStyle, + ), + )), + TableCell( + verticalAlignment: + TableCellVerticalAlignment.middle, + child: Text( + '所属项目', + style: listTitleTextStyle, + )), + TableCell( + verticalAlignment: + TableCellVerticalAlignment.middle, + child: Text( + '产品名称', + style: listTitleTextStyle, + )), + TableCell( + verticalAlignment: + TableCellVerticalAlignment.middle, child: Text( - '库存编号', + '规格', style: listTitleTextStyle, ), - )), - TableCell( - verticalAlignment: - TableCellVerticalAlignment.middle, - child: Text( - '所属项目', - style: listTitleTextStyle, - )), - TableCell( - verticalAlignment: - TableCellVerticalAlignment.middle, - child: Text( - '产品名称', - style: listTitleTextStyle, - )), - TableCell( - verticalAlignment: - TableCellVerticalAlignment.middle, - child: Text( - '规格', - style: listTitleTextStyle, - ), - ), - TableCell( - verticalAlignment: - TableCellVerticalAlignment.middle, - child: Text( - '单价', - style: listTitleTextStyle, - ), - ), - TableCell( - verticalAlignment: - TableCellVerticalAlignment.middle, - child: Text( - '数量', - textAlign: TextAlign.right, - style: listTitleTextStyle, - ), - ), - ]), - ...controller.inventories.map((itemData) { - return TableRow( - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide( - color: AppTheme.dividerColor))), - children: [ - buildTableCell( - Text( - itemData.inventoryNumber!, - style: textStyle, + ), + TableCell( + verticalAlignment: + TableCellVerticalAlignment.middle, + child: Text( + '单价', + style: listTitleTextStyle, ), - itemData: itemData), - - // 入库时所属项目 - buildTableCell( - Column( - mainAxisAlignment: - MainAxisAlignment.center, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ + ), + TableCell( + verticalAlignment: + TableCellVerticalAlignment.middle, + child: Text( + '数量', + textAlign: TextAlign.right, + style: listTitleTextStyle, + ), + ), + ]), + ...controller.inventories.map((itemData) { + return TableRow( + decoration: const BoxDecoration( + border: Border( + bottom: BorderSide( + color: AppTheme.dividerColor))), + children: [ + buildTableCell( Text( - '${itemData.project?.name}', + itemData.inventoryNumber!, style: textStyle, ), - ], - ), - itemData: itemData), - // 产品 - buildTableCell( - Column( - mainAxisAlignment: - MainAxisAlignment.center, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ + itemData: itemData), + + // 入库时所属项目 + buildTableCell( + Column( + mainAxisAlignment: + MainAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + '${itemData.project?.name}', + style: textStyle, + ), + ], + ), + itemData: itemData), + // 产品 + buildTableCell( + Column( + mainAxisAlignment: + MainAxisAlignment.center, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + '${itemData.product?.name}', + style: textStyle, + ), + Text( + '${itemData.product?.company?.name}', + style: TextStyle( + fontSize: + ScreenAdaper.height(15), + color: AppTheme.grey), + ) + ], + ), + itemData: itemData), + // 规格 + buildTableCell( Text( - '${itemData.product?.name}', + itemData.product + ?.productSpecification ?? + '', + style: textStyle), + itemData: itemData), + // 单价 + buildTableCell( + Text( + '¥${double.parse('${itemData.unitPrice}')}', style: textStyle, ), - Text( - '${itemData.product?.company?.name}', - style: TextStyle( - fontSize: ScreenAdaper.height(15), - color: AppTheme.grey), - ) - ], - ), - itemData: itemData), - // 规格 - buildTableCell( - Text( - itemData.product - ?.productSpecification ?? - '', - style: textStyle), - itemData: itemData), - // 单价 - buildTableCell( - Text( - '¥${double.parse('${itemData.unitPrice}')}', - style: textStyle, - ), - itemData: itemData), + itemData: itemData), - // 库存数量 - buildTableCell( - Text( - '${itemData.quantity}${itemData.product?.unit?.label ?? ''}', - textAlign: TextAlign.right, - style: textStyle), - itemData: itemData, - alignment: Alignment.centerRight), - ]); - }) - ]))); + // 库存数量 + buildTableCell( + Text( + '${itemData.quantity}${itemData.product?.unit?.label ?? ''}', + textAlign: TextAlign.right, + style: textStyle), + itemData: itemData, + alignment: Alignment.centerRight), + ]); + }) + ])))); } Widget buildTableCell(Widget child, @@ -421,6 +423,11 @@ class InventorySearch extends StatelessWidget { style: TextStyle( fontSize: ScreenAdaper.sp(30), color: AppTheme.grey), ), + Text( + '${itemData.project?.name}', + style: TextStyle( + fontSize: ScreenAdaper.sp(30), color: AppTheme.grey), + ), Text('¥${double.parse('${itemData.unitPrice}')}', style: TextStyle( fontSize: ScreenAdaper.sp(30), color: AppTheme.grey)) diff --git a/lib/screens/new_inventory_inout/new_inventory_inout.dart b/lib/screens/new_inventory_inout/new_inventory_inout.dart index 2bc3a80..a57f86b 100644 --- a/lib/screens/new_inventory_inout/new_inventory_inout.dart +++ b/lib/screens/new_inventory_inout/new_inventory_inout.dart @@ -19,6 +19,7 @@ import 'package:sk_base_mobile/widgets/core/sk_date_picker.dart'; import 'package:sk_base_mobile/widgets/core/sk_text_input.dart'; import 'package:sk_base_mobile/widgets/gradient_button.dart'; import 'package:sk_base_mobile/screens/new_inventory_inout/new_inventory_inout_controller.dart'; +import 'package:sk_base_mobile/widgets/sk_appbar.dart'; class NewInventoryInout extends StatelessWidget { final NewInventoryInoutController controller; @@ -32,11 +33,8 @@ class NewInventoryInout extends StatelessWidget { return SafeArea( top: false, // 设置为false以避免保留顶部状态栏的空间 child: Scaffold( - appBar: AppBar( - title: Text( - inOrOut == InventoryInOrOutEnum.In ? '入库登记' : '出库登记', - style: TextStyle(fontSize: ScreenAdaper.height(35)), - ), + appBar: SkAppbar( + title: inOrOut == InventoryInOrOutEnum.In ? '入库登记' : '出库登记', ), resizeToAvoidBottomInset: true, body: SingleChildScrollView( diff --git a/lib/screens/sale_quotation/components/data_sources.dart b/lib/screens/sale_quotation/components/data_sources.dart deleted file mode 100644 index ab529c2..0000000 --- a/lib/screens/sale_quotation/components/data_sources.dart +++ /dev/null @@ -1,692 +0,0 @@ -// ignore_for_file: avoid_print - -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; -import 'package:data_table_2/data_table_2.dart'; - -// Copyright 2019 The Flutter team. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// The file was extracted from GitHub: https://github.com/flutter/gallery -// Changes and modifications by Maxim Saplin, 2021 - -/// Keeps track of selected rows, feed the data into DesertsDataSource -class RestorableDessertSelections extends RestorableProperty> { - Set _dessertSelections = {}; - - /// Returns whether or not a dessert row is selected by index. - bool isSelected(int index) => _dessertSelections.contains(index); - - /// Takes a list of [Dessert]s and saves the row indices of selected rows - /// into a [Set]. - void setDessertSelections(List desserts) { - final updatedSet = {}; - for (var i = 0; i < desserts.length; i += 1) { - var dessert = desserts[i]; - if (dessert.selected) { - updatedSet.add(i); - } - } - _dessertSelections = updatedSet; - notifyListeners(); - } - - @override - Set createDefaultValue() => _dessertSelections; - - @override - Set fromPrimitives(Object? data) { - final selectedItemIndices = data as List; - _dessertSelections = { - ...selectedItemIndices.map((dynamic id) => id as int), - }; - return _dessertSelections; - } - - @override - void initWithValue(Set value) { - _dessertSelections = value; - } - - @override - Object toPrimitives() => _dessertSelections.toList(); -} - -int _idCounter = 0; - -/// Domain model entity -class Dessert { - Dessert( - this.name, - this.calories, - this.fat, - this.carbs, - this.protein, - this.sodium, - this.calcium, - this.iron, - ); - - final int id = _idCounter++; - - final String name; - final int calories; - final double fat; - final int carbs; - final double protein; - final int sodium; - final int calcium; - final int iron; - bool selected = false; -} - -/// Data source implementing standard Flutter's DataTableSource abstract class -/// which is part of DataTable and PaginatedDataTable synchronous data fecthin API. -/// This class uses static collection of deserts as a data store, projects it into -/// DataRows, keeps track of selected items, provides sprting capability -class DessertDataSource extends DataTableSource { - DessertDataSource.empty(this.context) { - desserts = []; - } - - DessertDataSource(this.context, - [sortedByCalories = false, - this.hasRowTaps = false, - this.hasRowHeightOverrides = false, - this.hasZebraStripes = false]) { - desserts = _desserts; - if (sortedByCalories) { - sort((d) => d.calories, true); - } - } - - final BuildContext context; - late List desserts; - // Add row tap handlers and show snackbar - bool hasRowTaps = false; - // Override height values for certain rows - bool hasRowHeightOverrides = false; - // Color each Row by index's parity - bool hasZebraStripes = false; - - void sort(Comparable Function(Dessert d) getField, bool ascending) { - desserts.sort((a, b) { - final aValue = getField(a); - final bValue = getField(b); - return ascending - ? Comparable.compare(aValue, bValue) - : Comparable.compare(bValue, aValue); - }); - notifyListeners(); - } - - void updateSelectedDesserts(RestorableDessertSelections selectedRows) { - _selectedCount = 0; - for (var i = 0; i < desserts.length; i += 1) { - var dessert = desserts[i]; - if (selectedRows.isSelected(i)) { - dessert.selected = true; - _selectedCount += 1; - } else { - dessert.selected = false; - } - } - notifyListeners(); - } - - @override - DataRow2 getRow(int index, [Color? color]) { - final format = NumberFormat.decimalPercentPattern( - locale: 'en', - decimalDigits: 0, - ); - assert(index >= 0); - if (index >= desserts.length) throw 'index > _desserts.length'; - final dessert = desserts[index]; - return DataRow2.byIndex( - index: index, - selected: dessert.selected, - color: color != null - ? MaterialStateProperty.all(color) - : (hasZebraStripes && index.isEven - ? MaterialStateProperty.all(Theme.of(context).highlightColor) - : null), - onSelectChanged: (value) { - if (dessert.selected != value) { - _selectedCount += value! ? 1 : -1; - assert(_selectedCount >= 0); - dessert.selected = value; - notifyListeners(); - } - }, - onTap: hasRowTaps - ? () => _showSnackbar(context, 'Tapped on row ${dessert.name}') - : null, - onDoubleTap: hasRowTaps - ? () => _showSnackbar(context, 'Double Tapped on row ${dessert.name}') - : null, - onLongPress: hasRowTaps - ? () => _showSnackbar(context, 'Long pressed on row ${dessert.name}') - : null, - onSecondaryTap: hasRowTaps - ? () => _showSnackbar(context, 'Right clicked on row ${dessert.name}') - : null, - onSecondaryTapDown: hasRowTaps - ? (d) => - _showSnackbar(context, 'Right button down on row ${dessert.name}') - : null, - specificRowHeight: - hasRowHeightOverrides && dessert.fat >= 25 ? 100 : null, - cells: [ - DataCell(Text(dessert.name)), - DataCell(Text('${dessert.calories}'), - onTap: () => _showSnackbar(context, - 'Tapped on a cell with "${dessert.calories}"', Colors.red)), - DataCell(Text(dessert.fat.toStringAsFixed(1))), - DataCell(Text('${dessert.carbs}')), - DataCell(Text(dessert.protein.toStringAsFixed(1))), - DataCell(Text('${dessert.sodium}')), - DataCell(Text(format.format(dessert.calcium / 100))), - DataCell(Text(format.format(dessert.iron / 100))), - ], - ); - } - - @override - int get rowCount => desserts.length; - - @override - bool get isRowCountApproximate => false; - - @override - int get selectedRowCount => _selectedCount; - - void selectAll(bool? checked) { - for (final dessert in desserts) { - dessert.selected = checked ?? false; - } - _selectedCount = (checked ?? false) ? desserts.length : 0; - notifyListeners(); - } -} - -/// Async datasource for AsynPaginatedDataTabke2 example. Based on AsyncDataTableSource which -/// is an extension to Flutter's DataTableSource and aimed at solving -/// saync data fetching scenarious by paginated table (such as using Web API) -class DessertDataSourceAsync extends AsyncDataTableSource { - DessertDataSourceAsync() { - print('DessertDataSourceAsync created'); - } - - DessertDataSourceAsync.empty() { - _empty = true; - print('DessertDataSourceAsync.empty created'); - } - - DessertDataSourceAsync.error() { - _errorCounter = 0; - print('DessertDataSourceAsync.error created'); - } - - bool _empty = false; - int? _errorCounter; - - RangeValues? _caloriesFilter; - - RangeValues? get caloriesFilter => _caloriesFilter; - set caloriesFilter(RangeValues? calories) { - _caloriesFilter = calories; - refreshDatasource(); - } - - final DesertsFakeWebService _repo = DesertsFakeWebService(); - - String _sortColumn = "name"; - bool _sortAscending = true; - - void sort(String columnName, bool ascending) { - _sortColumn = columnName; - _sortAscending = ascending; - refreshDatasource(); - } - - Future getTotalRecords() { - return Future.delayed( - const Duration(milliseconds: 0), () => _empty ? 0 : _dessertsX3.length); - } - - @override - Future getRows(int startIndex, int count) async { - print('getRows($startIndex, $count)'); - if (_errorCounter != null) { - _errorCounter = _errorCounter! + 1; - - if (_errorCounter! % 2 == 1) { - await Future.delayed(const Duration(milliseconds: 1000)); - throw 'Error #${((_errorCounter! - 1) / 2).round() + 1} has occured'; - } - } - - final format = NumberFormat.decimalPercentPattern( - locale: 'en', - decimalDigits: 0, - ); - assert(startIndex >= 0); - - // List returned will be empty is there're fewer items than startingAt - var x = _empty - ? await Future.delayed(const Duration(milliseconds: 2000), - () => DesertsFakeWebServiceResponse(0, [])) - : await _repo.getData( - startIndex, count, _caloriesFilter, _sortColumn, _sortAscending); - - var r = AsyncRowsResponse( - x.totalRecords, - x.data.map((dessert) { - return DataRow( - key: ValueKey(dessert.id), - //selected: dessert.selected, - onSelectChanged: (value) { - if (value != null) { - setRowSelection(ValueKey(dessert.id), value); - } - }, - cells: [ - DataCell(Text(dessert.name)), - DataCell(Text('${dessert.calories}')), - DataCell(Text(dessert.fat.toStringAsFixed(1))), - DataCell(Text('${dessert.carbs}')), - DataCell(Text(dessert.protein.toStringAsFixed(1))), - DataCell(Text('${dessert.sodium}')), - DataCell(Text(format.format(dessert.calcium / 100))), - DataCell(Text(format.format(dessert.iron / 100))), - ], - ); - }).toList()); - - return r; - } -} - -class DesertsFakeWebServiceResponse { - DesertsFakeWebServiceResponse(this.totalRecords, this.data); - - /// THe total ammount of records on the server, e.g. 100 - final int totalRecords; - - /// One page, e.g. 10 reocrds - final List data; -} - -class DesertsFakeWebService { - int Function(Dessert, Dessert)? _getComparisonFunction( - String column, bool ascending) { - var coef = ascending ? 1 : -1; - switch (column) { - case 'name': - return (Dessert d1, Dessert d2) => coef * d1.name.compareTo(d2.name); - case 'calories': - return (Dessert d1, Dessert d2) => coef * (d1.calories - d2.calories); - case 'fat': - return (Dessert d1, Dessert d2) => coef * (d1.fat - d2.fat).round(); - case 'carbs': - return (Dessert d1, Dessert d2) => coef * (d1.carbs - d2.carbs); - case 'protein': - return (Dessert d1, Dessert d2) => - coef * (d1.protein - d2.protein).round(); - case 'sodium': - return (Dessert d1, Dessert d2) => coef * (d1.sodium - d2.sodium); - case 'calcium': - return (Dessert d1, Dessert d2) => coef * (d1.calcium - d2.calcium); - case 'iron': - return (Dessert d1, Dessert d2) => coef * (d1.iron - d2.iron); - } - - return null; - } - - Future getData(int startingAt, int count, - RangeValues? caloriesFilter, String sortedBy, bool sortedAsc) async { - return Future.delayed( - Duration( - milliseconds: startingAt == 0 - ? 2650 - : startingAt < 20 - ? 2000 - : 400), () { - var result = _dessertsX3; - - if (caloriesFilter != null) { - result = result - .where((e) => - e.calories >= caloriesFilter.start && - e.calories <= caloriesFilter.end) - .toList(); - } - - result.sort(_getComparisonFunction(sortedBy, sortedAsc)); - return DesertsFakeWebServiceResponse( - result.length, result.skip(startingAt).take(count).toList()); - }); - } -} - -int _selectedCount = 0; - -List _desserts = [ - Dessert( - 'Frozen Yogurt', - 159, - 6.0, - 24, - 4.0, - 87, - 14, - 1, - ), - Dessert( - 'Ice Cream Sandwich', - 237, - 9.0, - 37, - 4.3, - 129, - 8, - 1, - ), - Dessert( - 'Eclair', - 262, - 16.0, - 24, - 6.0, - 337, - 6, - 7, - ), - Dessert( - 'Cupcake', - 305, - 3.7, - 67, - 4.3, - 413, - 3, - 8, - ), - Dessert( - 'Gingerbread', - 356, - 16.0, - 49, - 3.9, - 327, - 7, - 16, - ), - Dessert( - 'Jelly Bean', - 375, - 0.0, - 94, - 0.0, - 50, - 0, - 0, - ), - Dessert( - 'Lollipop', - 392, - 0.2, - 98, - 0.0, - 38, - 0, - 2, - ), - Dessert( - 'Honeycomb', - 408, - 3.2, - 87, - 6.5, - 562, - 0, - 45, - ), - Dessert( - 'Donut', - 452, - 25.0, - 51, - 4.9, - 326, - 2, - 22, - ), - Dessert( - 'Apple Pie', - 518, - 26.0, - 65, - 7.0, - 54, - 12, - 6, - ), - Dessert( - 'Frozen Yougurt with sugar', - 168, - 6.0, - 26, - 4.0, - 87, - 14, - 1, - ), - Dessert( - 'Ice Cream Sandwich with sugar', - 246, - 9.0, - 39, - 4.3, - 129, - 8, - 1, - ), - Dessert( - 'Eclair with sugar', - 271, - 16.0, - 26, - 6.0, - 337, - 6, - 7, - ), - Dessert( - 'Cupcake with sugar', - 314, - 3.7, - 69, - 4.3, - 413, - 3, - 8, - ), - Dessert( - 'Gingerbread with sugar', - 345, - 16.0, - 51, - 3.9, - 327, - 7, - 16, - ), - Dessert( - 'Jelly Bean with sugar', - 364, - 0.0, - 96, - 0.0, - 50, - 0, - 0, - ), - Dessert( - 'Lollipop with sugar', - 401, - 0.2, - 100, - 0.0, - 38, - 0, - 2, - ), - Dessert( - 'Honeycomd with sugar', - 417, - 3.2, - 89, - 6.5, - 562, - 0, - 45, - ), - Dessert( - 'Donut with sugar', - 461, - 25.0, - 53, - 4.9, - 326, - 2, - 22, - ), - Dessert( - 'Apple pie with sugar', - 527, - 26.0, - 67, - 7.0, - 54, - 12, - 6, - ), - Dessert( - 'Forzen yougurt with honey', - 223, - 6.0, - 36, - 4.0, - 87, - 14, - 1, - ), - Dessert( - 'Ice Cream Sandwich with honey', - 301, - 9.0, - 49, - 4.3, - 129, - 8, - 1, - ), - Dessert( - 'Eclair with honey', - 326, - 16.0, - 36, - 6.0, - 337, - 6, - 7, - ), - Dessert( - 'Cupcake with honey', - 369, - 3.7, - 79, - 4.3, - 413, - 3, - 8, - ), - Dessert( - 'Gignerbread with hone', - 420, - 16.0, - 61, - 3.9, - 327, - 7, - 16, - ), - Dessert( - 'Jelly Bean with honey', - 439, - 0.0, - 106, - 0.0, - 50, - 0, - 0, - ), - Dessert( - 'Lollipop with honey', - 456, - 0.2, - 110, - 0.0, - 38, - 0, - 2, - ), - Dessert( - 'Honeycomd with honey', - 472, - 3.2, - 99, - 6.5, - 562, - 0, - 45, - ), - Dessert( - 'Donut with honey', - 516, - 25.0, - 63, - 4.9, - 326, - 2, - 22, - ), - Dessert( - 'Apple pie with honey', - 582, - 26.0, - 77, - 7.0, - 54, - 12, - 6, - ), -]; - -List _dessertsX3 = _desserts.toList() - ..addAll(_desserts.map((i) => Dessert('${i.name} x2', i.calories, i.fat, - i.carbs, i.protein, i.sodium, i.calcium, i.iron))) - ..addAll(_desserts.map((i) => Dessert('${i.name} x3', i.calories, i.fat, - i.carbs, i.protein, i.sodium, i.calcium, i.iron))); - -_showSnackbar(BuildContext context, String text, [Color? color]) { - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - backgroundColor: color, - duration: const Duration(seconds: 1), - content: Text(text), - )); -} diff --git a/lib/screens/sale_quotation/components/data_table.dart b/lib/screens/sale_quotation/components/data_table.dart deleted file mode 100644 index afcca4d..0000000 --- a/lib/screens/sale_quotation/components/data_table.dart +++ /dev/null @@ -1,754 +0,0 @@ -import 'package:data_table_2/data_table_2.dart'; -import 'package:sk_base_mobile/app_theme.dart'; -import 'package:sk_base_mobile/widgets/core/sk_text_input.dart'; -import './helper.dart'; -import 'package:flutter/material.dart'; -import 'package:intl/intl.dart'; - -import './data_sources.dart'; -import './nav_helper.dart'; - -// Copyright 2019 The Flutter team. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// The file was extracted from GitHub: https://github.com/flutter/gallery -// Changes and modifications by Maxim Saplin, 2021 - -class DataTable2FixedNMDemo extends StatefulWidget { - const DataTable2FixedNMDemo({super.key}); - - @override - DataTable2FixedNMDemoState createState() => DataTable2FixedNMDemoState(); -} - -class DataTable2FixedNMDemoState extends State { - bool _sortAscending = true; - int? _sortColumnIndex; - late DessertDataSource _dessertsDataSource; - late DessertDataSourceAsync _asyncDessertsDataSource; - bool _initialized = false; - final ScrollController _controller = ScrollController(); - String selectedTableType = dflt; - - int _fixedRows = 1; - int _fixedCols = 1; - int _dataItems = 30; - - DataRow _getRow(int index, [Color? color]) { - final format = NumberFormat.decimalPercentPattern( - locale: 'zh', - decimalDigits: 0, - ); - assert(index >= 0); - if (index >= _desserts.length) throw 'index > _desserts.length'; - final dessert = _desserts[index]; - return DataRow2.byIndex( - index: index, - // selected: dessert.selected, - color: color != null ? MaterialStateProperty.all(color) : null, - // onSelectChanged: (value) { - // if (dessert.selected != value) { - // dessert.selected = value!; - // setState(() {}); - // } - // }, - cells: [ - DataCell(SkTextInput(textController: TextEditingController())), - DataCell(Text('${dessert.calories}')), - DataCell(Text(dessert.fat.toStringAsFixed(1))), - DataCell(Text('${dessert.carbs}')), - DataCell(Text(dessert.protein.toStringAsFixed(1))), - DataCell(Text('${dessert.sodium}')), - DataCell(Text(format.format(dessert.calcium / 100))), - DataCell(Text(format.format(dessert.iron / 100))), - ], - ); - } - - void selectAll(bool? checked) { - for (final dessert in _desserts) { - dessert.selected = checked ?? false; - } - } - - @override - void didChangeDependencies() { - super.didChangeDependencies(); - if (!_initialized) { - _dessertsDataSource = DessertDataSource(context); - _asyncDessertsDataSource = DessertDataSourceAsync(); - _initialized = true; - _dessertsDataSource.addListener(() { - setState(() {}); - }); - } - } - - void _sort( - Comparable Function(Dessert d) getField, - int columnIndex, - bool ascending, - ) { - _dessertsDataSource.sort(getField, ascending); - setState(() { - _sortColumnIndex = columnIndex; - _sortAscending = ascending; - }); - } - - Widget getTableFromSelectedType() { - switch (getCurrentRouteOption(context)) { - case paginatedFixedRowsCols: - { - return getPaginatedDataTable(); - } - case asyncPaginatedFixedRowsCols: - { - return getAsyncPaginatedDataTable(); - } - default: - { - return getDataTable(); - } - } - } - - @override - void dispose() { - _dessertsDataSource.dispose(); - _controller.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.all(16), - child: Column(children: [ - // _getParamsWidget(context), - Flexible( - fit: FlexFit.tight, - child: Theme( - data: ThemeData(dividerColor: Colors.grey[400]), - child: getTableFromSelectedType())) - ])); - } - - DataTable2 getDataTable() { - return DataTable2( - scrollController: _controller, - columnSpacing: 0, - bottomMargin: 20, - border: TableBorder.all(width: 1.0, color: AppTheme.dividerColor), - // headingRowColor: MaterialStateProperty.resolveWith( - // (states) => _fixedRows > 0 ? Colors.grey[200] : Colors.transparent), - // headingRowDecoration: BoxDecoration( - // gradient: LinearGradient( - // colors: [ - // Colors.grey[400]!, - // Colors.grey[200]!, - // ], - // begin: Alignment.topCenter, - // end: Alignment.bottomCenter, - // ), - // ), - fixedColumnsColor: Colors.grey[100], - // fixedCornerColor: Colors.grey[400], - minWidth: 1000, - fixedTopRows: _fixedRows, - fixedLeftColumns: _fixedCols, - // sortColumnIndex: _sortColumnIndex, - // sortAscending: _sortAscending, - // onSelectAll: (val) => setState(() => selectAll(val)), - columns: [ - DataColumn2( - label: const Text('过渡'), - onSort: (columnIndex, ascending) => - _sort((d) => d.name, columnIndex, ascending), - ), - DataColumn2( - label: const Text('名称'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.calories, columnIndex, ascending), - ), - DataColumn2( - label: const Text('规格、型号及说明'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.fat, columnIndex, ascending), - ), - DataColumn2( - label: const Text('单位'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.carbs, columnIndex, ascending), - ), - DataColumn2( - label: const Text('数量'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.protein, columnIndex, ascending), - ), - DataColumn2( - label: const Text('备注'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.sodium, columnIndex, ascending), - ), - DataColumn2( - label: const Text('单价'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.calcium, columnIndex, ascending), - ), - DataColumn2( - label: const Text('总价'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.iron, columnIndex, ascending), - ), - ], - rows: List.generate( - _dataItems, (index) => _getRow(index, Colors.transparent))); - } - - Widget getPaginatedDataTable() { - return PaginatedDataTable2( - scrollController: _controller, - columnSpacing: 0, - horizontalMargin: 12, - border: TableBorder.all(width: 1.0, color: Colors.grey), - headingRowColor: MaterialStateProperty.resolveWith( - (states) => _fixedRows > 0 ? Colors.grey[200] : Colors.transparent), - fixedColumnsColor: Colors.grey[300], - fixedCornerColor: Colors.grey[400], - minWidth: 1000, - fixedTopRows: _fixedRows, - fixedLeftColumns: _fixedCols, - sortColumnIndex: _sortColumnIndex, - sortAscending: _sortAscending, - onSelectAll: (val) => setState(() => selectAll(val)), - columns: [ - DataColumn2( - label: const Text('Desert'), - size: ColumnSize.S, - onSort: (columnIndex, ascending) => - _sort((d) => d.name, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Calories'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.calories, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Fat (gm)'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.fat, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Carbs (gm)'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.carbs, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Protein (gm)'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.protein, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Sodium (mg)'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.sodium, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Calcium (%)'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.calcium, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Iron (%)'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.iron, columnIndex, ascending), - ), - ], - source: _dessertsDataSource); - } - - Widget getAsyncPaginatedDataTable() { - return AsyncPaginatedDataTable2( - scrollController: _controller, - columnSpacing: 0, - horizontalMargin: 12, - border: TableBorder.all(width: 1.0, color: Colors.grey), - headingRowColor: MaterialStateProperty.resolveWith( - (states) => _fixedRows > 0 ? Colors.grey[200] : Colors.transparent), - fixedColumnsColor: Colors.grey[300], - fixedCornerColor: Colors.grey[400], - minWidth: 1000, - fixedTopRows: _fixedRows, - fixedLeftColumns: _fixedCols, - sortColumnIndex: _sortColumnIndex, - sortAscending: _sortAscending, - onSelectAll: (val) => setState(() => selectAll(val)), - columns: [ - DataColumn2( - label: const Text('Desert'), - size: ColumnSize.S, - onSort: (columnIndex, ascending) => - _sort((d) => d.name, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Calories'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.calories, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Fat (gm)'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.fat, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Carbs (gm)'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.carbs, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Protein (gm)'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.protein, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Sodium (mg)'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.sodium, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Calcium (%)'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.calcium, columnIndex, ascending), - ), - DataColumn2( - label: const Text('Iron (%)'), - size: ColumnSize.S, - numeric: true, - onSort: (columnIndex, ascending) => - _sort((d) => d.iron, columnIndex, ascending), - ), - ], - source: _asyncDessertsDataSource); - } - - Theme _getParamsWidget(BuildContext context) { - const double col1 = 130; - const double col2 = 210; - return Theme( - data: blackSlider(context), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox( - height: 36, - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - SizedBox( - width: col1, child: Text('Fixed rows ($_fixedRows)')), - SizedBox( - width: col2, - child: Slider( - value: _fixedRows.toDouble(), - min: 0, - max: 10, - divisions: 10, - onChanged: (val) { - setState(() { - _fixedRows = val.toInt(); - }); - })) - ], - )), - SizedBox( - height: 36, - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - SizedBox( - width: col1, - child: Text('Fixed columns ($_fixedCols)')), - SizedBox( - width: col2, - child: Slider( - value: _fixedCols.toDouble(), - min: 0, - max: 10, - divisions: 10, - onChanged: (val) { - setState(() { - _fixedCols = val.toInt(); - }); - })) - ], - )), - SizedBox( - height: 36, - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - SizedBox( - width: col1, child: Text('Data items ($_dataItems)')), - SizedBox( - width: col2, - child: Slider( - value: _dataItems.toDouble(), - min: 0, - max: 30, - divisions: 10, - onChanged: (val) { - setState(() { - _dataItems = val.toInt(); - }); - })) - ], - )) - ], - )); - } -} - -List _desserts = [ - Dessert( - 'Frozen Yogurt', - 159, - 6.0, - 24, - 4.0, - 87, - 14, - 1, - ), - Dessert( - 'Ice Cream Sandwich', - 237, - 9.0, - 37, - 4.3, - 129, - 8, - 1, - ), - Dessert( - 'Eclair', - 262, - 16.0, - 24, - 6.0, - 337, - 6, - 7, - ), - Dessert( - 'Cupcake', - 305, - 3.7, - 67, - 4.3, - 413, - 3, - 8, - ), - Dessert( - 'Gingerbread', - 356, - 16.0, - 49, - 3.9, - 327, - 7, - 16, - ), - Dessert( - 'Jelly Bean', - 375, - 0.0, - 94, - 0.0, - 50, - 0, - 0, - ), - Dessert( - 'Lollipop', - 392, - 0.2, - 98, - 0.0, - 38, - 0, - 2, - ), - Dessert( - 'Honeycomb', - 408, - 3.2, - 87, - 6.5, - 562, - 0, - 45, - ), - Dessert( - 'Donut', - 452, - 25.0, - 51, - 4.9, - 326, - 2, - 22, - ), - Dessert( - 'Apple Pie', - 518, - 26.0, - 65, - 7.0, - 54, - 12, - 6, - ), - Dessert( - 'Frozen Yougurt with sugar', - 168, - 6.0, - 26, - 4.0, - 87, - 14, - 1, - ), - Dessert( - 'Ice Cream Sandwich with sugar', - 246, - 9.0, - 39, - 4.3, - 129, - 8, - 1, - ), - Dessert( - 'Eclair with sugar', - 271, - 16.0, - 26, - 6.0, - 337, - 6, - 7, - ), - Dessert( - 'Cupcake with sugar', - 314, - 3.7, - 69, - 4.3, - 413, - 3, - 8, - ), - Dessert( - 'Gingerbread with sugar', - 345, - 16.0, - 51, - 3.9, - 327, - 7, - 16, - ), - Dessert( - 'Jelly Bean with sugar', - 364, - 0.0, - 96, - 0.0, - 50, - 0, - 0, - ), - Dessert( - 'Lollipop with sugar', - 401, - 0.2, - 100, - 0.0, - 38, - 0, - 2, - ), - Dessert( - 'Honeycomd with sugar', - 417, - 3.2, - 89, - 6.5, - 562, - 0, - 45, - ), - Dessert( - 'Donut with sugar', - 461, - 25.0, - 53, - 4.9, - 326, - 2, - 22, - ), - Dessert( - 'Apple pie with sugar', - 527, - 26.0, - 67, - 7.0, - 54, - 12, - 6, - ), - Dessert( - 'Forzen yougurt with honey', - 223, - 6.0, - 36, - 4.0, - 87, - 14, - 1, - ), - Dessert( - 'Ice Cream Sandwich with honey', - 301, - 9.0, - 49, - 4.3, - 129, - 8, - 1, - ), - Dessert( - 'Eclair with honey', - 326, - 16.0, - 36, - 6.0, - 337, - 6, - 7, - ), - Dessert( - 'Cupcake with honey', - 369, - 3.7, - 79, - 4.3, - 413, - 3, - 8, - ), - Dessert( - 'Gignerbread with hone', - 420, - 16.0, - 61, - 3.9, - 327, - 7, - 16, - ), - Dessert( - 'Jelly Bean with honey', - 439, - 0.0, - 106, - 0.0, - 50, - 0, - 0, - ), - Dessert( - 'Lollipop with honey', - 456, - 0.2, - 110, - 0.0, - 38, - 0, - 2, - ), - Dessert( - 'Honeycomd with honey', - 472, - 3.2, - 99, - 6.5, - 562, - 0, - 45, - ), - Dessert( - 'Donut with honey', - 516, - 25.0, - 63, - 4.9, - 326, - 2, - 22, - ), - Dessert( - 'Apple pie with honey', - 582, - 26.0, - 77, - 7.0, - 54, - 12, - 6, - ), -]; diff --git a/lib/screens/sale_quotation/components/helper.dart b/lib/screens/sale_quotation/components/helper.dart deleted file mode 100644 index c0af457..0000000 --- a/lib/screens/sale_quotation/components/helper.dart +++ /dev/null @@ -1,176 +0,0 @@ -import 'package:flutter/material.dart'; -import 'dart:math'; - -ThemeData blackSlider(BuildContext context) { - return Theme.of(context).copyWith( - sliderTheme: SliderThemeData( - rangeThumbShape: - const RectRangeSliderThumbShape(enabledThumbRadius: 8), - thumbShape: const RectSliderThumbShape(enabledThumbRadius: 8), - thumbColor: Colors.grey[800], - activeTrackColor: Colors.grey[700], - inactiveTrackColor: Colors.grey[400], - activeTickMarkColor: Colors.white, - inactiveTickMarkColor: Colors.white)); -} - -class RectRangeSliderThumbShape extends RangeSliderThumbShape { - const RectRangeSliderThumbShape({ - this.enabledThumbRadius = 10.0, - this.disabledThumbRadius, - this.elevation = 1.0, - this.pressedElevation = 6.0, - }); - - final double enabledThumbRadius; - - final double? disabledThumbRadius; - double get _disabledThumbRadius => disabledThumbRadius ?? enabledThumbRadius; - - final double elevation; - - final double pressedElevation; - - @override - Size getPreferredSize(bool isEnabled, bool isDiscrete) { - return Size.fromRadius( - isEnabled == true ? enabledThumbRadius : _disabledThumbRadius); - } - - @override - void paint( - PaintingContext context, - Offset center, { - required Animation activationAnimation, - required Animation enableAnimation, - bool isDiscrete = false, - bool isEnabled = false, - bool? isOnTop, - required SliderThemeData sliderTheme, - TextDirection? textDirection, - Thumb? thumb, - bool? isPressed, - }) { - assert(sliderTheme.showValueIndicator != null); - assert(sliderTheme.overlappingShapeStrokeColor != null); - - final Canvas canvas = context.canvas; - final Tween radiusTween = Tween( - begin: _disabledThumbRadius, - end: enabledThumbRadius, - ); - final ColorTween colorTween = ColorTween( - begin: sliderTheme.disabledThumbColor, - end: sliderTheme.thumbColor, - ); - final double radius = radiusTween.evaluate(enableAnimation); - final Tween elevationTween = Tween( - begin: elevation, - end: pressedElevation, - ); - - if (isOnTop ?? false) { - final Paint strokePaint = Paint() - ..color = sliderTheme.overlappingShapeStrokeColor! - ..strokeWidth = 1.0 - ..style = PaintingStyle.stroke; - canvas.drawRect( - Rect.fromCenter( - center: center, width: 2 * radius, height: 2 * radius), - strokePaint); - } - - final Color color = colorTween.evaluate(enableAnimation)!; - - final double evaluatedElevation = - isPressed! ? elevationTween.evaluate(activationAnimation) : elevation; - final Path shadowPath = Path() - ..addArc( - Rect.fromCenter( - center: center, width: 2 * radius, height: 2 * radius), - 0, - pi * 2); - canvas.drawShadow(shadowPath, Colors.black, evaluatedElevation, true); - - canvas.drawRect( - Rect.fromCenter(center: center, width: 2 * radius, height: 2 * radius), - Paint()..color = color, - ); - } -} - -class RectSliderThumbShape extends SliderComponentShape { - const RectSliderThumbShape({ - this.enabledThumbRadius = 10.0, - this.disabledThumbRadius, - this.elevation = 1.0, - this.pressedElevation = 6.0, - }); - - final double enabledThumbRadius; - - final double? disabledThumbRadius; - double get _disabledThumbRadius => disabledThumbRadius ?? enabledThumbRadius; - - final double elevation; - - final double pressedElevation; - - @override - Size getPreferredSize(bool isEnabled, bool isDiscrete) { - return Size.fromRadius( - isEnabled == true ? enabledThumbRadius : _disabledThumbRadius); - } - - @override - void paint( - PaintingContext context, - Offset center, { - required Animation activationAnimation, - required Animation enableAnimation, - required bool isDiscrete, - required TextPainter labelPainter, - required RenderBox parentBox, - required SliderThemeData sliderTheme, - required TextDirection textDirection, - required double value, - required double textScaleFactor, - required Size sizeWithOverflow, - }) { - assert(sliderTheme.disabledThumbColor != null); - assert(sliderTheme.thumbColor != null); - - final Canvas canvas = context.canvas; - final Tween radiusTween = Tween( - begin: _disabledThumbRadius, - end: enabledThumbRadius, - ); - final ColorTween colorTween = ColorTween( - begin: sliderTheme.disabledThumbColor, - end: sliderTheme.thumbColor, - ); - - final Color color = colorTween.evaluate(enableAnimation)!; - final double radius = radiusTween.evaluate(enableAnimation); - - final Tween elevationTween = Tween( - begin: elevation, - end: pressedElevation, - ); - - final double evaluatedElevation = - elevationTween.evaluate(activationAnimation); - final Path path = Path() - ..addArc( - Rect.fromCenter( - center: center, width: 2 * radius, height: 2 * radius), - 0, - pi * 2); - canvas.drawShadow(path, Colors.black, evaluatedElevation, true); - - canvas.drawRect( - Rect.fromCenter(center: center, width: 2 * radius, height: 2 * radius), - Paint()..color = color, - ); - } -} diff --git a/lib/screens/sale_quotation/components/nav_helper.dart b/lib/screens/sale_quotation/components/nav_helper.dart deleted file mode 100644 index 8eb5d90..0000000 --- a/lib/screens/sale_quotation/components/nav_helper.dart +++ /dev/null @@ -1,71 +0,0 @@ -import 'package:flutter/material.dart'; - -/// Route options are used to configure certain features of -/// the given example -String getCurrentRouteOption(BuildContext context) { - var isEmpty = ModalRoute.of(context) != null && - ModalRoute.of(context)!.settings.arguments != null && - ModalRoute.of(context)!.settings.arguments is String - ? ModalRoute.of(context)!.settings.arguments as String - : ''; - - return isEmpty; -} - -// Route options -const dflt = 'Default'; -const noData = 'No data'; -const autoRows = 'Auto rows'; -const showBordersWithZebraStripes = 'Borders with Zebra'; -const custPager = 'Custom pager'; -const defaultSorting = 'Default sorting'; -const selectAllPage = 'Select all at page'; -const rowTaps = 'Row Taps'; -const rowHeightOverrides = 'Row height overrides'; -const fixedColumnWidth = 'Fixed column width'; -const dataTable2 = 'DataTable2'; -const paginatedFixedRowsCols = 'PaginatedDataTable2'; -const asyncPaginatedFixedRowsCols = 'AsyncPaginatedDataTable2'; -const custArrows = 'Custom sort arrows'; -const asyncErrors = - "Errors/Retries"; // Async sample that emulates network error and allow retrying load operation -const goToLast = - "Start at last page"; // Used by async example, navigates to the very last page upon opening the screen -const rounded = 'Rounded style'; - -/// Configurations available to given example routes -const Map> routeOptions = { - '/datatable2': [ - dflt, - noData, - showBordersWithZebraStripes, - fixedColumnWidth, - rowTaps, - rowHeightOverrides, - custArrows, - rounded - ], - '/paginated2': [dflt, noData, autoRows, custPager, defaultSorting], - '/datatable2fixedmn': [ - dataTable2, - paginatedFixedRowsCols, - asyncPaginatedFixedRowsCols - ], - '/asyncpaginated2': [ - dflt, - noData, - selectAllPage, - autoRows, - asyncErrors, - goToLast, - custPager - ], -}; - -List? getOptionsForRoute(String route) { - if (!routeOptions.containsKey(route)) { - return null; - } - - return routeOptions[route]; -} diff --git a/lib/screens/sale_quotation/sale_quotation.dart b/lib/screens/sale_quotation/sale_quotation.dart index 18d1c8f..746fbc5 100644 --- a/lib/screens/sale_quotation/sale_quotation.dart +++ b/lib/screens/sale_quotation/sale_quotation.dart @@ -5,7 +5,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_slidable/flutter_slidable.dart'; import 'package:get/get.dart'; import 'package:sk_base_mobile/app_theme.dart'; -import 'package:sk_base_mobile/screens/sale_quotation/components/data_table.dart'; import 'package:sk_base_mobile/util/modal.util.dart'; import 'package:sk_base_mobile/util/screen_adaper_util.dart'; import 'package:sk_base_mobile/widgets/sk_appbar.dart'; @@ -44,60 +43,63 @@ class SaleQuotationPage extends StatelessWidget { )) ], ), - body: Column( - children: [ - Container( - decoration: BoxDecoration( - color: headerBgcolor, - border: Border( - bottom: BorderSide( - color: AppTheme.nearlyBlack.withOpacity(0.5)))), - padding: EdgeInsets.only( - left: ScreenAdaper.width(20), - top: ScreenAdaper.height(10), - bottom: ScreenAdaper.height(10)), - child: Row( - children: [ - Text( - '名称', - style: headerTitleStyle, - ), - const Spacer(), - Container( - alignment: Alignment.center, - width: quantityWidth, - // constraints: BoxConstraints(minWidth: quantityWidth), - child: Text( - '数量', + body: SafeArea( + bottom: ScreenAdaper.isLandspace() ? false : true, + child: Column( + children: [ + Container( + decoration: BoxDecoration( + color: headerBgcolor, + border: Border( + bottom: BorderSide( + color: AppTheme.nearlyBlack.withOpacity(0.5)))), + padding: EdgeInsets.only( + left: ScreenAdaper.width(20), + top: ScreenAdaper.height(10), + bottom: ScreenAdaper.height(10)), + child: Row( + children: [ + Text( + '名称', style: headerTitleStyle, ), - ), - Container( - alignment: Alignment.center, - width: unitPriceWidth, - // constraints: BoxConstraints(minWidth: unitPriceWidth), - child: Text( - '单价', - style: headerTitleStyle, + const Spacer(), + Container( + alignment: Alignment.center, + width: quantityWidth, + // constraints: BoxConstraints(minWidth: quantityWidth), + child: Text( + '数量', + style: headerTitleStyle, + ), ), - ), - Container( - alignment: Alignment.center, - width: amountWidth, - child: Text( - '总价', - style: headerTitleStyle, + Container( + alignment: Alignment.center, + width: unitPriceWidth, + // constraints: BoxConstraints(minWidth: unitPriceWidth), + child: Text( + '单价', + style: headerTitleStyle, + ), ), - ), - ], - )), - Expanded( - child: Obx(() => CustomScrollView( - slivers: controller.groups - .mapIndexed((index, e) => buildBody(e, index)) - .toList(), - ))), - ], + Container( + alignment: Alignment.center, + width: amountWidth, + child: Text( + '总价', + style: headerTitleStyle, + ), + ), + ], + )), + Expanded( + child: Obx(() => CustomScrollView( + slivers: controller.groups + .mapIndexed((index, e) => buildBody(e, index)) + .toList(), + ))), + ], + ), ), ); } diff --git a/lib/widgets/sk_appbar.dart b/lib/widgets/sk_appbar.dart index 4b89b45..5582892 100644 --- a/lib/widgets/sk_appbar.dart +++ b/lib/widgets/sk_appbar.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:sk_base_mobile/util/util.dart'; class SkAppbar extends StatelessWidget implements PreferredSizeWidget { final String title; @@ -8,7 +9,10 @@ class SkAppbar extends StatelessWidget implements PreferredSizeWidget { @override Widget build(BuildContext context) { return AppBar( - title: Text(title), + title: Text( + title, + style: TextStyle(fontSize: ScreenAdaper.sp(40)), + ), actions: action, ); } diff --git a/pubspec.lock b/pubspec.lock index 387fcd6..d255bcc 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -6,7 +6,7 @@ packages: description: name: animated_bottom_navigation_bar sha256: "2b04a2ae4b0742669e60ddf309467d6a354cefd2d0cd20f4737b1efaf9834cda" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.3" ansicolor: @@ -14,7 +14,7 @@ packages: description: name: ansicolor sha256: "8bf17a8ff6ea17499e40a2d2542c2f481cd7615760c6d34065cb22bfd22e6880" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" archive: @@ -22,7 +22,7 @@ packages: description: name: archive sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.4.10" args: @@ -30,7 +30,7 @@ packages: description: name: args sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.4.2" async: @@ -38,7 +38,7 @@ packages: description: name: async sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.11.0" auto_size_text: @@ -46,7 +46,7 @@ packages: description: name: auto_size_text sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0" boolean_selector: @@ -54,7 +54,7 @@ packages: description: name: boolean_selector sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.1" cached_network_image: @@ -62,7 +62,7 @@ packages: description: name: cached_network_image sha256: "28ea9690a8207179c319965c13cd8df184d5ee721ae2ce60f398ced1219cea1f" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.3.1" cached_network_image_platform_interface: @@ -70,7 +70,7 @@ packages: description: name: cached_network_image_platform_interface sha256: "9e90e78ae72caa874a323d78fa6301b3fb8fa7ea76a8f96dc5b5bf79f283bf2f" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "4.0.0" cached_network_image_web: @@ -78,7 +78,7 @@ packages: description: name: cached_network_image_web sha256: "42a835caa27c220d1294311ac409a43361088625a4f23c820b006dd9bffb3316" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.1" characters: @@ -86,7 +86,7 @@ packages: description: name: characters sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0" checked_yaml: @@ -94,7 +94,7 @@ packages: description: name: checked_yaml sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.3" cli_util: @@ -102,7 +102,7 @@ packages: description: name: cli_util sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.4.1" clock: @@ -110,7 +110,7 @@ packages: description: name: clock sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.1" collection: @@ -118,7 +118,7 @@ packages: description: name: collection sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.18.0" convert: @@ -126,23 +126,23 @@ packages: description: name: convert sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.1" cross_file: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e - url: "https://pub.dev" + sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32" + url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.3+8" + version: "0.3.4+1" crypto: dependency: "direct main" description: name: crypto sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.3" csslib: @@ -150,7 +150,7 @@ packages: description: name: csslib sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" cupertino_icons: @@ -158,23 +158,15 @@ packages: description: name: cupertino_icons sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.6" - data_table_2: - dependency: "direct main" - description: - name: data_table_2 - sha256: e403de6d9a58dddf27700114b614ea8ea5aa8442d7fbdfbe8b3d11b0512e7a49 - url: "https://pub.dev" - source: hosted - version: "2.5.12" date_format: dependency: "direct main" description: name: date_format sha256: "8e5154ca363411847220c8cbc43afcf69c08e8debe40ba09d57710c25711760c" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.7" decimal: @@ -182,7 +174,7 @@ packages: description: name: decimal sha256: "24a261d5d5c87e86c7651c417a5dbdf8bcd7080dd592533910e8d0505a279f21" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.3.3" dio: @@ -190,7 +182,7 @@ packages: description: name: dio sha256: "0978e9a3e45305a80a7210dbeaf79d6ee8bee33f70c8e542dc654c952070217f" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "5.4.2+1" fake_async: @@ -198,7 +190,7 @@ packages: description: name: fake_async sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.1" faker: @@ -206,23 +198,23 @@ packages: description: name: faker sha256: "746e59f91d8b06a389e74cf76e909a05ed69c12691768e2f93557fdf29200fd0" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" ffi: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" - url: "https://pub.dev" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: name: file sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "7.0.0" file_selector_linux: @@ -230,7 +222,7 @@ packages: description: name: file_selector_linux sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.9.2+1" file_selector_macos: @@ -238,7 +230,7 @@ packages: description: name: file_selector_macos sha256: b15c3da8bd4908b9918111fa486903f5808e388b8d1c559949f584725a6594d6 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.9.3+3" file_selector_platform_interface: @@ -246,7 +238,7 @@ packages: description: name: file_selector_platform_interface sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.6.2" file_selector_windows: @@ -254,7 +246,7 @@ packages: description: name: file_selector_windows sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.9.3+1" fixnum: @@ -262,7 +254,7 @@ packages: description: name: fixnum sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" flutter: @@ -275,7 +267,7 @@ packages: description: name: flutter_cache_manager sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.3.1" flutter_keyboard_visibility: @@ -283,7 +275,7 @@ packages: description: name: flutter_keyboard_visibility sha256: "98664be7be0e3ffca00de50f7f6a287ab62c763fc8c762e0a21584584a3ff4f8" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "6.0.0" flutter_keyboard_visibility_linux: @@ -291,7 +283,7 @@ packages: description: name: flutter_keyboard_visibility_linux sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" flutter_keyboard_visibility_macos: @@ -299,7 +291,7 @@ packages: description: name: flutter_keyboard_visibility_macos sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" flutter_keyboard_visibility_platform_interface: @@ -307,7 +299,7 @@ packages: description: name: flutter_keyboard_visibility_platform_interface sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" flutter_keyboard_visibility_web: @@ -315,7 +307,7 @@ packages: description: name: flutter_keyboard_visibility_web sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" flutter_keyboard_visibility_windows: @@ -323,7 +315,7 @@ packages: description: name: flutter_keyboard_visibility_windows sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" flutter_launcher_icons: @@ -331,7 +323,7 @@ packages: description: name: flutter_launcher_icons sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.13.1" flutter_lints: @@ -339,23 +331,23 @@ packages: description: name: flutter_lints sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2" flutter_native_splash: dependency: "direct main" description: name: flutter_native_splash - sha256: "45e2c0986d749c070509e03d6c7ad6c8bd1f7b1dad7d11dd8750a5e4fe3e2c0b" - url: "https://pub.dev" + sha256: edf39bcf4d74aca1eb2c1e43c3e445fd9f494013df7f0da752fefe72020eedc0 + url: "https://pub.flutter-io.cn" source: hosted - version: "2.3.11" + version: "2.4.0" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.17" flutter_screenutil: @@ -363,7 +355,7 @@ packages: description: name: flutter_screenutil sha256: "8cf100b8e4973dc570b6415a2090b0bfaa8756ad333db46939efc3e774ee100d" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "5.9.0" flutter_slidable: @@ -371,7 +363,7 @@ packages: description: name: flutter_slidable sha256: "673403d2eeef1f9e8483bd6d8d92aae73b1d8bd71f382bc3930f699c731bc27c" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.0" flutter_staggered_grid_view: @@ -379,7 +371,7 @@ packages: description: name: flutter_staggered_grid_view sha256: "19e7abb550c96fbfeb546b23f3ff356ee7c59a019a651f8f102a4ba9b7349395" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.7.0" flutter_sticky_header: @@ -387,7 +379,7 @@ packages: description: name: flutter_sticky_header sha256: "017f398fbb45a589e01491861ca20eb6570a763fd9f3888165a978e11248c709" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.6.5" flutter_svg: @@ -395,7 +387,7 @@ packages: description: name: flutter_svg sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.10+1" flutter_test: @@ -408,7 +400,7 @@ packages: description: name: flutter_typeahead sha256: d64712c65db240b1057559b952398ebb6e498077baeebf9b0731dade62438a6d - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "5.2.0" flutter_web_plugins: @@ -421,7 +413,7 @@ packages: description: name: get sha256: e4e7335ede17452b391ed3b2ede016545706c01a02292a6c97619705e7d2a85e - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "4.6.6" html: @@ -429,23 +421,23 @@ packages: description: name: html sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.15.4" http: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba - url: "https://pub.dev" + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.2.1" http_parser: dependency: transitive description: name: http_parser sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "4.0.2" image: @@ -453,7 +445,7 @@ packages: description: name: image sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "4.1.7" image_gallery_saver: @@ -461,7 +453,7 @@ packages: description: name: image_gallery_saver sha256: "0aba74216a4d9b0561510cb968015d56b701ba1bd94aace26aacdd8ae5761816" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.3" image_picker: @@ -469,7 +461,7 @@ packages: description: name: image_picker sha256: "26222b01a0c9a2c8fe02fc90b8208bd3325da5ed1f4a2acabf75939031ac0bdd" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.7" image_picker_android: @@ -477,23 +469,23 @@ packages: description: name: image_picker_android sha256: "42c098e7fb6334746be37cdc30369ade356ed4f14d48b7a0313f95a9159f4321" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.8.9+5" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 - url: "https://pub.dev" + sha256: "6a1704fdd75022272e7e7a897a9068e9c2ff3cd6a66820bf3ded810633eac954" + url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.2" + version: "3.0.3" image_picker_ios: dependency: transitive description: name: image_picker_ios sha256: "917a5cadd67d052554cfb258595e54217de53fac5b52939426e26319a02e6297" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.8.9+2" image_picker_linux: @@ -501,7 +493,7 @@ packages: description: name: image_picker_linux sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.1+1" image_picker_macos: @@ -509,23 +501,23 @@ packages: description: name: image_picker_macos sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.1+1" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b - url: "https://pub.dev" + sha256: "3d2c323daea9d60608f1caf30be32a938916f4975434b8352e6f73dae496da38" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.9.3" + version: "2.9.4" image_picker_windows: dependency: transitive description: name: image_picker_windows sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.1+1" intl: @@ -533,7 +525,7 @@ packages: description: name: intl sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.19.0" js: @@ -541,7 +533,7 @@ packages: description: name: js sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.7.1" json_annotation: @@ -549,15 +541,39 @@ packages: description: name: json_annotation sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "4.8.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.flutter-io.cn" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" lints: dependency: transitive description: name: lints sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0" loading_animation_widget: @@ -565,39 +581,39 @@ packages: description: name: loading_animation_widget sha256: ee3659035528d19145d50cf0107632bf647e7306c88b6a32f35f3bed63f6d728 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.1" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://pub.dev" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" - url: "https://pub.dev" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.flutter-io.cn" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e - url: "https://pub.dev" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.flutter-io.cn" source: hosted - version: "1.10.0" + version: "1.11.0" mime: dependency: transitive description: name: mime sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.5" octo_image: @@ -605,7 +621,7 @@ packages: description: name: octo_image sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" package_info: @@ -613,23 +629,23 @@ packages: description: name: package_info sha256: "6c07d9d82c69e16afeeeeb6866fe43985a20b3b50df243091bfc4a4ad2b03b75" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" path: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.3" + version: "1.9.0" path_parsing: dependency: transitive description: name: path_parsing sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.1" path_provider: @@ -637,7 +653,7 @@ packages: description: name: path_provider sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.2" path_provider_android: @@ -645,7 +661,7 @@ packages: description: name: path_provider_android sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.2.2" path_provider_foundation: @@ -653,7 +669,7 @@ packages: description: name: path_provider_foundation sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.3.2" path_provider_linux: @@ -661,7 +677,7 @@ packages: description: name: path_provider_linux sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.2.1" path_provider_platform_interface: @@ -669,7 +685,7 @@ packages: description: name: path_provider_platform_interface sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.2" path_provider_windows: @@ -677,7 +693,7 @@ packages: description: name: path_provider_windows sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.2.1" permission_handler: @@ -685,7 +701,7 @@ packages: description: name: permission_handler sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "11.3.1" permission_handler_android: @@ -693,7 +709,7 @@ packages: description: name: permission_handler_android sha256: "1acac6bae58144b442f11e66621c062aead9c99841093c38f5bcdcc24c1c3474" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "12.0.5" permission_handler_apple: @@ -701,7 +717,7 @@ packages: description: name: permission_handler_apple sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "9.4.4" permission_handler_html: @@ -709,7 +725,7 @@ packages: description: name: permission_handler_html sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.1.1" permission_handler_platform_interface: @@ -717,7 +733,7 @@ packages: description: name: permission_handler_platform_interface sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "4.2.1" permission_handler_windows: @@ -725,7 +741,7 @@ packages: description: name: permission_handler_windows sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.1" petitparser: @@ -733,7 +749,7 @@ packages: description: name: petitparser sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "6.0.2" photo_view: @@ -741,7 +757,7 @@ packages: description: name: photo_view sha256: "8036802a00bae2a78fc197af8a158e3e2f7b500561ed23b4c458107685e645bb" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.14.0" platform: @@ -749,7 +765,7 @@ packages: description: name: platform sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.4" plugin_platform_interface: @@ -757,7 +773,7 @@ packages: description: name: plugin_platform_interface sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.8" pointer_interceptor: @@ -765,7 +781,7 @@ packages: description: name: pointer_interceptor sha256: bd18321519718678d5fa98ad3a3359cbc7a31f018554eab80b73d08a7f0c165a - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.10.1" pointer_interceptor_ios: @@ -773,7 +789,7 @@ packages: description: name: pointer_interceptor_ios sha256: "2e73c39452830adc4695757130676a39412a3b7f3c34e3f752791b5384770877" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.10.0+2" pointer_interceptor_platform_interface: @@ -781,23 +797,23 @@ packages: description: name: pointer_interceptor_platform_interface sha256: "0597b0560e14354baeb23f8375cd612e8bd4841bf8306ecb71fcd0bb78552506" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.10.0+1" pointer_interceptor_web: dependency: transitive description: name: pointer_interceptor_web - sha256: "9386e064097fd16419e935c23f08f35b58e6aaec155dd39bd6a003b88f9c14b4" - url: "https://pub.dev" + sha256: a6237528b46c411d8d55cdfad8fcb3269fc4cbb26060b14bff94879165887d1e + url: "https://pub.flutter-io.cn" source: hosted - version: "0.10.1+2" + version: "0.10.2" pointycastle: dependency: transitive description: name: pointycastle sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.7.4" pull_to_refresh: @@ -805,7 +821,7 @@ packages: description: name: pull_to_refresh sha256: bbadd5a931837b57739cf08736bea63167e284e71fb23b218c8c9a6e042aad12 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" rational: @@ -813,7 +829,7 @@ packages: description: name: rational sha256: ba58e9e18df9abde280e8b10051e4bce85091e41e8e7e411b6cde2e738d357cf - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.2.2" rxdart: @@ -821,7 +837,7 @@ packages: description: name: rxdart sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.27.7" shared_preferences: @@ -829,7 +845,7 @@ packages: description: name: shared_preferences sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.2.2" shared_preferences_android: @@ -837,7 +853,7 @@ packages: description: name: shared_preferences_android sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.2.1" shared_preferences_foundation: @@ -845,7 +861,7 @@ packages: description: name: shared_preferences_foundation sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.3.5" shared_preferences_linux: @@ -853,7 +869,7 @@ packages: description: name: shared_preferences_linux sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.3.2" shared_preferences_platform_interface: @@ -861,23 +877,23 @@ packages: description: name: shared_preferences_platform_interface sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.3.2" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" - url: "https://pub.dev" + sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.2.2" + version: "2.3.0" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.3.2" sky_engine: @@ -890,7 +906,7 @@ packages: description: name: source_span sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.10.0" sprintf: @@ -898,7 +914,7 @@ packages: description: name: sprintf sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "7.0.0" sqflite: @@ -906,23 +922,23 @@ packages: description: name: sqflite sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.3.2" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5" - url: "https://pub.dev" + sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.5.3" + version: "2.5.4" stack_trace: dependency: transitive description: name: stack_trace sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.11.1" stream_channel: @@ -930,7 +946,7 @@ packages: description: name: stream_channel sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.2" string_scanner: @@ -938,7 +954,7 @@ packages: description: name: string_scanner sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" synchronized: @@ -946,7 +962,7 @@ packages: description: name: synchronized sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.0+1" term_glyph: @@ -954,7 +970,7 @@ packages: description: name: term_glyph sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.1" test_api: @@ -962,7 +978,7 @@ packages: description: name: test_api sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.6.1" timeago: @@ -970,7 +986,7 @@ packages: description: name: timeago sha256: d3204eb4c788214883380253da7f23485320a58c11d145babc82ad16bf4e7764 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.6.1" typed_data: @@ -978,7 +994,7 @@ packages: description: name: typed_data sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.2" universal_io: @@ -986,7 +1002,7 @@ packages: description: name: universal_io sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.2.2" uuid: @@ -994,7 +1010,7 @@ packages: description: name: uuid sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "4.3.3" value_layout_builder: @@ -1002,7 +1018,7 @@ packages: description: name: value_layout_builder sha256: "98202ec1807e94ac72725b7f0d15027afde513c55c69ff3f41bcfccb950831bc" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "0.3.1" vector_graphics: @@ -1010,7 +1026,7 @@ packages: description: name: vector_graphics sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.11+1" vector_graphics_codec: @@ -1018,7 +1034,7 @@ packages: description: name: vector_graphics_codec sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.11+1" vector_graphics_compiler: @@ -1026,7 +1042,7 @@ packages: description: name: vector_graphics_compiler sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.11+1" vector_math: @@ -1034,31 +1050,39 @@ packages: description: name: vector_math sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.flutter-io.cn" + source: hosted + version: "13.0.0" web: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 - url: "https://pub.dev" + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.0" + version: "0.5.1" win32: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" - url: "https://pub.dev" + sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a" + url: "https://pub.flutter-io.cn" source: hosted - version: "5.2.0" + version: "5.4.0" xdg_directories: dependency: transitive description: name: xdg_directories sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.4" xml: @@ -1066,7 +1090,7 @@ packages: description: name: xml sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "6.5.0" yaml: @@ -1074,9 +1098,9 @@ packages: description: name: yaml sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.dev" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.2" sdks: - dart: ">=3.2.6 <4.0.0" - flutter: ">=3.16.6" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.19.0" diff --git a/pubspec.yaml b/pubspec.yaml index 7da03b9..06ce37c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -63,7 +63,6 @@ dependencies: flutter_native_splash: ^2.3.11 flutter_svg: ^2.0.10+1 flutter_sticky_header: ^0.6.5 - data_table_2: ^2.5.12 flutter_slidable: ^3.1.0 dev_dependencies: flutter_test: