From a0c0601375d9880d4b2dd08e84e167c14e758b1d Mon Sep 17 00:00:00 2001 From: Christian Hessenbruch Date: Wed, 24 May 2023 01:48:25 +0200 Subject: [PATCH 01/80] Fix missing dates in date-picker --- lib/src/pluto_grid_date_picker.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/pluto_grid_date_picker.dart b/lib/src/pluto_grid_date_picker.dart index 21bd1f854..ce7e8f84c 100644 --- a/lib/src/pluto_grid_date_picker.dart +++ b/lib/src/pluto_grid_date_picker.dart @@ -221,8 +221,8 @@ class PlutoGridDatePicker { currentMonth = offsetDate.month; final List days = PlutoDateTimeHelper.getDaysInBetween( - DateTime(offsetDate.year, offsetDate.month, 1), - DateTime(offsetDate.year, offsetDate.month + 1, 0), + DateTime.utc(offsetDate.year, offsetDate.month, 1), + DateTime.utc(offsetDate.year, offsetDate.month + 1, 0), ); final popupRows = _buildRows(days); From 4a063fa0d55cdbdae674f7e90ab09025c015b97f Mon Sep 17 00:00:00 2001 From: doonfrs Date: Thu, 7 Dec 2023 23:38:01 +0300 Subject: [PATCH 02/80] Change Package Name to flutter_grid_plus & upgrade the dependencies --- demo/lib/dummy_data/development.dart | 2 +- demo/lib/dummy_data/quick_start.dart | 2 +- demo/lib/main.dart | 2 +- demo/lib/screen/development_screen.dart | 17 +++++++------- demo/lib/screen/empty_screen.dart | 4 ++-- .../add_and_remove_column_row_screen.dart | 7 +++--- .../feature/add_rows_asynchronously.dart | 4 ++-- .../screen/feature/cell_renderer_screen.dart | 4 ++-- .../screen/feature/cell_selection_screen.dart | 4 ++-- .../feature/column_filtering_screen.dart | 4 ++-- .../screen/feature/column_footer_screen.dart | 4 ++-- .../feature/column_freezing_screen.dart | 4 ++-- .../screen/feature/column_group_screen.dart | 4 ++-- .../screen/feature/column_hiding_screen.dart | 4 ++-- .../screen/feature/column_menu_screen.dart | 4 ++-- .../screen/feature/column_moving_screen.dart | 4 ++-- .../feature/column_resizing_screen.dart | 7 +++--- .../screen/feature/column_sorting_screen.dart | 4 ++-- .../screen/feature/copy_and_paste_screen.dart | 4 ++-- .../feature/currency_type_column_screen.dart | 4 ++-- demo/lib/screen/feature/dark_mode_screen.dart | 4 ++-- .../feature/date_type_column_screen.dart | 4 ++-- demo/lib/screen/feature/dual_mode_screen.dart | 4 ++-- .../screen/feature/editing_state_screen.dart | 4 ++-- demo/lib/screen/feature/export_screen.dart | 9 ++++---- .../screen/feature/grid_as_popup_screen.dart | 4 ++-- .../screen/feature/listing_mode_screen.dart | 14 +++++------- demo/lib/screen/feature/moving_screen.dart | 4 ++-- .../feature/number_type_column_screen.dart | 4 ++-- demo/lib/screen/feature/row_color_screen.dart | 4 ++-- demo/lib/screen/feature/row_group_screen.dart | 4 ++-- .../feature/row_infinity_scroll_screen.dart | 4 ++-- .../feature/row_lazy_pagination_screen.dart | 4 ++-- .../lib/screen/feature/row_moving_screen.dart | 4 ++-- .../screen/feature/row_pagination_screen.dart | 4 ++-- .../screen/feature/row_selection_screen.dart | 4 ++-- .../feature/row_with_checkbox_screen.dart | 4 ++-- demo/lib/screen/feature/rtl_screen.dart | 4 ++-- .../feature/selection_type_column_screen.dart | 4 ++-- .../feature/text_type_column_screen.dart | 4 ++-- .../feature/time_type_column_screen.dart | 4 ++-- .../feature/value_formatter_screen.dart | 4 ++-- demo/lib/screen/home_screen.dart | 6 ++--- demo/lib/widget/pluto_contributor_tile.dart | 10 ++++----- demo/lib/widget/pluto_docs_button.dart | 5 ++--- demo/lib/widget/pluto_example_button.dart | 5 ++--- demo/lib/widget/pluto_example_screen.dart | 4 ++-- demo/lib/widget/pluto_expansion_tile.dart | 5 ++--- demo/lib/widget/pluto_grid_title.dart | 4 ++-- demo/lib/widget/pluto_list_tile.dart | 15 +++++-------- demo/lib/widget/pluto_section.dart | 4 ++-- .../widget/pluto_text_color_animation.dart | 4 ++-- .../.plugin_symlinks/url_launcher_linux | 2 +- demo/pubspec.yaml | 14 ++++++------ example/lib/main.dart | 6 ++--- example/pubspec.yaml | 6 ++--- lib/src/helper/filter_helper.dart | 6 ++--- lib/src/helper/pluto_aggregate_helper.dart | 2 +- lib/src/helper/pluto_column_group_helper.dart | 2 +- lib/src/helper/pluto_row_group_delegate.dart | 2 +- lib/src/helper/pluto_row_group_helper.dart | 2 +- lib/src/helper/show_column_menu.dart | 2 +- ...o_grid_cannot_move_current_cell_event.dart | 2 +- .../event/pluto_grid_cell_gesture_event.dart | 2 +- ...pluto_grid_change_column_filter_event.dart | 2 +- .../pluto_grid_change_column_sort_event.dart | 2 +- .../event/pluto_grid_drag_rows_event.dart | 2 +- lib/src/manager/event/pluto_grid_event.dart | 2 +- .../event/pluto_grid_scroll_update_event.dart | 2 +- .../pluto_grid_set_column_filter_event.dart | 2 +- .../manager/pluto_change_notifier_filter.dart | 2 +- lib/src/manager/pluto_grid_event_manager.dart | 2 +- lib/src/manager/pluto_grid_key_manager.dart | 2 +- lib/src/manager/pluto_grid_state_manager.dart | 2 +- .../manager/shortcut/pluto_grid_shortcut.dart | 2 +- .../shortcut/pluto_grid_shortcut_action.dart | 2 +- lib/src/manager/state/cell_state.dart | 2 +- lib/src/manager/state/column_group_state.dart | 2 +- .../manager/state/column_sizing_state.dart | 2 +- lib/src/manager/state/column_state.dart | 6 ++--- lib/src/manager/state/dragging_row_state.dart | 2 +- lib/src/manager/state/editing_state.dart | 2 +- .../manager/state/filtering_row_state.dart | 2 +- lib/src/manager/state/focus_state.dart | 2 +- lib/src/manager/state/grid_state.dart | 2 +- lib/src/manager/state/keyboard_state.dart | 2 +- lib/src/manager/state/layout_state.dart | 2 +- .../manager/state/pagination_row_state.dart | 2 +- lib/src/manager/state/row_group_state.dart | 2 +- lib/src/manager/state/row_state.dart | 2 +- lib/src/manager/state/scroll_state.dart | 2 +- lib/src/manager/state/selecting_state.dart | 2 +- .../state/visibility_layout_state.dart | 2 +- lib/src/model/pluto_cell.dart | 2 +- lib/src/model/pluto_column.dart | 2 +- lib/src/model/pluto_column_group.dart | 2 +- lib/src/model/pluto_row.dart | 2 +- lib/src/model/pluto_row_type.dart | 2 +- .../plugin/pluto_aggregate_column_footer.dart | 2 +- .../plugin/pluto_infinity_scroll_rows.dart | 2 +- lib/src/plugin/pluto_lazy_pagination.dart | 6 ++--- lib/src/plugin/pluto_pagination.dart | 6 ++--- lib/src/pluto_dual_grid.dart | 10 ++++----- lib/src/pluto_dual_grid_popup.dart | 2 +- lib/src/pluto_grid.dart | 21 +++++++++--------- lib/src/pluto_grid_configuration.dart | 2 +- lib/src/pluto_grid_date_picker.dart | 2 +- lib/src/pluto_grid_popup.dart | 2 +- lib/src/ui/cells/pluto_currency_cell.dart | 6 ++--- lib/src/ui/cells/pluto_date_cell.dart | 6 ++--- lib/src/ui/cells/pluto_default_cell.dart | 12 +++++----- lib/src/ui/cells/pluto_number_cell.dart | 6 ++--- lib/src/ui/cells/pluto_select_cell.dart | 6 ++--- lib/src/ui/cells/pluto_text_cell.dart | 6 ++--- lib/src/ui/cells/pluto_time_cell.dart | 6 ++--- lib/src/ui/cells/popup_cell.dart | 6 ++--- lib/src/ui/cells/text_cell.dart | 8 +++---- lib/src/ui/columns/pluto_column_filter.dart | 2 +- lib/src/ui/columns/pluto_column_title.dart | 21 +++++++----------- .../miscellaneous/pluto_no_rows_widget.dart | 2 +- .../pluto_state_with_change.dart | 4 ++-- .../pluto_visibility_layout.dart | 8 +++---- lib/src/ui/pluto_base_cell.dart | 9 ++++---- lib/src/ui/pluto_base_column.dart | 2 +- lib/src/ui/pluto_base_column_footer.dart | 2 +- lib/src/ui/pluto_base_column_group.dart | 2 +- lib/src/ui/pluto_base_row.dart | 9 ++++---- lib/src/ui/pluto_body_columns.dart | 2 +- lib/src/ui/pluto_body_columns_footer.dart | 2 +- lib/src/ui/pluto_body_rows.dart | 2 +- lib/src/ui/pluto_left_frozen_columns.dart | 2 +- .../ui/pluto_left_frozen_columns_footer.dart | 2 +- lib/src/ui/pluto_left_frozen_rows.dart | 2 +- lib/src/ui/pluto_right_frozen_columns.dart | 2 +- .../ui/pluto_right_frozen_columns_footer.dart | 2 +- lib/src/ui/pluto_right_frozen_rows.dart | 2 +- .../pluto_linked_scroll_controller.dart | 22 +++++++------------ lib/src/widgets/pluto_loading.dart | 2 +- lib/src/widgets/pluto_scaled_checkbox.dart | 4 ++-- lib/src/widgets/pluto_scrollbar.dart | 19 +++++----------- lib/src/widgets/pluto_shadow_container.dart | 4 ++-- lib/src/widgets/pluto_shadow_line.dart | 4 ++-- packages/pluto_grid_export/README.md | 4 ++-- .../pluto_grid_export/example/lib/main.dart | 2 +- .../Flutter/GeneratedPluginRegistrant.swift | 2 +- .../pluto_grid_export/example/pubspec.yaml | 2 +- .../lib/src/abstract_text_export.dart | 2 +- .../lib/src/csv/pluto_grid_csv_export.dart | 2 +- .../lib/src/pdf/generic_pdf_controller.dart | 2 +- .../lib/src/pdf/pluto_grid_pdf_export.dart | 4 ++-- .../lib/src/pluto_grid_export.dart | 2 +- packages/pluto_grid_export/pubspec.yaml | 14 ++++++------ pubspec.yaml | 16 +++++++------- test/helper/build_grid_helper.dart | 2 +- test/helper/column_helper.dart | 2 +- test/helper/row_helper.dart | 2 +- test/mock/shared_mocks.dart | 2 +- test/mock/shared_mocks.mocks.dart | 2 +- .../columns_footer/rendering_test.dart | 4 ++-- ...ehavior_setting_enter_key_action_test.dart | 2 +- .../behavior_setting_row_height_test.dart | 4 ++-- .../auto_editing_of_column_test.dart | 2 +- .../editing_cell_state/auto_editing_test.dart | 2 +- .../number_cell_editing_test.dart | 2 +- .../filtering/currency_filtering_test.dart | 4 ++-- .../filtering/number_filtering_test.dart | 4 ++-- .../filtering/text_filtering_test.dart | 4 ++-- .../behavior_absence_freeze_column_test.dart | 2 +- .../behavior_presence_freeze_column_test.dart | 2 +- .../grid_mode/multi_select_mode_test.dart | 2 +- test/scenario/grid_mode/select_mode_test.dart | 2 +- .../grid_mode/select_with_one_tap_test.dart | 2 +- .../grouping_columns/rendering_test.dart | 2 +- .../scenario/grouping_rows/checkbox_test.dart | 4 ++-- .../grouping_rows/on_toggled_test.dart | 2 +- .../grouping_rows/rendering_test.dart | 4 ++-- .../sorting_tree_group_test.dart | 4 ++-- .../hide_columns/hide_column_test.dart | 4 ++-- .../insert_columns/rendering_test.dart | 2 +- .../keyboard/behavior_ctrl_a_key_test.dart | 2 +- .../keyboard/behavior_enter_key_test.dart | 2 +- .../keyboard/behavior_esc_key_test.dart | 2 +- .../keyboard/behavior_f2_key_test.dart | 2 +- .../keyboard/behavior_f3_key_test.dart | 2 +- .../behavior_moving_column_filter_test.dart | 4 ++-- .../keyboard/behavior_tab_key_test.dart | 2 +- ...vior_to_call_popup_with_keyboard_test.dart | 2 +- .../keyboard/custom_shortcut_test.dart | 2 +- test/scenario/layout/layout_test.dart | 4 ++-- .../paginate_rows/button_navigation_test.dart | 4 ++-- .../infinity_scroll_rows_test.dart | 4 ++-- .../paginate_rows/lazy_pagination_test.dart | 4 ++-- test/scenario/paginate_rows/sorting_test.dart | 4 ++-- .../scenario/resizing_window/layout_test.dart | 4 ++-- .../behavior_after_selecting_cells_test.dart | 2 +- .../behavior_after_selecting_rows_test.dart | 2 +- .../selecting_cells_by_long_tap_test.dart | 2 +- test/src/helper/filter_helper_test.dart | 2 +- test/src/helper/filtered_list_test.dart | 2 +- .../helper/pluto_aggregate_helper_test.dart | 2 +- .../pluto_column_group_helper_test.dart | 2 +- .../helper/pluto_date_time_helper_test.dart | 2 +- test/src/helper/pluto_debounce_test.dart | 2 +- .../helper/pluto_key_manager_event_test.dart | 2 +- .../helper/pluto_row_group_delegate_test.dart | 2 +- .../helper/pluto_row_group_helper_test.dart | 2 +- test/src/helper/pluto_size_helper_test.dart | 2 +- .../pluto_grid_cell_gesture_event_test.dart | 2 +- .../pluto_grid_scroll_update_event_test.dart | 2 +- .../manager/pluto_grid_key_manager_test.dart | 2 +- .../pluto_grid_state_manager_test.dart | 2 +- test/src/manager/state/cell_state_test.dart | 2 +- .../state/column_sizing_state_test.dart | 2 +- test/src/manager/state/column_state_test.dart | 4 ++-- .../state/dragging_row_state_test.dart | 2 +- .../src/manager/state/editing_state_test.dart | 2 +- .../state/filtering_row_state_test.dart | 2 +- .../manager/state/keyboard_state_test.dart | 2 +- test/src/manager/state/layout_state_test.dart | 2 +- .../manager/state/row_group_state_test.dart | 2 +- test/src/manager/state/row_state_test.dart | 2 +- test/src/manager/state/scroll_state_test.dart | 2 +- .../manager/state/selecting_state_test.dart | 2 +- .../manager/state/visibility_state_test.dart | 2 +- test/src/model/pluto_column_group_test.dart | 2 +- test/src/model/pluto_column_test.dart | 2 +- test/src/model/pluto_column_type_test.dart | 2 +- test/src/model/pluto_row_test.dart | 2 +- .../pluto_aggregate_column_footer_test.dart | 2 +- test/src/plugin/pluto_pagination_test.dart | 2 +- test/src/pluto_dual_grid_popup_test.dart | 2 +- test/src/pluto_dual_grid_test.dart | 2 +- test/src/pluto_grid_configuration_test.dart | 2 +- test/src/pluto_grid_date_picker_test.dart | 4 ++-- test/src/pluto_grid_popup_test.dart | 4 ++-- test/src/pluto_grid_test.dart | 2 +- .../ui/cells/pluto_currency_cell_test.dart | 4 ++-- test/src/ui/cells/pluto_date_cell_test.dart | 4 ++-- .../src/ui/cells/pluto_default_cell_test.dart | 4 ++-- test/src/ui/cells/pluto_number_cell_test.dart | 4 ++-- test/src/ui/cells/pluto_select_cell_test.dart | 4 ++-- test/src/ui/cells/pluto_text_cell_test.dart | 4 ++-- test/src/ui/cells/pluto_time_cell_test.dart | 4 ++-- .../ui/columns/pluto_column_filter_test.dart | 4 ++-- .../ui/columns/pluto_column_title_test.dart | 4 ++-- .../pluto_visibility_layout_test.dart | 5 ++--- test/src/ui/pluto_base_cell_test.dart | 4 ++-- .../src/ui/pluto_base_column_footer_test.dart | 4 ++-- test/src/ui/pluto_base_column_group_test.dart | 4 ++-- test/src/ui/pluto_base_row_test.dart | 4 ++-- .../widgets/pluto_scaled_checkbox_test.dart | 2 +- test/src/widgets/pluto_scrollbar_test.dart | 2 +- .../widgets/pluto_shadow_container_test.dart | 2 +- 253 files changed, 453 insertions(+), 495 deletions(-) diff --git a/demo/lib/dummy_data/development.dart b/demo/lib/dummy_data/development.dart index 624e70aac..d45a35675 100644 --- a/demo/lib/dummy_data/development.dart +++ b/demo/lib/dummy_data/development.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:demo/dummy_data/words_multilingual.dart'; import 'package:faker/faker.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; class DummyData { late List columns; diff --git a/demo/lib/dummy_data/quick_start.dart b/demo/lib/dummy_data/quick_start.dart index edc9363b3..b89917099 100644 --- a/demo/lib/dummy_data/quick_start.dart +++ b/demo/lib/dummy_data/quick_start.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; class DummyData { List? columns; diff --git a/demo/lib/main.dart b/demo/lib/main.dart index 3c5d5cbd3..24ba66c84 100644 --- a/demo/lib/main.dart +++ b/demo/lib/main.dart @@ -48,7 +48,7 @@ void main() { } class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override Widget build(BuildContext context) { diff --git a/demo/lib/screen/development_screen.dart b/demo/lib/screen/development_screen.dart index 87d7b5088..60086d8b1 100644 --- a/demo/lib/screen/development_screen.dart +++ b/demo/lib/screen/development_screen.dart @@ -1,7 +1,7 @@ import 'package:faker/faker.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'package:pluto_menu_bar/pluto_menu_bar.dart'; import '../dummy_data/development.dart'; @@ -20,7 +20,7 @@ enum _Test { class DevelopmentScreen extends StatefulWidget { static const routeName = 'development'; - const DevelopmentScreen({Key? key}) : super(key: key); + const DevelopmentScreen({super.key}); @override _DevelopmentScreenState createState() => _DevelopmentScreenState(); @@ -357,7 +357,7 @@ class ClassYouImplemented implements PlutoFilterType { } class _NoRows extends StatelessWidget { - const _NoRows({Key? key}) : super(key: key); + const _NoRows(); @override Widget build(BuildContext context) { @@ -407,8 +407,7 @@ class _Header extends StatefulWidget { required this.setTextDirection, required this.setConfiguration, required this.setGridMode, - Key? key, - }) : super(key: key); + }); @override _HeaderState createState() => _HeaderState(); @@ -657,9 +656,11 @@ class _HeaderState extends State<_Header> { return PlutoMenuBar( borderColor: Colors.transparent, mode: _isMobile ? PlutoMenuBarMode.tap : PlutoMenuBarMode.hover, - textStyle: const TextStyle( - color: Colors.black, - fontSize: 14, + itemStyle: const PlutoMenuItemStyle( + textStyle: TextStyle( + color: Colors.black, + fontSize: 14, + ), ), menus: [ PlutoMenuItem( diff --git a/demo/lib/screen/empty_screen.dart b/demo/lib/screen/empty_screen.dart index e999794e5..6f23604d4 100644 --- a/demo/lib/screen/empty_screen.dart +++ b/demo/lib/screen/empty_screen.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../dummy_data/development.dart'; class EmptyScreen extends StatefulWidget { static const routeName = 'empty'; - const EmptyScreen({Key? key}) : super(key: key); + const EmptyScreen({super.key}); @override _EmptyScreenState createState() => _EmptyScreenState(); diff --git a/demo/lib/screen/feature/add_and_remove_column_row_screen.dart b/demo/lib/screen/feature/add_and_remove_column_row_screen.dart index 0c7f4345b..2cdd89b8a 100644 --- a/demo/lib/screen/feature/add_and_remove_column_row_screen.dart +++ b/demo/lib/screen/feature/add_and_remove_column_row_screen.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:faker/faker.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; @@ -10,7 +10,7 @@ import '../../widget/pluto_example_screen.dart'; class AddAndRemoveColumnRowScreen extends StatefulWidget { static const routeName = 'add-and-remove-column-row'; - const AddAndRemoveColumnRowScreen({Key? key}) : super(key: key); + const AddAndRemoveColumnRowScreen({super.key}); @override _AddAndRemoveColumnRowScreenState createState() => @@ -167,8 +167,7 @@ class _AddAndRemoveColumnRowScreenState class _Header extends StatefulWidget { const _Header({ required this.stateManager, - Key? key, - }) : super(key: key); + }); final PlutoGridStateManager stateManager; diff --git a/demo/lib/screen/feature/add_rows_asynchronously.dart b/demo/lib/screen/feature/add_rows_asynchronously.dart index 78faa54d9..fd7c086bb 100644 --- a/demo/lib/screen/feature/add_rows_asynchronously.dart +++ b/demo/lib/screen/feature/add_rows_asynchronously.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -10,7 +10,7 @@ import '../../widget/pluto_example_screen.dart'; class AddRowsAsynchronouslyScreen extends StatefulWidget { static const routeName = 'feature/add-rows-asynchronously'; - const AddRowsAsynchronouslyScreen({Key? key}) : super(key: key); + const AddRowsAsynchronouslyScreen({super.key}); @override _AddRowsAsynchronouslyScreenState createState() => diff --git a/demo/lib/screen/feature/cell_renderer_screen.dart b/demo/lib/screen/feature/cell_renderer_screen.dart index 12ec50e85..1be588e2a 100644 --- a/demo/lib/screen/feature/cell_renderer_screen.dart +++ b/demo/lib/screen/feature/cell_renderer_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class CellRendererScreen extends StatefulWidget { static const routeName = 'feature/cell-renderer'; - const CellRendererScreen({Key? key}) : super(key: key); + const CellRendererScreen({super.key}); @override _CellRendererScreenState createState() => _CellRendererScreenState(); diff --git a/demo/lib/screen/feature/cell_selection_screen.dart b/demo/lib/screen/feature/cell_selection_screen.dart index edd27d3ba..fed282a8b 100644 --- a/demo/lib/screen/feature/cell_selection_screen.dart +++ b/demo/lib/screen/feature/cell_selection_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class CellSelectionScreen extends StatefulWidget { static const routeName = 'feature/cell-selection'; - const CellSelectionScreen({Key? key}) : super(key: key); + const CellSelectionScreen({super.key}); @override _CellSelectionScreenState createState() => _CellSelectionScreenState(); diff --git a/demo/lib/screen/feature/column_filtering_screen.dart b/demo/lib/screen/feature/column_filtering_screen.dart index 073a9143d..2724c3e1e 100644 --- a/demo/lib/screen/feature/column_filtering_screen.dart +++ b/demo/lib/screen/feature/column_filtering_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class ColumnFilteringScreen extends StatefulWidget { static const routeName = 'feature/column-filtering'; - const ColumnFilteringScreen({Key? key}) : super(key: key); + const ColumnFilteringScreen({super.key}); @override _ColumnFilteringScreenState createState() => _ColumnFilteringScreenState(); diff --git a/demo/lib/screen/feature/column_footer_screen.dart b/demo/lib/screen/feature/column_footer_screen.dart index a958677b8..7f08627e3 100644 --- a/demo/lib/screen/feature/column_footer_screen.dart +++ b/demo/lib/screen/feature/column_footer_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class ColumnFooterScreen extends StatefulWidget { static const routeName = 'feature/column-footer'; - const ColumnFooterScreen({Key? key}) : super(key: key); + const ColumnFooterScreen({super.key}); @override _ColumnFooterScreenState createState() => _ColumnFooterScreenState(); diff --git a/demo/lib/screen/feature/column_freezing_screen.dart b/demo/lib/screen/feature/column_freezing_screen.dart index 456327864..96b1a83b6 100644 --- a/demo/lib/screen/feature/column_freezing_screen.dart +++ b/demo/lib/screen/feature/column_freezing_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class ColumnFreezingScreen extends StatefulWidget { static const routeName = 'feature/column-freezing'; - const ColumnFreezingScreen({Key? key}) : super(key: key); + const ColumnFreezingScreen({super.key}); @override _ColumnFreezingScreenState createState() => _ColumnFreezingScreenState(); diff --git a/demo/lib/screen/feature/column_group_screen.dart b/demo/lib/screen/feature/column_group_screen.dart index efcec20ec..dae2a2007 100644 --- a/demo/lib/screen/feature/column_group_screen.dart +++ b/demo/lib/screen/feature/column_group_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class ColumnGroupScreen extends StatefulWidget { static const routeName = 'feature/column-group'; - const ColumnGroupScreen({Key? key}) : super(key: key); + const ColumnGroupScreen({super.key}); @override _ColumnGroupScreenState createState() => _ColumnGroupScreenState(); diff --git a/demo/lib/screen/feature/column_hiding_screen.dart b/demo/lib/screen/feature/column_hiding_screen.dart index 58b699ff7..b3c60a857 100644 --- a/demo/lib/screen/feature/column_hiding_screen.dart +++ b/demo/lib/screen/feature/column_hiding_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; @@ -7,7 +7,7 @@ import '../../widget/pluto_example_screen.dart'; class ColumnHidingScreen extends StatefulWidget { static const routeName = 'feature/column-hiding'; - const ColumnHidingScreen({Key? key}) : super(key: key); + const ColumnHidingScreen({super.key}); @override _ColumnHidingScreenState createState() => _ColumnHidingScreenState(); diff --git a/demo/lib/screen/feature/column_menu_screen.dart b/demo/lib/screen/feature/column_menu_screen.dart index ba46552f4..6c5f3c378 100644 --- a/demo/lib/screen/feature/column_menu_screen.dart +++ b/demo/lib/screen/feature/column_menu_screen.dart @@ -1,6 +1,6 @@ import 'package:demo/dummy_data/development.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class ColumnMenuScreen extends StatefulWidget { static const routeName = 'feature/column-menu'; - const ColumnMenuScreen({Key? key}) : super(key: key); + const ColumnMenuScreen({super.key}); @override _ColumnMenuScreenState createState() => _ColumnMenuScreenState(); diff --git a/demo/lib/screen/feature/column_moving_screen.dart b/demo/lib/screen/feature/column_moving_screen.dart index f820eb5df..bd62cfd80 100644 --- a/demo/lib/screen/feature/column_moving_screen.dart +++ b/demo/lib/screen/feature/column_moving_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; @@ -7,7 +7,7 @@ import '../../widget/pluto_example_screen.dart'; class ColumnMovingScreen extends StatefulWidget { static const routeName = 'feature/column-moving'; - const ColumnMovingScreen({Key? key}) : super(key: key); + const ColumnMovingScreen({super.key}); @override _ColumnMovingScreenState createState() => _ColumnMovingScreenState(); diff --git a/demo/lib/screen/feature/column_resizing_screen.dart b/demo/lib/screen/feature/column_resizing_screen.dart index 3576766a1..7d481005c 100644 --- a/demo/lib/screen/feature/column_resizing_screen.dart +++ b/demo/lib/screen/feature/column_resizing_screen.dart @@ -1,6 +1,6 @@ import 'package:demo/dummy_data/development.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class ColumnResizingScreen extends StatefulWidget { static const routeName = 'feature/column-resizing'; - const ColumnResizingScreen({Key? key}) : super(key: key); + const ColumnResizingScreen({super.key}); @override _ColumnResizingScreenState createState() => _ColumnResizingScreenState(); @@ -78,8 +78,7 @@ class _ColumnResizingScreenState extends State { class _Header extends StatefulWidget { const _Header({ required this.setConfig, - Key? key, - }) : super(key: key); + }); final void Function(PlutoGridColumnSizeConfig) setConfig; diff --git a/demo/lib/screen/feature/column_sorting_screen.dart b/demo/lib/screen/feature/column_sorting_screen.dart index 3a9eefbf2..c25e02668 100644 --- a/demo/lib/screen/feature/column_sorting_screen.dart +++ b/demo/lib/screen/feature/column_sorting_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; @@ -7,7 +7,7 @@ import '../../widget/pluto_example_screen.dart'; class ColumnSortingScreen extends StatefulWidget { static const routeName = 'feature/column-sorting'; - const ColumnSortingScreen({Key? key}) : super(key: key); + const ColumnSortingScreen({super.key}); @override _ColumnSortingScreenState createState() => _ColumnSortingScreenState(); diff --git a/demo/lib/screen/feature/copy_and_paste_screen.dart b/demo/lib/screen/feature/copy_and_paste_screen.dart index 496d8dcc6..250369add 100644 --- a/demo/lib/screen/feature/copy_and_paste_screen.dart +++ b/demo/lib/screen/feature/copy_and_paste_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class CopyAndPasteScreen extends StatefulWidget { static const routeName = 'feature/copy-and-paste'; - const CopyAndPasteScreen({Key? key}) : super(key: key); + const CopyAndPasteScreen({super.key}); @override _CopyAndPasteScreenState createState() => _CopyAndPasteScreenState(); diff --git a/demo/lib/screen/feature/currency_type_column_screen.dart b/demo/lib/screen/feature/currency_type_column_screen.dart index f1ed82054..16998f682 100644 --- a/demo/lib/screen/feature/currency_type_column_screen.dart +++ b/demo/lib/screen/feature/currency_type_column_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class CurrencyTypeColumnScreen extends StatefulWidget { static const routeName = 'feature/currency-type-column'; - const CurrencyTypeColumnScreen({Key? key}) : super(key: key); + const CurrencyTypeColumnScreen({super.key}); @override _CurrencyTypeColumnScreenState createState() => diff --git a/demo/lib/screen/feature/dark_mode_screen.dart b/demo/lib/screen/feature/dark_mode_screen.dart index 34457ad8d..fdfd27012 100644 --- a/demo/lib/screen/feature/dark_mode_screen.dart +++ b/demo/lib/screen/feature/dark_mode_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class DarkModeScreen extends StatefulWidget { static const routeName = 'feature/dark-mode'; - const DarkModeScreen({Key? key}) : super(key: key); + const DarkModeScreen({super.key}); @override _DarkModeScreenState createState() => _DarkModeScreenState(); diff --git a/demo/lib/screen/feature/date_type_column_screen.dart b/demo/lib/screen/feature/date_type_column_screen.dart index 00c5d9873..58f779950 100644 --- a/demo/lib/screen/feature/date_type_column_screen.dart +++ b/demo/lib/screen/feature/date_type_column_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; @@ -7,7 +7,7 @@ import '../../widget/pluto_example_screen.dart'; class DateTypeColumnScreen extends StatefulWidget { static const routeName = 'feature/date-type-column'; - const DateTypeColumnScreen({Key? key}) : super(key: key); + const DateTypeColumnScreen({super.key}); @override _DateTypeColumnScreenState createState() => _DateTypeColumnScreenState(); diff --git a/demo/lib/screen/feature/dual_mode_screen.dart b/demo/lib/screen/feature/dual_mode_screen.dart index 9cdd8fbaf..afb4a1066 100644 --- a/demo/lib/screen/feature/dual_mode_screen.dart +++ b/demo/lib/screen/feature/dual_mode_screen.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:faker/faker.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -11,7 +11,7 @@ import '../../widget/pluto_example_screen.dart'; class DualModeScreen extends StatefulWidget { static const routeName = 'feature/dual-mode'; - const DualModeScreen({Key? key}) : super(key: key); + const DualModeScreen({super.key}); @override _DualModeScreenState createState() => _DualModeScreenState(); diff --git a/demo/lib/screen/feature/editing_state_screen.dart b/demo/lib/screen/feature/editing_state_screen.dart index 7c288e699..13904c74c 100644 --- a/demo/lib/screen/feature/editing_state_screen.dart +++ b/demo/lib/screen/feature/editing_state_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class EditingStateScreen extends StatefulWidget { static const routeName = 'feature/editing-state'; - const EditingStateScreen({Key? key}) : super(key: key); + const EditingStateScreen({super.key}); @override _EditingStateScreenState createState() => _EditingStateScreenState(); diff --git a/demo/lib/screen/feature/export_screen.dart b/demo/lib/screen/feature/export_screen.dart index a339c1848..24252ce52 100644 --- a/demo/lib/screen/feature/export_screen.dart +++ b/demo/lib/screen/feature/export_screen.dart @@ -1,9 +1,9 @@ // ignore_for_file: unused_local_variable import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; -// import 'package:pluto_grid_export/pluto_grid_export.dart' as pluto_grid_export; +// import 'package:pluto_grid_plus_export/pluto_grid_export.dart' as pluto_grid_export; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -12,7 +12,7 @@ import '../../widget/pluto_example_screen.dart'; class ExportScreen extends StatefulWidget { static const routeName = 'feature/export'; - const ExportScreen({Key? key}) : super(key: key); + const ExportScreen({super.key}); @override _ExportScreenState createState() => _ExportScreenState(); @@ -166,8 +166,7 @@ class _ExportScreenState extends State { class _Header extends StatefulWidget { const _Header({ required this.stateManager, - Key? key, - }) : super(key: key); + }); final PlutoGridStateManager stateManager; diff --git a/demo/lib/screen/feature/grid_as_popup_screen.dart b/demo/lib/screen/feature/grid_as_popup_screen.dart index b7c94fa75..b9ccd98d3 100644 --- a/demo/lib/screen/feature/grid_as_popup_screen.dart +++ b/demo/lib/screen/feature/grid_as_popup_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class GridAsPopupScreen extends StatefulWidget { static const routeName = 'feature/grid-as-popup'; - const GridAsPopupScreen({Key? key}) : super(key: key); + const GridAsPopupScreen({super.key}); @override _GridAsPopupScreenState createState() => _GridAsPopupScreenState(); diff --git a/demo/lib/screen/feature/listing_mode_screen.dart b/demo/lib/screen/feature/listing_mode_screen.dart index e5fb73d71..967917095 100644 --- a/demo/lib/screen/feature/listing_mode_screen.dart +++ b/demo/lib/screen/feature/listing_mode_screen.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -10,7 +10,7 @@ import '../../widget/pluto_example_screen.dart'; class ListingModeScreen extends StatefulWidget { static const routeName = 'feature/listing-mode'; - const ListingModeScreen({Key? key}) : super(key: key); + const ListingModeScreen({super.key}); @override _ListingModeScreenState createState() => _ListingModeScreenState(); @@ -181,12 +181,10 @@ class _ListingModeScreenState extends State { autofocus: true, ), const SizedBox(height: 20), - ...row!.cells.entries - .map((e) => Padding( - padding: const EdgeInsets.all(8.0), - child: Text(e.value.value.toString()), - )) - .toList(), + ...row!.cells.entries.map((e) => Padding( + padding: const EdgeInsets.all(8.0), + child: Text(e.value.value.toString()), + )), const SizedBox(height: 20), Center( child: Wrap( diff --git a/demo/lib/screen/feature/moving_screen.dart b/demo/lib/screen/feature/moving_screen.dart index 459558d4d..62fef4cf2 100644 --- a/demo/lib/screen/feature/moving_screen.dart +++ b/demo/lib/screen/feature/moving_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class MovingScreen extends StatefulWidget { static const routeName = 'feature/moving'; - const MovingScreen({Key? key}) : super(key: key); + const MovingScreen({super.key}); @override _MovingScreenState createState() => _MovingScreenState(); diff --git a/demo/lib/screen/feature/number_type_column_screen.dart b/demo/lib/screen/feature/number_type_column_screen.dart index 3f0bee6bc..ca0d7ba3a 100644 --- a/demo/lib/screen/feature/number_type_column_screen.dart +++ b/demo/lib/screen/feature/number_type_column_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; @@ -7,7 +7,7 @@ import '../../widget/pluto_example_screen.dart'; class NumberTypeColumnScreen extends StatefulWidget { static const routeName = 'feature/number-type-column'; - const NumberTypeColumnScreen({Key? key}) : super(key: key); + const NumberTypeColumnScreen({super.key}); @override _NumberTypeColumnScreenState createState() => _NumberTypeColumnScreenState(); diff --git a/demo/lib/screen/feature/row_color_screen.dart b/demo/lib/screen/feature/row_color_screen.dart index 3b6740bfd..5112de341 100644 --- a/demo/lib/screen/feature/row_color_screen.dart +++ b/demo/lib/screen/feature/row_color_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class RowColorScreen extends StatefulWidget { static const routeName = 'feature/row-color'; - const RowColorScreen({Key? key}) : super(key: key); + const RowColorScreen({super.key}); @override _RowColorScreenState createState() => _RowColorScreenState(); diff --git a/demo/lib/screen/feature/row_group_screen.dart b/demo/lib/screen/feature/row_group_screen.dart index f5c99efbd..cf19835fc 100644 --- a/demo/lib/screen/feature/row_group_screen.dart +++ b/demo/lib/screen/feature/row_group_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_docs_button.dart'; @@ -9,7 +9,7 @@ import '../../widget/pluto_example_screen.dart'; class RowGroupScreen extends StatefulWidget { static const routeName = 'feature/row-group'; - const RowGroupScreen({Key? key}) : super(key: key); + const RowGroupScreen({super.key}); @override _RowGroupScreenState createState() => _RowGroupScreenState(); diff --git a/demo/lib/screen/feature/row_infinity_scroll_screen.dart b/demo/lib/screen/feature/row_infinity_scroll_screen.dart index 4fa6518b3..f257f327b 100644 --- a/demo/lib/screen/feature/row_infinity_scroll_screen.dart +++ b/demo/lib/screen/feature/row_infinity_scroll_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class RowInfinityScrollScreen extends StatefulWidget { static const routeName = 'feature/row-infinity-scroll'; - const RowInfinityScrollScreen({Key? key}) : super(key: key); + const RowInfinityScrollScreen({super.key}); @override _RowInfinityScrollScreenState createState() => diff --git a/demo/lib/screen/feature/row_lazy_pagination_screen.dart b/demo/lib/screen/feature/row_lazy_pagination_screen.dart index 1edd8b7c5..e7403e5fc 100644 --- a/demo/lib/screen/feature/row_lazy_pagination_screen.dart +++ b/demo/lib/screen/feature/row_lazy_pagination_screen.dart @@ -1,7 +1,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -10,7 +10,7 @@ import '../../widget/pluto_example_screen.dart'; class RowLazyPaginationScreen extends StatefulWidget { static const routeName = 'feature/row-lazy-pagination'; - const RowLazyPaginationScreen({Key? key}) : super(key: key); + const RowLazyPaginationScreen({super.key}); @override State createState() => diff --git a/demo/lib/screen/feature/row_moving_screen.dart b/demo/lib/screen/feature/row_moving_screen.dart index 3b9c80cd5..97ac2df15 100644 --- a/demo/lib/screen/feature/row_moving_screen.dart +++ b/demo/lib/screen/feature/row_moving_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class RowMovingScreen extends StatefulWidget { static const routeName = 'feature/row-moving'; - const RowMovingScreen({Key? key}) : super(key: key); + const RowMovingScreen({super.key}); @override _RowMovingScreenState createState() => _RowMovingScreenState(); diff --git a/demo/lib/screen/feature/row_pagination_screen.dart b/demo/lib/screen/feature/row_pagination_screen.dart index cca884129..eb1f35969 100644 --- a/demo/lib/screen/feature/row_pagination_screen.dart +++ b/demo/lib/screen/feature/row_pagination_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class RowPaginationScreen extends StatefulWidget { static const routeName = 'feature/row-pagination'; - const RowPaginationScreen({Key? key}) : super(key: key); + const RowPaginationScreen({super.key}); @override _RowPaginationScreenState createState() => _RowPaginationScreenState(); diff --git a/demo/lib/screen/feature/row_selection_screen.dart b/demo/lib/screen/feature/row_selection_screen.dart index 1feebc5bc..504d58c4a 100644 --- a/demo/lib/screen/feature/row_selection_screen.dart +++ b/demo/lib/screen/feature/row_selection_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class RowSelectionScreen extends StatefulWidget { static const routeName = 'feature/row-selection'; - const RowSelectionScreen({Key? key}) : super(key: key); + const RowSelectionScreen({super.key}); @override _RowSelectionScreenState createState() => _RowSelectionScreenState(); diff --git a/demo/lib/screen/feature/row_with_checkbox_screen.dart b/demo/lib/screen/feature/row_with_checkbox_screen.dart index 146be7790..bd73f62b2 100644 --- a/demo/lib/screen/feature/row_with_checkbox_screen.dart +++ b/demo/lib/screen/feature/row_with_checkbox_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class RowWithCheckboxScreen extends StatefulWidget { static const routeName = 'feature/row-with-checkbox'; - const RowWithCheckboxScreen({Key? key}) : super(key: key); + const RowWithCheckboxScreen({super.key}); @override _RowWithCheckboxScreenState createState() => _RowWithCheckboxScreenState(); diff --git a/demo/lib/screen/feature/rtl_screen.dart b/demo/lib/screen/feature/rtl_screen.dart index b2c6718ce..90a337b5a 100644 --- a/demo/lib/screen/feature/rtl_screen.dart +++ b/demo/lib/screen/feature/rtl_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -8,7 +8,7 @@ import '../../widget/pluto_example_screen.dart'; class RTLScreen extends StatefulWidget { static const routeName = 'feature/rtl'; - const RTLScreen({Key? key}) : super(key: key); + const RTLScreen({super.key}); @override _RTLScreenState createState() => _RTLScreenState(); diff --git a/demo/lib/screen/feature/selection_type_column_screen.dart b/demo/lib/screen/feature/selection_type_column_screen.dart index 5238274b3..3806188dd 100644 --- a/demo/lib/screen/feature/selection_type_column_screen.dart +++ b/demo/lib/screen/feature/selection_type_column_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; @@ -7,7 +7,7 @@ import '../../widget/pluto_example_screen.dart'; class SelectionTypeColumnScreen extends StatefulWidget { static const routeName = 'feature/selection-type-column'; - const SelectionTypeColumnScreen({Key? key}) : super(key: key); + const SelectionTypeColumnScreen({super.key}); @override _SelectionTypeColumnScreenState createState() => diff --git a/demo/lib/screen/feature/text_type_column_screen.dart b/demo/lib/screen/feature/text_type_column_screen.dart index b8060073e..89833a614 100644 --- a/demo/lib/screen/feature/text_type_column_screen.dart +++ b/demo/lib/screen/feature/text_type_column_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; @@ -7,7 +7,7 @@ import '../../widget/pluto_example_screen.dart'; class TextTypeColumnScreen extends StatefulWidget { static const routeName = 'feature/text-type-column'; - const TextTypeColumnScreen({Key? key}) : super(key: key); + const TextTypeColumnScreen({super.key}); @override _TextTypeColumnScreenState createState() => _TextTypeColumnScreenState(); diff --git a/demo/lib/screen/feature/time_type_column_screen.dart b/demo/lib/screen/feature/time_type_column_screen.dart index 6d5195bc0..910085fd5 100644 --- a/demo/lib/screen/feature/time_type_column_screen.dart +++ b/demo/lib/screen/feature/time_type_column_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; @@ -7,7 +7,7 @@ import '../../widget/pluto_example_screen.dart'; class TimeTypeColumnScreen extends StatefulWidget { static const routeName = 'feature/time-type-column'; - const TimeTypeColumnScreen({Key? key}) : super(key: key); + const TimeTypeColumnScreen({super.key}); @override _TimeTypeColumnScreenState createState() => _TimeTypeColumnScreenState(); diff --git a/demo/lib/screen/feature/value_formatter_screen.dart b/demo/lib/screen/feature/value_formatter_screen.dart index 630325d5b..05fd30eee 100644 --- a/demo/lib/screen/feature/value_formatter_screen.dart +++ b/demo/lib/screen/feature/value_formatter_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; @@ -7,7 +7,7 @@ import '../../widget/pluto_example_screen.dart'; class ValueFormatterScreen extends StatefulWidget { static const routeName = 'feature/value-formatter'; - const ValueFormatterScreen({Key? key}) : super(key: key); + const ValueFormatterScreen({super.key}); @override _ValueFormatterScreenState createState() => _ValueFormatterScreenState(); diff --git a/demo/lib/screen/home_screen.dart b/demo/lib/screen/home_screen.dart index cdcae2d82..1042bd04d 100644 --- a/demo/lib/screen/home_screen.dart +++ b/demo/lib/screen/home_screen.dart @@ -51,7 +51,7 @@ import 'feature/value_formatter_screen.dart'; class HomeScreen extends StatelessWidget { static const routeName = '/'; - const HomeScreen({Key? key}) : super(key: key); + const HomeScreen({super.key}); @override Widget build(BuildContext context) { @@ -203,7 +203,7 @@ class PlutoFeatures extends StatelessWidget { color: Colors.deepOrange, ); - const PlutoFeatures({Key? key}) : super(key: key); + const PlutoFeatures({super.key}); @override Widget build(BuildContext context) { @@ -506,7 +506,7 @@ class PlutoFeatures extends StatelessWidget { } class PlutoContributors extends StatelessWidget { - const PlutoContributors({Key? key}) : super(key: key); + const PlutoContributors({super.key}); @override Widget build(BuildContext context) { diff --git a/demo/lib/widget/pluto_contributor_tile.dart b/demo/lib/widget/pluto_contributor_tile.dart index 57fc40d60..26ed13be9 100644 --- a/demo/lib/widget/pluto_contributor_tile.dart +++ b/demo/lib/widget/pluto_contributor_tile.dart @@ -12,24 +12,22 @@ class PlutoContributorTile extends StatelessWidget { final Function()? onTapLink; const PlutoContributorTile({ - Key? key, + super.key, required this.name, this.description, this.linkTitle, this.onTapLink, }) : _color = Colors.white, - _fontColor = PlutoGridExampleColors.fontColor, - super(key: key); + _fontColor = PlutoGridExampleColors.fontColor; const PlutoContributorTile.invisible({ - Key? key, + super.key, required this.name, this.description, this.linkTitle, this.onTapLink, }) : _color = Colors.white70, - _fontColor = Colors.black54, - super(key: key); + _fontColor = Colors.black54; final Color _color; final Color _fontColor; diff --git a/demo/lib/widget/pluto_docs_button.dart b/demo/lib/widget/pluto_docs_button.dart index 874e4423d..b154e7c8c 100644 --- a/demo/lib/widget/pluto_docs_button.dart +++ b/demo/lib/widget/pluto_docs_button.dart @@ -7,10 +7,9 @@ class PlutoDocsButton extends StatelessWidget { final String url; PlutoDocsButton({ - Key? key, + super.key, required this.url, - }) : assert(url.isNotEmpty), - super(key: key); + }) : assert(url.isNotEmpty); @override Widget build(BuildContext context) { diff --git a/demo/lib/widget/pluto_example_button.dart b/demo/lib/widget/pluto_example_button.dart index bfda14ed2..2a53db272 100644 --- a/demo/lib/widget/pluto_example_button.dart +++ b/demo/lib/widget/pluto_example_button.dart @@ -7,10 +7,9 @@ class PlutoExampleButton extends StatelessWidget { final String url; PlutoExampleButton({ - Key? key, + super.key, required this.url, - }) : assert(url.isNotEmpty), - super(key: key); + }) : assert(url.isNotEmpty); @override Widget build(BuildContext context) { diff --git a/demo/lib/widget/pluto_example_screen.dart b/demo/lib/widget/pluto_example_screen.dart index 928c9236e..ba08242f8 100644 --- a/demo/lib/widget/pluto_example_screen.dart +++ b/demo/lib/widget/pluto_example_screen.dart @@ -12,13 +12,13 @@ class PlutoExampleScreen extends StatelessWidget { final Widget? body; const PlutoExampleScreen({ - Key? key, + super.key, this.title, this.topTitle, this.topContents, this.topButtons, this.body, - }) : super(key: key); + }); AlertDialog reportingDialog(BuildContext context) { return AlertDialog( diff --git a/demo/lib/widget/pluto_expansion_tile.dart b/demo/lib/widget/pluto_expansion_tile.dart index 5d4f7e79b..447fd15bd 100644 --- a/demo/lib/widget/pluto_expansion_tile.dart +++ b/demo/lib/widget/pluto_expansion_tile.dart @@ -8,12 +8,11 @@ class PlutoExpansionTile extends StatelessWidget { final List? buttons; PlutoExpansionTile({ - Key? key, + super.key, required this.title, this.children, this.buttons, - }) : assert(title.isNotEmpty), - super(key: key); + }) : assert(title.isNotEmpty); @override Widget build(BuildContext context) { diff --git a/demo/lib/widget/pluto_grid_title.dart b/demo/lib/widget/pluto_grid_title.dart index 681d55292..b8d8f9dda 100644 --- a/demo/lib/widget/pluto_grid_title.dart +++ b/demo/lib/widget/pluto_grid_title.dart @@ -4,9 +4,9 @@ class PlutoGridTitle extends StatelessWidget { final double? fontSize; const PlutoGridTitle({ - Key? key, + super.key, this.fontSize, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/demo/lib/widget/pluto_list_tile.dart b/demo/lib/widget/pluto_list_tile.dart index d16fd0f8b..46e6fbf19 100644 --- a/demo/lib/widget/pluto_list_tile.dart +++ b/demo/lib/widget/pluto_list_tile.dart @@ -14,37 +14,34 @@ class PlutoListTile extends StatelessWidget { final Widget? trailing; const PlutoListTile({ - Key? key, + super.key, required this.title, this.description, this.onTapPreview, this.onTapLiveDemo, this.trailing, }) : _color = Colors.white, - _fontColor = PlutoGridExampleColors.fontColor, - super(key: key); + _fontColor = PlutoGridExampleColors.fontColor; const PlutoListTile.dark({ - Key? key, + super.key, required this.title, this.description, this.onTapPreview, this.onTapLiveDemo, this.trailing, }) : _color = Colors.black87, - _fontColor = Colors.white70, - super(key: key); + _fontColor = Colors.white70; const PlutoListTile.amber({ - Key? key, + super.key, required this.title, this.description, this.onTapPreview, this.onTapLiveDemo, this.trailing, }) : _color = Colors.amber, - _fontColor = Colors.black87, - super(key: key); + _fontColor = Colors.black87; final Color _color; final Color _fontColor; diff --git a/demo/lib/widget/pluto_section.dart b/demo/lib/widget/pluto_section.dart index 34e6778e7..01bbb7a92 100644 --- a/demo/lib/widget/pluto_section.dart +++ b/demo/lib/widget/pluto_section.dart @@ -10,12 +10,12 @@ class PlutoSection extends StatelessWidget { final Color? fontColor; const PlutoSection({ - Key? key, + super.key, this.title, this.child, this.color, this.fontColor, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/demo/lib/widget/pluto_text_color_animation.dart b/demo/lib/widget/pluto_text_color_animation.dart index 93b88ffb7..8c777a34b 100644 --- a/demo/lib/widget/pluto_text_color_animation.dart +++ b/demo/lib/widget/pluto_text_color_animation.dart @@ -7,11 +7,11 @@ class PlutoTextColorAnimation extends StatefulWidget { final FontWeight? fontWeight; const PlutoTextColorAnimation({ - Key? key, + super.key, this.text, this.fontSize, this.fontWeight, - }) : super(key: key); + }); @override _PlutoTextColorAnimationState createState() => diff --git a/demo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux b/demo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux index e433ea04f..1a160fa08 120000 --- a/demo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux +++ b/demo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux @@ -1 +1 @@ -C:/Users/manek/AppData/Local/Pub/Cache/hosted/pub.dev/url_launcher_linux-3.0.2/ \ No newline at end of file +C:/Users/DOONF/AppData/Local/Pub/Cache/hosted/pub.dev/url_launcher_linux-3.1.0/ \ No newline at end of file diff --git a/demo/pubspec.yaml b/demo/pubspec.yaml index 1353d10e3..638088140 100644 --- a/demo/pubspec.yaml +++ b/demo/pubspec.yaml @@ -23,22 +23,22 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid: + pluto_grid_plus: path: ../ - faker: ^2.0.0 - url_launcher: ^6.1.6 - font_awesome_flutter: ^10.2.1 + faker: ^2.1.0 + url_launcher: ^6.2.1 + font_awesome_flutter: ^10.6.0 rainbow_color: ^2.0.1 - pluto_menu_bar: ^2.0.1 + pluto_menu_bar: ^3.0.1 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.4 + cupertino_icons: ^1.0.6 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.1 + flutter_lints: ^3.0.1 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/example/lib/main.dart b/example/lib/main.dart index 260b5266f..71073cd2c 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override Widget build(BuildContext context) { @@ -24,7 +24,7 @@ class MyApp extends StatelessWidget { // /// For more examples, go to the demo web link on the github below. class PlutoGridExamplePage extends StatefulWidget { - const PlutoGridExamplePage({Key? key}) : super(key: key); + const PlutoGridExamplePage({super.key}); @override State createState() => _PlutoGridExamplePageState(); diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 87755ebe2..945d85d7b 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -29,13 +29,13 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid: + pluto_grid_plus: path: ../ # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 + cupertino_icons: ^1.0.6 dev_dependencies: flutter_test: @@ -46,7 +46,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^1.0.0 + flutter_lints: ^3.0.1 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/lib/src/helper/filter_helper.dart b/lib/src/helper/filter_helper.dart index 9a47632ba..8ce57e997 100644 --- a/lib/src/helper/filter_helper.dart +++ b/lib/src/helper/filter_helper.dart @@ -1,7 +1,7 @@ import 'package:collection/collection.dart' show IterableExtension; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; typedef SetFilterPopupHandler = void Function( PlutoGridStateManager? stateManager); @@ -504,11 +504,11 @@ class PlutoGridFilterPopupHeader extends StatelessWidget { final SetFilterPopupHandler? handleAddNewFilter; const PlutoGridFilterPopupHeader({ - Key? key, + super.key, this.stateManager, this.configuration, this.handleAddNewFilter, - }) : super(key: key); + }); void handleAddButton() { handleAddNewFilter!(stateManager); diff --git a/lib/src/helper/pluto_aggregate_helper.dart b/lib/src/helper/pluto_aggregate_helper.dart index 916f1ff39..4eabc3ba1 100644 --- a/lib/src/helper/pluto_aggregate_helper.dart +++ b/lib/src/helper/pluto_aggregate_helper.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart' show IterableNumberExtension, IterableExtension; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; class PlutoAggregateHelper { static num sum({ diff --git a/lib/src/helper/pluto_column_group_helper.dart b/lib/src/helper/pluto_column_group_helper.dart index 96aed7129..638c13add 100644 --- a/lib/src/helper/pluto_column_group_helper.dart +++ b/lib/src/helper/pluto_column_group_helper.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// Helper class for handling [PlutoColumnGroup]. class PlutoColumnGroupHelper { diff --git a/lib/src/helper/pluto_row_group_delegate.dart b/lib/src/helper/pluto_row_group_delegate.dart index d7cb67981..85658c143 100644 --- a/lib/src/helper/pluto_row_group_delegate.dart +++ b/lib/src/helper/pluto_row_group_delegate.dart @@ -1,7 +1,7 @@ import 'package:collection/collection.dart'; import 'package:flutter/foundation.dart'; import 'package:intl/intl.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// {@template pluto_row_group_delegate_type} /// Determines the grouping type of the row. diff --git a/lib/src/helper/pluto_row_group_helper.dart b/lib/src/helper/pluto_row_group_helper.dart index fb70069b8..7c72b8960 100644 --- a/lib/src/helper/pluto_row_group_helper.dart +++ b/lib/src/helper/pluto_row_group_helper.dart @@ -1,5 +1,5 @@ import 'package:collection/collection.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// Helper class for grouping rows. class PlutoRowGroupHelper { diff --git a/lib/src/helper/show_column_menu.dart b/lib/src/helper/show_column_menu.dart index 878eab54c..90d9859f6 100644 --- a/lib/src/helper/show_column_menu.dart +++ b/lib/src/helper/show_column_menu.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class PlutoColumnMenuDelegate { List> buildMenuItems({ diff --git a/lib/src/manager/event/pluto_grid_cannot_move_current_cell_event.dart b/lib/src/manager/event/pluto_grid_cannot_move_current_cell_event.dart index 315130990..e45b230d8 100644 --- a/lib/src/manager/event/pluto_grid_cannot_move_current_cell_event.dart +++ b/lib/src/manager/event/pluto_grid_cannot_move_current_cell_event.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// Occurs when the keyboard hits the end of the grid. class PlutoGridCannotMoveCurrentCellEvent extends PlutoGridEvent { diff --git a/lib/src/manager/event/pluto_grid_cell_gesture_event.dart b/lib/src/manager/event/pluto_grid_cell_gesture_event.dart index 8714d59a4..30533231c 100644 --- a/lib/src/manager/event/pluto_grid_cell_gesture_event.dart +++ b/lib/src/manager/event/pluto_grid_cell_gesture_event.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// [PlutoCell] This event handles the gesture of the widget. class PlutoGridCellGestureEvent extends PlutoGridEvent { diff --git a/lib/src/manager/event/pluto_grid_change_column_filter_event.dart b/lib/src/manager/event/pluto_grid_change_column_filter_event.dart index 3a2722dfc..469b8bc3a 100644 --- a/lib/src/manager/event/pluto_grid_change_column_filter_event.dart +++ b/lib/src/manager/event/pluto_grid_change_column_filter_event.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// Event called when the value of the TextField /// that handles the filter under the column changes. diff --git a/lib/src/manager/event/pluto_grid_change_column_sort_event.dart b/lib/src/manager/event/pluto_grid_change_column_sort_event.dart index 45b88d62c..43da5ff1d 100644 --- a/lib/src/manager/event/pluto_grid_change_column_sort_event.dart +++ b/lib/src/manager/event/pluto_grid_change_column_sort_event.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// Event issued when the sort state of a column is changed. class PlutoGridChangeColumnSortEvent extends PlutoGridEvent { diff --git a/lib/src/manager/event/pluto_grid_drag_rows_event.dart b/lib/src/manager/event/pluto_grid_drag_rows_event.dart index 7971fe125..0e765e887 100644 --- a/lib/src/manager/event/pluto_grid_drag_rows_event.dart +++ b/lib/src/manager/event/pluto_grid_drag_rows_event.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// Event called when a row is dragged. class PlutoGridDragRowsEvent extends PlutoGridEvent { diff --git a/lib/src/manager/event/pluto_grid_event.dart b/lib/src/manager/event/pluto_grid_event.dart index 20c8d447e..c21d12c44 100644 --- a/lib/src/manager/event/pluto_grid_event.dart +++ b/lib/src/manager/event/pluto_grid_event.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; enum PlutoGridEventType { normal, diff --git a/lib/src/manager/event/pluto_grid_scroll_update_event.dart b/lib/src/manager/event/pluto_grid_scroll_update_event.dart index 142a547cb..cc96d875f 100644 --- a/lib/src/manager/event/pluto_grid_scroll_update_event.dart +++ b/lib/src/manager/event/pluto_grid_scroll_update_event.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; enum PlutoGridScrollUpdateDirection { all, diff --git a/lib/src/manager/event/pluto_grid_set_column_filter_event.dart b/lib/src/manager/event/pluto_grid_set_column_filter_event.dart index 80a214a7a..937ed9fc7 100644 --- a/lib/src/manager/event/pluto_grid_set_column_filter_event.dart +++ b/lib/src/manager/event/pluto_grid_set_column_filter_event.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// If the value of [PlutoGridStateManager.filterOnlyEvent] is true, /// an event is issued. diff --git a/lib/src/manager/pluto_change_notifier_filter.dart b/lib/src/manager/pluto_change_notifier_filter.dart index 6a15ef96e..687563c2c 100644 --- a/lib/src/manager/pluto_change_notifier_filter.dart +++ b/lib/src/manager/pluto_change_notifier_filter.dart @@ -1,5 +1,5 @@ import 'package:flutter/cupertino.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../ui/ui.dart'; diff --git a/lib/src/manager/pluto_grid_event_manager.dart b/lib/src/manager/pluto_grid_event_manager.dart index f448fd7a5..496569e2e 100644 --- a/lib/src/manager/pluto_grid_event_manager.dart +++ b/lib/src/manager/pluto_grid_event_manager.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'package:rxdart/rxdart.dart'; class PlutoGridEventManager { diff --git a/lib/src/manager/pluto_grid_key_manager.dart b/lib/src/manager/pluto_grid_key_manager.dart index ba952c790..d99d1ac1e 100644 --- a/lib/src/manager/pluto_grid_key_manager.dart +++ b/lib/src/manager/pluto_grid_key_manager.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'package:rxdart/rxdart.dart'; /// 2021-11-19 diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index 5e0a6f031..61431eb9f 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -4,7 +4,7 @@ import 'dart:collection'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'state/cell_state.dart'; import 'state/column_group_state.dart'; diff --git a/lib/src/manager/shortcut/pluto_grid_shortcut.dart b/lib/src/manager/shortcut/pluto_grid_shortcut.dart index 57907ab4d..4f8370ff3 100644 --- a/lib/src/manager/shortcut/pluto_grid_shortcut.dart +++ b/lib/src/manager/shortcut/pluto_grid_shortcut.dart @@ -1,6 +1,6 @@ import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// Class for setting shortcut actions. /// diff --git a/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart b/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart index 26110d358..a4cac3bef 100644 --- a/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart +++ b/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart @@ -1,5 +1,5 @@ import 'package:flutter/services.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// Define the action by implementing the [execute] method /// as an action that can be mapped to a shortcut key. diff --git a/lib/src/manager/state/cell_state.dart b/lib/src/manager/state/cell_state.dart index c5ca41133..b5a5318c0 100644 --- a/lib/src/manager/state/cell_state.dart +++ b/lib/src/manager/state/cell_state.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class ICellState { /// currently selected cell. diff --git a/lib/src/manager/state/column_group_state.dart b/lib/src/manager/state/column_group_state.dart index 8fdeb1274..e7d69d494 100644 --- a/lib/src/manager/state/column_group_state.dart +++ b/lib/src/manager/state/column_group_state.dart @@ -1,5 +1,5 @@ import 'package:flutter/cupertino.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class IColumnGroupState { List get columnGroups; diff --git a/lib/src/manager/state/column_sizing_state.dart b/lib/src/manager/state/column_sizing_state.dart index ea6d2e0cb..b0722e982 100644 --- a/lib/src/manager/state/column_sizing_state.dart +++ b/lib/src/manager/state/column_sizing_state.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// Automatically adjust column width or manage width adjustment mode. abstract class IColumnSizingState { diff --git a/lib/src/manager/state/column_state.dart b/lib/src/manager/state/column_state.dart index 77109320d..c0ee6393e 100644 --- a/lib/src/manager/state/column_state.dart +++ b/lib/src/manager/state/column_state.dart @@ -1,7 +1,7 @@ import 'dart:collection'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class IColumnState { /// Columns provided at grid start. @@ -304,12 +304,12 @@ mixin ColumnState implements IPlutoGridState { @override PlutoColumn? get currentColumn { - return currentCell == null ? null : currentCell!.column; + return currentCell?.column; } @override String? get currentColumnField { - return currentCell == null ? null : currentCell!.column.field; + return currentCell?.column.field; } @override diff --git a/lib/src/manager/state/dragging_row_state.dart b/lib/src/manager/state/dragging_row_state.dart index 0f1d9f4b5..237671bc5 100644 --- a/lib/src/manager/state/dragging_row_state.dart +++ b/lib/src/manager/state/dragging_row_state.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class IDraggingRowState { bool get isDraggingRow; diff --git a/lib/src/manager/state/editing_state.dart b/lib/src/manager/state/editing_state.dart index d07fbd6f2..fa42d947f 100644 --- a/lib/src/manager/state/editing_state.dart +++ b/lib/src/manager/state/editing_state.dart @@ -1,7 +1,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class IEditingState { /// Editing status of the current. diff --git a/lib/src/manager/state/filtering_row_state.dart b/lib/src/manager/state/filtering_row_state.dart index 1db515b4d..ceaabd609 100644 --- a/lib/src/manager/state/filtering_row_state.dart +++ b/lib/src/manager/state/filtering_row_state.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class IFilteringRowState { List get filterRows; diff --git a/lib/src/manager/state/focus_state.dart b/lib/src/manager/state/focus_state.dart index 5e42eedb5..3be5bf7f5 100644 --- a/lib/src/manager/state/focus_state.dart +++ b/lib/src/manager/state/focus_state.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class IFocusState { /// FocusNode to control keyboard input. diff --git a/lib/src/manager/state/grid_state.dart b/lib/src/manager/state/grid_state.dart index aff6f729b..75148effb 100644 --- a/lib/src/manager/state/grid_state.dart +++ b/lib/src/manager/state/grid_state.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class IGridState { GlobalKey get gridKey; diff --git a/lib/src/manager/state/keyboard_state.dart b/lib/src/manager/state/keyboard_state.dart index 7fda0df69..79f7df51e 100644 --- a/lib/src/manager/state/keyboard_state.dart +++ b/lib/src/manager/state/keyboard_state.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class IKeyboardState { /// Currently pressed key diff --git a/lib/src/manager/state/layout_state.dart b/lib/src/manager/state/layout_state.dart index 0732270bb..abf8ea19c 100644 --- a/lib/src/manager/state/layout_state.dart +++ b/lib/src/manager/state/layout_state.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class ILayoutState { ChangeNotifier get resizingChangeNotifier; diff --git a/lib/src/manager/state/pagination_row_state.dart b/lib/src/manager/state/pagination_row_state.dart index 1c038128b..68ff8a224 100644 --- a/lib/src/manager/state/pagination_row_state.dart +++ b/lib/src/manager/state/pagination_row_state.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class IPaginationRowState { int get page; diff --git a/lib/src/manager/state/row_group_state.dart b/lib/src/manager/state/row_group_state.dart index 1b9f74b76..9f25b4424 100644 --- a/lib/src/manager/state/row_group_state.dart +++ b/lib/src/manager/state/row_group_state.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart'; import 'package:flutter/foundation.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /* todo diff --git a/lib/src/manager/state/row_state.dart b/lib/src/manager/state/row_state.dart index c8a8c53c9..4a3d27889 100644 --- a/lib/src/manager/state/row_state.dart +++ b/lib/src/manager/state/row_state.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class IRowState { List get rows; diff --git a/lib/src/manager/state/scroll_state.dart b/lib/src/manager/state/scroll_state.dart index 4f9d1d4d0..57ce4fab3 100644 --- a/lib/src/manager/state/scroll_state.dart +++ b/lib/src/manager/state/scroll_state.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class IScrollState { /// Controller to control the scrolling of the grid. diff --git a/lib/src/manager/state/selecting_state.dart b/lib/src/manager/state/selecting_state.dart index 834055bd5..a4a65af18 100644 --- a/lib/src/manager/state/selecting_state.dart +++ b/lib/src/manager/state/selecting_state.dart @@ -2,7 +2,7 @@ import 'dart:math'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class ISelectingState { /// Multi-selection state. diff --git a/lib/src/manager/state/visibility_layout_state.dart b/lib/src/manager/state/visibility_layout_state.dart index 096973347..c94c4ee3e 100644 --- a/lib/src/manager/state/visibility_layout_state.dart +++ b/lib/src/manager/state/visibility_layout_state.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class IVisibilityLayoutState { /// Set [PlutoColumn.startPosition] to [PlutoColumn.width]. diff --git a/lib/src/model/pluto_cell.dart b/lib/src/model/pluto_cell.dart index 072ef58b5..5d2e2c47d 100644 --- a/lib/src/model/pluto_cell.dart +++ b/lib/src/model/pluto_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; class PlutoCell { PlutoCell({ diff --git a/lib/src/model/pluto_column.dart b/lib/src/model/pluto_column.dart index 4945d6632..70d919a34 100644 --- a/lib/src/model/pluto_column.dart +++ b/lib/src/model/pluto_column.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; typedef PlutoColumnValueFormatter = String Function(dynamic value); diff --git a/lib/src/model/pluto_column_group.dart b/lib/src/model/pluto_column_group.dart index 0f200f4c1..ca5a898b5 100644 --- a/lib/src/model/pluto_column_group.dart +++ b/lib/src/model/pluto_column_group.dart @@ -1,5 +1,5 @@ import 'package:flutter/cupertino.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; class PlutoColumnGroup { final String title; diff --git a/lib/src/model/pluto_row.dart b/lib/src/model/pluto_row.dart index c30c1a712..da7a10e2d 100644 --- a/lib/src/model/pluto_row.dart +++ b/lib/src/model/pluto_row.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; class PlutoRow { PlutoRow({ diff --git a/lib/src/model/pluto_row_type.dart b/lib/src/model/pluto_row_type.dart index 57c51ee33..3fa0765b7 100644 --- a/lib/src/model/pluto_row_type.dart +++ b/lib/src/model/pluto_row_type.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class PlutoRowType { factory PlutoRowType.normal() { diff --git a/lib/src/plugin/pluto_aggregate_column_footer.dart b/lib/src/plugin/pluto_aggregate_column_footer.dart index d5076a5df..03e11e4ae 100644 --- a/lib/src/plugin/pluto_aggregate_column_footer.dart +++ b/lib/src/plugin/pluto_aggregate_column_footer.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../ui/ui.dart'; diff --git a/lib/src/plugin/pluto_infinity_scroll_rows.dart b/lib/src/plugin/pluto_infinity_scroll_rows.dart index 93914bcf2..24648565b 100644 --- a/lib/src/plugin/pluto_infinity_scroll_rows.dart +++ b/lib/src/plugin/pluto_infinity_scroll_rows.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// A callback function to implement when the scroll reaches the end. typedef PlutoInfinityScrollRowsFetch = Future diff --git a/lib/src/plugin/pluto_lazy_pagination.dart b/lib/src/plugin/pluto_lazy_pagination.dart index 3e25dbea2..4be796fbc 100644 --- a/lib/src/plugin/pluto_lazy_pagination.dart +++ b/lib/src/plugin/pluto_lazy_pagination.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// Callback function to implement to add lazy pagination data. typedef PlutoLazyPaginationFetch = Future Function( @@ -413,9 +413,7 @@ class _PaginationWidgetState extends State<_PaginationWidget> { ? SystemMouseCursors.basic : SystemMouseCursors.click, ), - ..._pageNumbers - .map(_makeNumberButton) - .toList(growable: false), + ..._pageNumbers.map(_makeNumberButton), IconButton( onPressed: _isLastPage ? null : _nextPage, icon: const Icon(Icons.navigate_next), diff --git a/lib/src/plugin/pluto_pagination.dart b/lib/src/plugin/pluto_pagination.dart index 84d69fa91..72df276de 100644 --- a/lib/src/plugin/pluto_pagination.dart +++ b/lib/src/plugin/pluto_pagination.dart @@ -1,7 +1,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../ui/ui.dart'; @@ -237,9 +237,7 @@ class PlutoPaginationState extends _PlutoPaginationStateWithChange { ? SystemMouseCursors.basic : SystemMouseCursors.click, ), - ..._pageNumbers - .map(_makeNumberButton) - .toList(growable: false), + ..._pageNumbers.map(_makeNumberButton), IconButton( onPressed: _isLastPage ? null : _nextPage, icon: const Icon(Icons.navigate_next), diff --git a/lib/src/pluto_dual_grid.dart b/lib/src/pluto_dual_grid.dart index 167686ba1..099d09b8d 100644 --- a/lib/src/pluto_dual_grid.dart +++ b/lib/src/pluto_dual_grid.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; typedef PlutoDualOnSelectedEventCallback = void Function( PlutoDualOnSelectedEvent event); @@ -68,8 +68,8 @@ class PlutoDualGrid extends StatefulWidget { this.onSelected, this.display, this.divider = const PlutoDualGridDivider(), - Key? key, - }) : super(key: key); + super.key, + }); static const double dividerWidth = 10; @@ -262,8 +262,8 @@ class PlutoDualGridDividerWidget extends StatefulWidget { required this.indicatorColor, required this.draggingColor, required this.dragCallback, - Key? key, - }) : super(key: key); + super.key, + }); @override State createState() => diff --git a/lib/src/pluto_dual_grid_popup.dart b/lib/src/pluto_dual_grid_popup.dart index 9fa974111..a9d0a810d 100644 --- a/lib/src/pluto_dual_grid_popup.dart +++ b/lib/src/pluto_dual_grid_popup.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// [PlutoDualGridPopup] can connect the keyboard movement between the two grids /// by arranging two [PlutoGrid] left and right. diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index 54d8e96ee..b67f59e1e 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -4,7 +4,7 @@ import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:intl/date_symbol_data_local.dart'; import 'package:intl/intl.dart' show Intl; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'helper/platform_helper.dart'; import 'ui/ui.dart'; @@ -55,7 +55,7 @@ typedef PlutoRowColorCallback = Color Function( /// Also, the popup to set the filter or column inside the grid is implemented through the setting of [PlutoGrid]. class PlutoGrid extends PlutoStatefulWidget { const PlutoGrid({ - Key? key, + super.key, required this.columns, required this.rows, this.columnGroups, @@ -76,7 +76,7 @@ class PlutoGrid extends PlutoStatefulWidget { this.configuration = const PlutoGridConfiguration(), this.notifierFilterResolver, this.mode = PlutoGridMode.normal, - }) : super(key: key); + }); /// {@template pluto_grid_property_columns} /// The [PlutoColumn] column is delivered as a list and can be added or deleted after grid creation. @@ -1204,8 +1204,7 @@ class _GridContainer extends StatelessWidget { const _GridContainer({ required this.stateManager, required this.child, - Key? key, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -1368,17 +1367,17 @@ abstract class PlutoGridOnRowCheckedEvent { /// Argument of [PlutoGrid.onRowChecked] callback when the checkbox of the row is tapped. class PlutoGridOnRowCheckedOneEvent extends PlutoGridOnRowCheckedEvent { const PlutoGridOnRowCheckedOneEvent({ - required PlutoRow row, - required int rowIdx, - required bool? isChecked, - }) : super(row: row, rowIdx: rowIdx, isChecked: isChecked); + required PlutoRow super.row, + required int super.rowIdx, + required super.isChecked, + }); } /// Argument of [PlutoGrid.onRowChecked] callback when all checkboxes of the column are tapped. class PlutoGridOnRowCheckedAllEvent extends PlutoGridOnRowCheckedEvent { const PlutoGridOnRowCheckedAllEvent({ - bool? isChecked, - }) : super(row: null, rowIdx: null, isChecked: isChecked); + super.isChecked, + }) : super(row: null, rowIdx: null); } /// The argument of the [PlutoGrid.onRowDoubleTap] callback diff --git a/lib/src/pluto_grid_configuration.dart b/lib/src/pluto_grid_configuration.dart index 9b946b169..df170a8c1 100644 --- a/lib/src/pluto_grid_configuration.dart +++ b/lib/src/pluto_grid_configuration.dart @@ -2,7 +2,7 @@ import 'package:collection/collection.dart' show IterableExtension; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; class PlutoGridConfiguration { /// When you select a value in the pop-up grid, it moves down. diff --git a/lib/src/pluto_grid_date_picker.dart b/lib/src/pluto_grid_date_picker.dart index 21bd1f854..f6ba033f5 100644 --- a/lib/src/pluto_grid_date_picker.dart +++ b/lib/src/pluto_grid_date_picker.dart @@ -3,7 +3,7 @@ import 'dart:math' show min; import 'package:flutter/material.dart'; import 'package:intl/intl.dart' as intl; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui/ui.dart'; diff --git a/lib/src/pluto_grid_popup.dart b/lib/src/pluto_grid_popup.dart index 710e2c350..338249f2e 100644 --- a/lib/src/pluto_grid_popup.dart +++ b/lib/src/pluto_grid_popup.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// [PlutoGridPopup] calls [PlutoGrid] in the form of a popup. class PlutoGridPopup { diff --git a/lib/src/ui/cells/pluto_currency_cell.dart b/lib/src/ui/cells/pluto_currency_cell.dart index 8a23b1a46..3d573e435 100644 --- a/lib/src/ui/cells/pluto_currency_cell.dart +++ b/lib/src/ui/cells/pluto_currency_cell.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'decimal_input_formatter.dart'; import 'text_cell.dart'; @@ -23,8 +23,8 @@ class PlutoCurrencyCell extends StatefulWidget implements TextCell { required this.cell, required this.column, required this.row, - Key? key, - }) : super(key: key); + super.key, + }); @override PlutoCurrencyCellState createState() => PlutoCurrencyCellState(); diff --git a/lib/src/ui/cells/pluto_date_cell.dart b/lib/src/ui/cells/pluto_date_cell.dart index bb5302b49..81e113747 100644 --- a/lib/src/ui/cells/pluto_date_cell.dart +++ b/lib/src/ui/cells/pluto_date_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'popup_cell.dart'; @@ -21,8 +21,8 @@ class PlutoDateCell extends StatefulWidget implements PopupCell { required this.cell, required this.column, required this.row, - Key? key, - }) : super(key: key); + super.key, + }); @override PlutoDateCellState createState() => PlutoDateCellState(); diff --git a/lib/src/ui/cells/pluto_default_cell.dart b/lib/src/ui/cells/pluto_default_cell.dart index ed117d365..c9fd2104d 100644 --- a/lib/src/ui/cells/pluto_default_cell.dart +++ b/lib/src/ui/cells/pluto_default_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../ui.dart'; @@ -22,8 +22,8 @@ class PlutoDefaultCell extends PlutoStatefulWidget { required this.rowIdx, required this.row, required this.stateManager, - Key? key, - }) : super(key: key); + super.key, + }); @override State createState() => _PlutoDefaultCellState(); @@ -219,8 +219,7 @@ class _RowDragIconWidget extends StatelessWidget { required this.stateManager, required this.dragIcon, required this.feedbackWidget, - Key? key, - }) : super(key: key); + }); List get _draggingRows { if (stateManager.currentSelectingRows.isEmpty) { @@ -422,8 +421,7 @@ class _DefaultCellWidget extends StatelessWidget { required this.row, required this.column, required this.cell, - Key? key, - }) : super(key: key); + }); bool get _showText { if (!stateManager.enabledRowGroups) { diff --git a/lib/src/ui/cells/pluto_number_cell.dart b/lib/src/ui/cells/pluto_number_cell.dart index 19c901cda..d60aece67 100644 --- a/lib/src/ui/cells/pluto_number_cell.dart +++ b/lib/src/ui/cells/pluto_number_cell.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'decimal_input_formatter.dart'; import 'text_cell.dart'; @@ -23,8 +23,8 @@ class PlutoNumberCell extends StatefulWidget implements TextCell { required this.cell, required this.column, required this.row, - Key? key, - }) : super(key: key); + super.key, + }); @override PlutoNumberCellState createState() => PlutoNumberCellState(); diff --git a/lib/src/ui/cells/pluto_select_cell.dart b/lib/src/ui/cells/pluto_select_cell.dart index b5b6ecd2d..9a472c677 100644 --- a/lib/src/ui/cells/pluto_select_cell.dart +++ b/lib/src/ui/cells/pluto_select_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'popup_cell.dart'; @@ -21,8 +21,8 @@ class PlutoSelectCell extends StatefulWidget implements PopupCell { required this.cell, required this.column, required this.row, - Key? key, - }) : super(key: key); + super.key, + }); @override PlutoSelectCellState createState() => PlutoSelectCellState(); diff --git a/lib/src/ui/cells/pluto_text_cell.dart b/lib/src/ui/cells/pluto_text_cell.dart index f15eda94a..704fac602 100644 --- a/lib/src/ui/cells/pluto_text_cell.dart +++ b/lib/src/ui/cells/pluto_text_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'text_cell.dart'; @@ -21,8 +21,8 @@ class PlutoTextCell extends StatefulWidget implements TextCell { required this.cell, required this.column, required this.row, - Key? key, - }) : super(key: key); + super.key, + }); @override PlutoTextCellState createState() => PlutoTextCellState(); diff --git a/lib/src/ui/cells/pluto_time_cell.dart b/lib/src/ui/cells/pluto_time_cell.dart index 52a13da72..4b4a28aec 100644 --- a/lib/src/ui/cells/pluto_time_cell.dart +++ b/lib/src/ui/cells/pluto_time_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'popup_cell.dart'; @@ -21,8 +21,8 @@ class PlutoTimeCell extends StatefulWidget implements PopupCell { required this.cell, required this.column, required this.row, - Key? key, - }) : super(key: key); + super.key, + }); @override PlutoTimeCellState createState() => PlutoTimeCellState(); diff --git a/lib/src/ui/cells/popup_cell.dart b/lib/src/ui/cells/popup_cell.dart index e2e6149da..6021b7941 100644 --- a/lib/src/ui/cells/popup_cell.dart +++ b/lib/src/ui/cells/popup_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class PopupCell extends StatefulWidget { final PlutoGridStateManager stateManager; @@ -15,8 +15,8 @@ abstract class PopupCell extends StatefulWidget { required this.cell, required this.column, required this.row, - Key? key, - }) : super(key: key); + super.key, + }); } abstract class GridPopupProps { diff --git a/lib/src/ui/cells/text_cell.dart b/lib/src/ui/cells/text_cell.dart index b007e4f35..49e6d80d5 100644 --- a/lib/src/ui/cells/text_cell.dart +++ b/lib/src/ui/cells/text_cell.dart @@ -1,8 +1,8 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/helper/platform_helper.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/helper/platform_helper.dart'; abstract class TextCell extends StatefulWidget { final PlutoGridStateManager stateManager; @@ -18,8 +18,8 @@ abstract class TextCell extends StatefulWidget { required this.cell, required this.column, required this.row, - Key? key, - }) : super(key: key); + super.key, + }); } abstract class TextFieldProps { diff --git a/lib/src/ui/columns/pluto_column_filter.dart b/lib/src/ui/columns/pluto_column_filter.dart index da1749122..3913829a2 100644 --- a/lib/src/ui/columns/pluto_column_filter.dart +++ b/lib/src/ui/columns/pluto_column_filter.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../ui.dart'; diff --git a/lib/src/ui/columns/pluto_column_title.dart b/lib/src/ui/columns/pluto_column_title.dart index a9d46cd0f..514d305b1 100644 --- a/lib/src/ui/columns/pluto_column_title.dart +++ b/lib/src/ui/columns/pluto_column_title.dart @@ -1,7 +1,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../ui.dart'; @@ -205,8 +205,8 @@ class PlutoGridColumnIcon extends StatelessWidget { this.icon = Icons.dehaze, this.ascendingIcon, this.descendingIcon, - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { @@ -248,8 +248,7 @@ class _DraggableWidget extends StatelessWidget { required this.stateManager, required this.column, required this.child, - Key? key, - }) : super(key: key); + }); void _handleOnPointerMove(PointerMoveEvent event) { stateManager.eventManager!.addEvent(PlutoGridScrollUpdateEvent( @@ -307,11 +306,10 @@ class _SortableWidget extends StatelessWidget { final Widget child; const _SortableWidget({ - Key? key, required this.stateManager, required this.column, required this.child, - }) : super(key: key); + }); void _onTap() { stateManager.toggleSortColumn(column); @@ -343,8 +341,7 @@ class _ColumnWidget extends StatelessWidget { required this.stateManager, required this.column, required this.height, - Key? key, - }) : super(key: key); + }); EdgeInsets get padding => column.titlePadding ?? @@ -419,8 +416,7 @@ class _ColumnWidget extends StatelessWidget { class CheckboxAllSelectionWidget extends PlutoStatefulWidget { final PlutoGridStateManager stateManager; - const CheckboxAllSelectionWidget({required this.stateManager, Key? key}) - : super(key: key); + const CheckboxAllSelectionWidget({required this.stateManager, super.key}); @override CheckboxAllSelectionWidgetState createState() => @@ -496,8 +492,7 @@ class _ColumnTextWidget extends PlutoStatefulWidget { required this.stateManager, required this.column, required this.height, - Key? key, - }) : super(key: key); + }); @override _ColumnTextWidgetState createState() => _ColumnTextWidgetState(); diff --git a/lib/src/ui/miscellaneous/pluto_no_rows_widget.dart b/lib/src/ui/miscellaneous/pluto_no_rows_widget.dart index 4bf682067..a12049d6d 100644 --- a/lib/src/ui/miscellaneous/pluto_no_rows_widget.dart +++ b/lib/src/ui/miscellaneous/pluto_no_rows_widget.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../ui.dart'; diff --git a/lib/src/ui/miscellaneous/pluto_state_with_change.dart b/lib/src/ui/miscellaneous/pluto_state_with_change.dart index 7e214deda..65b8e1d90 100644 --- a/lib/src/ui/miscellaneous/pluto_state_with_change.dart +++ b/lib/src/ui/miscellaneous/pluto_state_with_change.dart @@ -1,10 +1,10 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; abstract class PlutoStatefulWidget extends StatefulWidget { - const PlutoStatefulWidget({Key? key}) : super(key: key); + const PlutoStatefulWidget({super.key}); } abstract class PlutoStateWithChange diff --git a/lib/src/ui/miscellaneous/pluto_visibility_layout.dart b/lib/src/ui/miscellaneous/pluto_visibility_layout.dart index 6cd1bef00..2348bdeaa 100644 --- a/lib/src/ui/miscellaneous/pluto_visibility_layout.dart +++ b/lib/src/ui/miscellaneous/pluto_visibility_layout.dart @@ -3,7 +3,7 @@ import 'dart:collection'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// It is used to lay out the widgets /// of [PlutoCell] or [PlutoColumn], [PlutoColumnGroup] of [PlutoRow] @@ -391,10 +391,10 @@ class PlutoVisibilityLayoutRenderObjectElement extends RenderObjectElement class PlutoVisibilityLayoutId extends LayoutId { PlutoVisibilityLayoutId({ - Key? key, + super.key, required super.id, - required PlutoVisibilityLayoutChild child, - }) : super(key: key, child: child); + required PlutoVisibilityLayoutChild super.child, + }); PlutoVisibilityLayoutChild get layoutChild => child as PlutoVisibilityLayoutChild; diff --git a/lib/src/ui/pluto_base_cell.dart b/lib/src/ui/pluto_base_cell.dart index 2dabd63c4..0c4210a52 100644 --- a/lib/src/ui/pluto_base_cell.dart +++ b/lib/src/ui/pluto_base_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; @@ -16,13 +16,13 @@ class PlutoBaseCell extends StatelessWidget final PlutoGridStateManager stateManager; const PlutoBaseCell({ - Key? key, + super.key, required this.cell, required this.column, required this.rowIdx, required this.row, required this.stateManager, - }) : super(key: key); + }); @override double get width => column.width; @@ -319,8 +319,7 @@ class _Cell extends PlutoStatefulWidget { required this.row, required this.column, required this.cell, - Key? key, - }) : super(key: key); + }); @override State<_Cell> createState() => _CellState(); diff --git a/lib/src/ui/pluto_base_column.dart b/lib/src/ui/pluto_base_column.dart index 61f651533..cbdfeab6b 100644 --- a/lib/src/ui/pluto_base_column.dart +++ b/lib/src/ui/pluto_base_column.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_base_column_footer.dart b/lib/src/ui/pluto_base_column_footer.dart index b721882c9..f67cf861e 100644 --- a/lib/src/ui/pluto_base_column_footer.dart +++ b/lib/src/ui/pluto_base_column_footer.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_base_column_group.dart b/lib/src/ui/pluto_base_column_group.dart index 84d434976..354d527c5 100644 --- a/lib/src/ui/pluto_base_column_group.dart +++ b/lib/src/ui/pluto_base_column_group.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_base_row.dart b/lib/src/ui/pluto_base_row.dart index 598098294..9d7b9f8b3 100644 --- a/lib/src/ui/pluto_base_row.dart +++ b/lib/src/ui/pluto_base_row.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; @@ -192,8 +192,8 @@ class _RowContainerWidget extends PlutoStatefulWidget { required this.row, required this.enableRowColorAnimation, required this.child, - Key? key, - }) : super(key: key); + super.key, + }); @override State<_RowContainerWidget> createState() => _RowContainerWidgetState(); @@ -361,8 +361,7 @@ class _AnimatedOrNormalContainer extends StatelessWidget { required this.enable, required this.child, required this.decoration, - Key? key, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/src/ui/pluto_body_columns.dart b/lib/src/ui/pluto_body_columns.dart index 417c34a11..ccad4d4b6 100644 --- a/lib/src/ui/pluto_body_columns.dart +++ b/lib/src/ui/pluto_body_columns.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_body_columns_footer.dart b/lib/src/ui/pluto_body_columns_footer.dart index 264747485..16faa7c3e 100644 --- a/lib/src/ui/pluto_body_columns_footer.dart +++ b/lib/src/ui/pluto_body_columns_footer.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_body_rows.dart b/lib/src/ui/pluto_body_rows.dart index fc37f7209..76505c3ab 100644 --- a/lib/src/ui/pluto_body_rows.dart +++ b/lib/src/ui/pluto_body_rows.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../helper/platform_helper.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_left_frozen_columns.dart b/lib/src/ui/pluto_left_frozen_columns.dart index 6329ad9c8..9972ddfa1 100644 --- a/lib/src/ui/pluto_left_frozen_columns.dart +++ b/lib/src/ui/pluto_left_frozen_columns.dart @@ -1,6 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_left_frozen_columns_footer.dart b/lib/src/ui/pluto_left_frozen_columns_footer.dart index 5708813db..a49e83708 100644 --- a/lib/src/ui/pluto_left_frozen_columns_footer.dart +++ b/lib/src/ui/pluto_left_frozen_columns_footer.dart @@ -1,6 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_left_frozen_rows.dart b/lib/src/ui/pluto_left_frozen_rows.dart index 9cb6a0eb4..8a9972e51 100644 --- a/lib/src/ui/pluto_left_frozen_rows.dart +++ b/lib/src/ui/pluto_left_frozen_rows.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_right_frozen_columns.dart b/lib/src/ui/pluto_right_frozen_columns.dart index e7a37f253..b760d306f 100644 --- a/lib/src/ui/pluto_right_frozen_columns.dart +++ b/lib/src/ui/pluto_right_frozen_columns.dart @@ -1,6 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_right_frozen_columns_footer.dart b/lib/src/ui/pluto_right_frozen_columns_footer.dart index dc5200f59..2d418874e 100644 --- a/lib/src/ui/pluto_right_frozen_columns_footer.dart +++ b/lib/src/ui/pluto_right_frozen_columns_footer.dart @@ -1,6 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_right_frozen_rows.dart b/lib/src/ui/pluto_right_frozen_rows.dart index 90244f1af..ddce213e4 100644 --- a/lib/src/ui/pluto_right_frozen_rows.dart +++ b/lib/src/ui/pluto_right_frozen_rows.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'ui.dart'; diff --git a/lib/src/widgets/pluto_linked_scroll_controller.dart b/lib/src/widgets/pluto_linked_scroll_controller.dart index aed1fc30e..ad9e88ece 100644 --- a/lib/src/widgets/pluto_linked_scroll_controller.dart +++ b/lib/src/widgets/pluto_linked_scroll_controller.dart @@ -135,9 +135,8 @@ class _LinkedScrollController extends ScrollController { final LinkedScrollControllerGroup _controllers; _LinkedScrollController(this._controllers, - {required double initialScrollOffset}) - : super( - initialScrollOffset: initialScrollOffset, keepScrollOffset: false); + {required super.initialScrollOffset}) + : super(keepScrollOffset: false); @override void dispose() { @@ -211,16 +210,11 @@ class _LinkedScrollController extends ScrollController { class _LinkedScrollPosition extends ScrollPositionWithSingleContext { _LinkedScrollPosition( this.owner, { - required ScrollPhysics physics, - required ScrollContext context, - double? initialPixels, - ScrollPosition? oldPosition, - }) : super( - physics: physics, - context: context, - initialPixels: initialPixels, - oldPosition: oldPosition, - ); + required super.physics, + required super.context, + super.initialPixels = null, + super.oldPosition, + }); final _LinkedScrollController owner; @@ -329,7 +323,7 @@ class _LinkedScrollPosition extends ScrollPositionWithSingleContext { } class _LinkedScrollActivity extends ScrollActivity { - _LinkedScrollActivity(_LinkedScrollPosition delegate) : super(delegate); + _LinkedScrollActivity(_LinkedScrollPosition super.delegate); @override _LinkedScrollPosition get delegate => super.delegate as _LinkedScrollPosition; diff --git a/lib/src/widgets/pluto_loading.dart b/lib/src/widgets/pluto_loading.dart index 6feae1bc4..adbd1fdd4 100644 --- a/lib/src/widgets/pluto_loading.dart +++ b/lib/src/widgets/pluto_loading.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// Widget that is displayed when loading is enabled /// with the [PlutoGridStateManager.setShowLoading] method. diff --git a/lib/src/widgets/pluto_scaled_checkbox.dart b/lib/src/widgets/pluto_scaled_checkbox.dart index e2f7ee0e4..e98308546 100644 --- a/lib/src/widgets/pluto_scaled_checkbox.dart +++ b/lib/src/widgets/pluto_scaled_checkbox.dart @@ -16,7 +16,7 @@ class PlutoScaledCheckbox extends StatelessWidget { final Color checkColor; const PlutoScaledCheckbox({ - Key? key, + super.key, required this.value, required this.handleOnChanged, this.tristate = false, @@ -24,7 +24,7 @@ class PlutoScaledCheckbox extends StatelessWidget { this.unselectedColor = Colors.black26, this.activeColor = Colors.lightBlue, this.checkColor = const Color(0xFFDCF5FF), - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/src/widgets/pluto_scrollbar.dart b/lib/src/widgets/pluto_scrollbar.dart index 007459967..894468551 100644 --- a/lib/src/widgets/pluto_scrollbar.dart +++ b/lib/src/widgets/pluto_scrollbar.dart @@ -34,7 +34,7 @@ const double _kScrollbarCrossAxisMargin = 3.0; class PlutoScrollbar extends StatefulWidget { const PlutoScrollbar({ - Key? key, + super.key, this.horizontalController, this.verticalController, this.isAlwaysShown = false, @@ -60,8 +60,7 @@ class PlutoScrollbar extends StatefulWidget { crossAxisMargin = crossAxisMargin ?? _kScrollbarCrossAxisMargin, scrollBarColor = scrollBarColor ?? _kScrollbarColor, scrollBarTrackColor = scrollBarTrackColor ?? _kTrackColor, - longPressDuration = longPressDuration ?? _kScrollbarLongPressDuration, - super(key: key); + longPressDuration = longPressDuration ?? _kScrollbarLongPressDuration; final ScrollController? horizontalController; final ScrollController? verticalController; @@ -1384,19 +1383,11 @@ String shortHash(Object? object) { // thumb and ignores everything else. class _ThumbPressGestureRecognizer extends LongPressGestureRecognizer { _ThumbPressGestureRecognizer({ - double? postAcceptSlopTolerance, - Set? supportedDevices, required GlobalKey customPaintKey, - required Object debugOwner, - required Duration duration, + required Object super.debugOwner, + required Duration super.duration, this.onlyDraggingThumb = false, - }) : _customPaintKey = customPaintKey, - super( - postAcceptSlopTolerance: postAcceptSlopTolerance, - supportedDevices: supportedDevices, - debugOwner: debugOwner, - duration: duration, - ); + }) : _customPaintKey = customPaintKey; final GlobalKey _customPaintKey; final bool onlyDraggingThumb; diff --git a/lib/src/widgets/pluto_shadow_container.dart b/lib/src/widgets/pluto_shadow_container.dart index 3b003a0b5..c68087ec5 100644 --- a/lib/src/widgets/pluto_shadow_container.dart +++ b/lib/src/widgets/pluto_shadow_container.dart @@ -16,7 +16,7 @@ class PlutoShadowContainer extends StatelessWidget { final Widget child; const PlutoShadowContainer({ - Key? key, + super.key, required this.width, required this.height, required this.child, @@ -26,7 +26,7 @@ class PlutoShadowContainer extends StatelessWidget { this.backgroundColor = Colors.white, this.borderColor = const Color(0xFFA1A5AE), this.alignment = Alignment.centerLeft, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/src/widgets/pluto_shadow_line.dart b/lib/src/widgets/pluto_shadow_line.dart index d314037fd..0496cccbb 100644 --- a/lib/src/widgets/pluto_shadow_line.dart +++ b/lib/src/widgets/pluto_shadow_line.dart @@ -11,8 +11,8 @@ class PlutoShadowLine extends StatelessWidget { this.reverse, this.color, this.shadow, - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/packages/pluto_grid_export/README.md b/packages/pluto_grid_export/README.md index 656747fc8..46ffe4722 100644 --- a/packages/pluto_grid_export/README.md +++ b/packages/pluto_grid_export/README.md @@ -27,8 +27,8 @@ import 'dart:convert'; import 'package:file_saver/file_saver.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid_export/pluto_grid_export.dart' as pluto_grid_export; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus_export/pluto_grid_export.dart' as pluto_grid_export; void main() { runApp(const MyApp()); diff --git a/packages/pluto_grid_export/example/lib/main.dart b/packages/pluto_grid_export/example/lib/main.dart index 1f7046853..ba87d3e67 100644 --- a/packages/pluto_grid_export/example/lib/main.dart +++ b/packages/pluto_grid_export/example/lib/main.dart @@ -3,7 +3,7 @@ import 'dart:convert'; import 'package:file_saver/file_saver.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'package:pluto_grid_export/pluto_grid_export.dart' as pluto_grid_export; void main() { diff --git a/packages/pluto_grid_export/example/macos/Flutter/GeneratedPluginRegistrant.swift b/packages/pluto_grid_export/example/macos/Flutter/GeneratedPluginRegistrant.swift index 416ef8457..9c4efdd9c 100644 --- a/packages/pluto_grid_export/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/packages/pluto_grid_export/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,7 +6,7 @@ import FlutterMacOS import Foundation import file_saver -import path_provider_macos +import path_provider_foundation import printing func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { diff --git a/packages/pluto_grid_export/example/pubspec.yaml b/packages/pluto_grid_export/example/pubspec.yaml index d35a19103..fce47e3cd 100644 --- a/packages/pluto_grid_export/example/pubspec.yaml +++ b/packages/pluto_grid_export/example/pubspec.yaml @@ -29,7 +29,7 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid: + pluto_grid_plus: path: ../../../ pluto_grid_export: path: ../ diff --git a/packages/pluto_grid_export/lib/src/abstract_text_export.dart b/packages/pluto_grid_export/lib/src/abstract_text_export.dart index da07cd77a..312f3a945 100644 --- a/packages/pluto_grid_export/lib/src/abstract_text_export.dart +++ b/packages/pluto_grid_export/lib/src/abstract_text_export.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /// Abstract class for converting PlutoGrid's metadata. abstract class AbstractTextExport { diff --git a/packages/pluto_grid_export/lib/src/csv/pluto_grid_csv_export.dart b/packages/pluto_grid_export/lib/src/csv/pluto_grid_csv_export.dart index 86e174532..1d732d2c6 100644 --- a/packages/pluto_grid_export/lib/src/csv/pluto_grid_csv_export.dart +++ b/packages/pluto_grid_export/lib/src/csv/pluto_grid_csv_export.dart @@ -1,5 +1,5 @@ import 'package:csv/csv.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../abstract_text_export.dart'; diff --git a/packages/pluto_grid_export/lib/src/pdf/generic_pdf_controller.dart b/packages/pluto_grid_export/lib/src/pdf/generic_pdf_controller.dart index 82ea42a9c..4af78ab21 100644 --- a/packages/pluto_grid_export/lib/src/pdf/generic_pdf_controller.dart +++ b/packages/pluto_grid_export/lib/src/pdf/generic_pdf_controller.dart @@ -79,7 +79,7 @@ class GenericPdfController extends PdfController { } Widget _table(List columns, List> rows) { - return Table.fromTextArray( + return TableHelper.fromTextArray( border: null, cellAlignment: Alignment.center, // [Resolved 3.8.1] https://github.com/DavBfr/dart_pdf/pull/1033 to replace "headerDecoration" with "headerCellDecoration" diff --git a/packages/pluto_grid_export/lib/src/pdf/pluto_grid_pdf_export.dart b/packages/pluto_grid_export/lib/src/pdf/pluto_grid_pdf_export.dart index 2eb444fbd..66a2e66c5 100644 --- a/packages/pluto_grid_export/lib/src/pdf/pluto_grid_pdf_export.dart +++ b/packages/pluto_grid_export/lib/src/pdf/pluto_grid_pdf_export.dart @@ -2,7 +2,7 @@ import 'dart:typed_data'; import 'package:pdf/pdf.dart'; import 'package:pdf/widgets.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../abstract_text_export.dart'; import 'generic_pdf_controller.dart'; @@ -11,7 +11,7 @@ import 'generic_pdf_controller.dart'; /// /// [themeData] Attributes for custom fonts. /// -/// import 'package:pluto_grid_export/pluto_grid_export.dart' as pluto_grid_export; +/// import 'package:pluto_grid_plus_export/pluto_grid_export.dart' as pluto_grid_export; /// /// final themeData = pluto_grid_export.ThemeData.withFont( /// base: pluto_grid_export.Font.ttf( diff --git a/packages/pluto_grid_export/lib/src/pluto_grid_export.dart b/packages/pluto_grid_export/lib/src/pluto_grid_export.dart index 781ac49c6..d79364d05 100644 --- a/packages/pluto_grid_export/lib/src/pluto_grid_export.dart +++ b/packages/pluto_grid_export/lib/src/pluto_grid_export.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import './csv/pluto_grid_csv_export.dart'; diff --git a/packages/pluto_grid_export/pubspec.yaml b/packages/pluto_grid_export/pubspec.yaml index 5f1c94844..aaa01cf5a 100644 --- a/packages/pluto_grid_export/pubspec.yaml +++ b/packages/pluto_grid_export/pubspec.yaml @@ -12,15 +12,15 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid: + pluto_grid_plus: path: ../.. - csv: ^5.0.1 - pdf: ^3.8.3 - printing: ^5.9.3 + csv: ^5.1.1 + pdf: ^3.10.7 + printing: ^5.11.1 dev_dependencies: flutter_test: sdk: flutter - mockito: ^5.3.2 - build_runner: ^2.3.0 - flutter_lints: ^2.0.1 + mockito: ^5.4.3 + build_runner: ^2.4.7 + flutter_lints: ^3.0.1 diff --git a/pubspec.yaml b/pubspec.yaml index 9ff0f667c..f956ee8e2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,8 @@ -name: pluto_grid -description: PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS. (DataGrid, DataTable, Data Grid, Data Table, Sticky) -version: 7.0.2 +name: pluto_grid_plus +description: PlutoGrid plus is a maintained version of PlutoGrid, PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS. (DataGrid, DataTable, Data Grid, Data Table, Sticky) +version: 8.0.0 homepage: https://pluto.weblaze.dev -repository: https://github.com/bosskmk/pluto_grid +repository: https://github.com/doonfrs/pluto_grid_plus environment: sdk: ">=2.17.0 <3.0.0" @@ -15,11 +15,11 @@ dependencies: # https://github.com/flutter/flutter/blob/84a1e904f44f9b0e9c4510138010edcc653163f8/packages/flutter_localizations/pubspec.yaml#L11 intl: ^0.18.0 rxdart: ^0.27.7 - collection: ^1.17.1 + collection: ^1.18.0 dev_dependencies: flutter_test: sdk: flutter - mockito: ^5.4.0 - build_runner: ^2.4.2 - flutter_lints: ^2.0.1 + mockito: ^5.4.3 + build_runner: ^2.4.7 + flutter_lints: ^3.0.1 diff --git a/test/helper/build_grid_helper.dart b/test/helper/build_grid_helper.dart index 60dc9c808..9f265d765 100644 --- a/test/helper/build_grid_helper.dart +++ b/test/helper/build_grid_helper.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'column_helper.dart'; import 'pluto_widget_test_helper.dart'; diff --git a/test/helper/column_helper.dart b/test/helper/column_helper.dart index ae9e5ae50..fa87ffd21 100644 --- a/test/helper/column_helper.dart +++ b/test/helper/column_helper.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; class ColumnHelper { static List textColumn( diff --git a/test/helper/row_helper.dart b/test/helper/row_helper.dart index 1f128ae14..ba28942e4 100644 --- a/test/helper/row_helper.dart +++ b/test/helper/row_helper.dart @@ -1,6 +1,6 @@ import 'dart:math'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; class RowHelper { /// cell value format : '$columnFieldName value $rowIdx' diff --git a/test/mock/shared_mocks.dart b/test/mock/shared_mocks.dart index 1791e3418..cb52d70d1 100644 --- a/test/mock/shared_mocks.dart +++ b/test/mock/shared_mocks.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/widgets.dart'; import 'package:mockito/annotations.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; @GenerateNiceMocks([ MockSpec(), diff --git a/test/mock/shared_mocks.mocks.dart b/test/mock/shared_mocks.mocks.dart index e52394865..063d83f14 100644 --- a/test/mock/shared_mocks.mocks.dart +++ b/test/mock/shared_mocks.mocks.dart @@ -13,7 +13,7 @@ import 'package:flutter/services.dart' as _i10; import 'package:flutter/src/foundation/assertions.dart' as _i11; import 'package:flutter/src/foundation/diagnostics.dart' as _i8; import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i2; +import 'package:pluto_grid_plus/pluto_grid.dart' as _i2; import 'package:rxdart/rxdart.dart' as _i4; // ignore_for_file: type=lint diff --git a/test/scenario/columns_footer/rendering_test.dart b/test/scenario/columns_footer/rendering_test.dart index fa943cafb..5c2c7deb1 100644 --- a/test/scenario/columns_footer/rendering_test.dart +++ b/test/scenario/columns_footer/rendering_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/configuration/behavior_setting_enter_key_action_test.dart b/test/scenario/configuration/behavior_setting_enter_key_action_test.dart index 43d2186b5..b1ff2d8ad 100644 --- a/test/scenario/configuration/behavior_setting_enter_key_action_test.dart +++ b/test/scenario/configuration/behavior_setting_enter_key_action_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/configuration/behavior_setting_row_height_test.dart b/test/scenario/configuration/behavior_setting_row_height_test.dart index 8fe8380a1..346e40116 100644 --- a/test/scenario/configuration/behavior_setting_row_height_test.dart +++ b/test/scenario/configuration/behavior_setting_row_height_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/editing_cell_state/auto_editing_of_column_test.dart b/test/scenario/editing_cell_state/auto_editing_of_column_test.dart index d3c80b504..fdb78c24b 100644 --- a/test/scenario/editing_cell_state/auto_editing_of_column_test.dart +++ b/test/scenario/editing_cell_state/auto_editing_of_column_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/pluto_widget_test_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/editing_cell_state/auto_editing_test.dart b/test/scenario/editing_cell_state/auto_editing_test.dart index b48bdff6f..56cf7de6c 100644 --- a/test/scenario/editing_cell_state/auto_editing_test.dart +++ b/test/scenario/editing_cell_state/auto_editing_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/editing_cell_state/number_cell_editing_test.dart b/test/scenario/editing_cell_state/number_cell_editing_test.dart index ad0395b93..ab37fe4e0 100644 --- a/test/scenario/editing_cell_state/number_cell_editing_test.dart +++ b/test/scenario/editing_cell_state/number_cell_editing_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../mock/mock_methods.dart'; diff --git a/test/scenario/filtering/currency_filtering_test.dart b/test/scenario/filtering/currency_filtering_test.dart index 3647b7e7f..2b3bf8182 100644 --- a/test/scenario/filtering/currency_filtering_test.dart +++ b/test/scenario/filtering/currency_filtering_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; void main() { late PlutoGridStateManager stateManager; diff --git a/test/scenario/filtering/number_filtering_test.dart b/test/scenario/filtering/number_filtering_test.dart index 5384821a8..1cc4214b6 100644 --- a/test/scenario/filtering/number_filtering_test.dart +++ b/test/scenario/filtering/number_filtering_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; void main() { late PlutoGridStateManager stateManager; diff --git a/test/scenario/filtering/text_filtering_test.dart b/test/scenario/filtering/text_filtering_test.dart index a27360748..6292cc07f 100644 --- a/test/scenario/filtering/text_filtering_test.dart +++ b/test/scenario/filtering/text_filtering_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/freeze_columns/behavior_absence_freeze_column_test.dart b/test/scenario/freeze_columns/behavior_absence_freeze_column_test.dart index 1d33fa425..2c257833a 100644 --- a/test/scenario/freeze_columns/behavior_absence_freeze_column_test.dart +++ b/test/scenario/freeze_columns/behavior_absence_freeze_column_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/freeze_columns/behavior_presence_freeze_column_test.dart b/test/scenario/freeze_columns/behavior_presence_freeze_column_test.dart index 0f46105f3..cb67ced2d 100644 --- a/test/scenario/freeze_columns/behavior_presence_freeze_column_test.dart +++ b/test/scenario/freeze_columns/behavior_presence_freeze_column_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/grid_mode/multi_select_mode_test.dart b/test/scenario/grid_mode/multi_select_mode_test.dart index f03f920b1..c8febd5bb 100644 --- a/test/scenario/grid_mode/multi_select_mode_test.dart +++ b/test/scenario/grid_mode/multi_select_mode_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/build_grid_helper.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/grid_mode/select_mode_test.dart b/test/scenario/grid_mode/select_mode_test.dart index fdf8d6ef6..751dd38df 100644 --- a/test/scenario/grid_mode/select_mode_test.dart +++ b/test/scenario/grid_mode/select_mode_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/grid_mode/select_with_one_tap_test.dart b/test/scenario/grid_mode/select_with_one_tap_test.dart index d09fd80cd..dc368b48a 100644 --- a/test/scenario/grid_mode/select_with_one_tap_test.dart +++ b/test/scenario/grid_mode/select_with_one_tap_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/grouping_columns/rendering_test.dart b/test/scenario/grouping_columns/rendering_test.dart index cc3656535..80e30cfde 100644 --- a/test/scenario/grouping_columns/rendering_test.dart +++ b/test/scenario/grouping_columns/rendering_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/grouping_rows/checkbox_test.dart b/test/scenario/grouping_rows/checkbox_test.dart index 054002d8e..630827db1 100644 --- a/test/scenario/grouping_rows/checkbox_test.dart +++ b/test/scenario/grouping_rows/checkbox_test.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/test_helper_util.dart'; diff --git a/test/scenario/grouping_rows/on_toggled_test.dart b/test/scenario/grouping_rows/on_toggled_test.dart index 23845e519..e28201f85 100644 --- a/test/scenario/grouping_rows/on_toggled_test.dart +++ b/test/scenario/grouping_rows/on_toggled_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/test_helper_util.dart'; diff --git a/test/scenario/grouping_rows/rendering_test.dart b/test/scenario/grouping_rows/rendering_test.dart index 809d45b6c..af1c8aa9a 100644 --- a/test/scenario/grouping_rows/rendering_test.dart +++ b/test/scenario/grouping_rows/rendering_test.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; import '../../helper/test_helper_util.dart'; diff --git a/test/scenario/grouping_rows/sorting_tree_group_test.dart b/test/scenario/grouping_rows/sorting_tree_group_test.dart index 0d2ffa282..cf90089dd 100644 --- a/test/scenario/grouping_rows/sorting_tree_group_test.dart +++ b/test/scenario/grouping_rows/sorting_tree_group_test.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/test_helper_util.dart'; diff --git a/test/scenario/hide_columns/hide_column_test.dart b/test/scenario/hide_columns/hide_column_test.dart index cf57da810..9d39bcaf1 100644 --- a/test/scenario/hide_columns/hide_column_test.dart +++ b/test/scenario/hide_columns/hide_column_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/insert_columns/rendering_test.dart b/test/scenario/insert_columns/rendering_test.dart index d35c5078f..5a966d652 100644 --- a/test/scenario/insert_columns/rendering_test.dart +++ b/test/scenario/insert_columns/rendering_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/keyboard/behavior_ctrl_a_key_test.dart b/test/scenario/keyboard/behavior_ctrl_a_key_test.dart index 9251a83b2..81472cd7e 100644 --- a/test/scenario/keyboard/behavior_ctrl_a_key_test.dart +++ b/test/scenario/keyboard/behavior_ctrl_a_key_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_enter_key_test.dart b/test/scenario/keyboard/behavior_enter_key_test.dart index baa511356..5a8937d97 100644 --- a/test/scenario/keyboard/behavior_enter_key_test.dart +++ b/test/scenario/keyboard/behavior_enter_key_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_esc_key_test.dart b/test/scenario/keyboard/behavior_esc_key_test.dart index 5ac75cf47..b302b95da 100644 --- a/test/scenario/keyboard/behavior_esc_key_test.dart +++ b/test/scenario/keyboard/behavior_esc_key_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_f2_key_test.dart b/test/scenario/keyboard/behavior_f2_key_test.dart index ee4a8e182..4dd2253fd 100644 --- a/test/scenario/keyboard/behavior_f2_key_test.dart +++ b/test/scenario/keyboard/behavior_f2_key_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_f3_key_test.dart b/test/scenario/keyboard/behavior_f3_key_test.dart index fb520ca1d..faf349613 100644 --- a/test/scenario/keyboard/behavior_f3_key_test.dart +++ b/test/scenario/keyboard/behavior_f3_key_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_moving_column_filter_test.dart b/test/scenario/keyboard/behavior_moving_column_filter_test.dart index dc4e8cf9a..17f8c748b 100644 --- a/test/scenario/keyboard/behavior_moving_column_filter_test.dart +++ b/test/scenario/keyboard/behavior_moving_column_filter_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_tab_key_test.dart b/test/scenario/keyboard/behavior_tab_key_test.dart index e19119d8a..9f88ad568 100644 --- a/test/scenario/keyboard/behavior_tab_key_test.dart +++ b/test/scenario/keyboard/behavior_tab_key_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_to_call_popup_with_keyboard_test.dart b/test/scenario/keyboard/behavior_to_call_popup_with_keyboard_test.dart index dbd2cd45c..3d2f50b3f 100644 --- a/test/scenario/keyboard/behavior_to_call_popup_with_keyboard_test.dart +++ b/test/scenario/keyboard/behavior_to_call_popup_with_keyboard_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/custom_shortcut_test.dart b/test/scenario/keyboard/custom_shortcut_test.dart index d53b9632a..d738d16e6 100644 --- a/test/scenario/keyboard/custom_shortcut_test.dart +++ b/test/scenario/keyboard/custom_shortcut_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/layout/layout_test.dart b/test/scenario/layout/layout_test.dart index a58db8753..f77b3a4e5 100644 --- a/test/scenario/layout/layout_test.dart +++ b/test/scenario/layout/layout_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/paginate_rows/button_navigation_test.dart b/test/scenario/paginate_rows/button_navigation_test.dart index 07bcd1eb9..9b7f9c9cb 100644 --- a/test/scenario/paginate_rows/button_navigation_test.dart +++ b/test/scenario/paginate_rows/button_navigation_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/paginate_rows/infinity_scroll_rows_test.dart b/test/scenario/paginate_rows/infinity_scroll_rows_test.dart index 0214cc49f..d7ba96283 100644 --- a/test/scenario/paginate_rows/infinity_scroll_rows_test.dart +++ b/test/scenario/paginate_rows/infinity_scroll_rows_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/paginate_rows/lazy_pagination_test.dart b/test/scenario/paginate_rows/lazy_pagination_test.dart index 877c8bd8c..ad2a03cc3 100644 --- a/test/scenario/paginate_rows/lazy_pagination_test.dart +++ b/test/scenario/paginate_rows/lazy_pagination_test.dart @@ -3,8 +3,8 @@ import 'dart:math'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/paginate_rows/sorting_test.dart b/test/scenario/paginate_rows/sorting_test.dart index 89abfa06f..02617e994 100644 --- a/test/scenario/paginate_rows/sorting_test.dart +++ b/test/scenario/paginate_rows/sorting_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/pluto_base_cell.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/pluto_base_cell.dart'; void main() { late PlutoGridStateManager stateManager; diff --git a/test/scenario/resizing_window/layout_test.dart b/test/scenario/resizing_window/layout_test.dart index e2be5ae02..ad9b7e8c9 100644 --- a/test/scenario/resizing_window/layout_test.dart +++ b/test/scenario/resizing_window/layout_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/selecting/behavior_after_selecting_cells_test.dart b/test/scenario/selecting/behavior_after_selecting_cells_test.dart index 0290e353a..97f0d008b 100644 --- a/test/scenario/selecting/behavior_after_selecting_cells_test.dart +++ b/test/scenario/selecting/behavior_after_selecting_cells_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/selecting/behavior_after_selecting_rows_test.dart b/test/scenario/selecting/behavior_after_selecting_rows_test.dart index 036be94f6..83ffa5003 100644 --- a/test/scenario/selecting/behavior_after_selecting_rows_test.dart +++ b/test/scenario/selecting/behavior_after_selecting_rows_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/selecting/selecting_cells_by_long_tap_test.dart b/test/scenario/selecting/selecting_cells_by_long_tap_test.dart index d65b7da71..b6ae7ac52 100644 --- a/test/scenario/selecting/selecting_cells_by_long_tap_test.dart +++ b/test/scenario/selecting/selecting_cells_by_long_tap_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/build_grid_helper.dart'; diff --git a/test/src/helper/filter_helper_test.dart b/test/src/helper/filter_helper_test.dart index 074bbe2bd..f0f62457e 100644 --- a/test/src/helper/filter_helper_test.dart +++ b/test/src/helper/filter_helper_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/src/helper/filtered_list_test.dart b/test/src/helper/filtered_list_test.dart index b1c0148a3..b9cdbf11e 100644 --- a/test/src/helper/filtered_list_test.dart +++ b/test/src/helper/filtered_list_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; void main() { group('Int List 를 짝수로 필터링.', () { diff --git a/test/src/helper/pluto_aggregate_helper_test.dart b/test/src/helper/pluto_aggregate_helper_test.dart index 96f630a94..830be2054 100644 --- a/test/src/helper/pluto_aggregate_helper_test.dart +++ b/test/src/helper/pluto_aggregate_helper_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; void main() { group('sum', () { diff --git a/test/src/helper/pluto_column_group_helper_test.dart b/test/src/helper/pluto_column_group_helper_test.dart index 778237f5c..1ee7c208f 100644 --- a/test/src/helper/pluto_column_group_helper_test.dart +++ b/test/src/helper/pluto_column_group_helper_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; diff --git a/test/src/helper/pluto_date_time_helper_test.dart b/test/src/helper/pluto_date_time_helper_test.dart index 2be1bc0f4..013c3b4ee 100644 --- a/test/src/helper/pluto_date_time_helper_test.dart +++ b/test/src/helper/pluto_date_time_helper_test.dart @@ -1,7 +1,7 @@ // ignore_for_file: slash_for_doc_comments import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; /** 2022. 11 월 달력 diff --git a/test/src/helper/pluto_debounce_test.dart b/test/src/helper/pluto_debounce_test.dart index 5fc14b6df..91f764ab3 100644 --- a/test/src/helper/pluto_debounce_test.dart +++ b/test/src/helper/pluto_debounce_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; void main() { group('PlutoDebounce', () { diff --git a/test/src/helper/pluto_key_manager_event_test.dart b/test/src/helper/pluto_key_manager_event_test.dart index f0907a12d..e35c81742 100644 --- a/test/src/helper/pluto_key_manager_event_test.dart +++ b/test/src/helper/pluto_key_manager_event_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; void main() { late FocusNode focusNode; diff --git a/test/src/helper/pluto_row_group_delegate_test.dart b/test/src/helper/pluto_row_group_delegate_test.dart index 05196b9ba..090dab2f7 100644 --- a/test/src/helper/pluto_row_group_delegate_test.dart +++ b/test/src/helper/pluto_row_group_delegate_test.dart @@ -1,7 +1,7 @@ // ignore_for_file: non_constant_identifier_names import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; void main() { PlutoRow createRow( diff --git a/test/src/helper/pluto_row_group_helper_test.dart b/test/src/helper/pluto_row_group_helper_test.dart index 02b90a9cc..e1a1e4ef4 100644 --- a/test/src/helper/pluto_row_group_helper_test.dart +++ b/test/src/helper/pluto_row_group_helper_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../mock/mock_methods.dart'; diff --git a/test/src/helper/pluto_size_helper_test.dart b/test/src/helper/pluto_size_helper_test.dart index b082f4da1..4623b081d 100644 --- a/test/src/helper/pluto_size_helper_test.dart +++ b/test/src/helper/pluto_size_helper_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; class _ResizeItem { _ResizeItem({ diff --git a/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart b/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart index 2d78cb017..6c659edde 100644 --- a/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart +++ b/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../matcher/pluto_object_matcher.dart'; diff --git a/test/src/manager/event/pluto_grid_scroll_update_event_test.dart b/test/src/manager/event/pluto_grid_scroll_update_event_test.dart index 39612e186..85c9f0fcf 100644 --- a/test/src/manager/event/pluto_grid_scroll_update_event_test.dart +++ b/test/src/manager/event/pluto_grid_scroll_update_event_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/manager/pluto_grid_key_manager_test.dart b/test/src/manager/pluto_grid_key_manager_test.dart index 57634f5e1..cf0b5c625 100644 --- a/test/src/manager/pluto_grid_key_manager_test.dart +++ b/test/src/manager/pluto_grid_key_manager_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/pluto_widget_test_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/src/manager/pluto_grid_state_manager_test.dart b/test/src/manager/pluto_grid_state_manager_test.dart index e5a882c19..76c2c0cba 100644 --- a/test/src/manager/pluto_grid_state_manager_test.dart +++ b/test/src/manager/pluto_grid_state_manager_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/src/manager/state/cell_state_test.dart b/test/src/manager/state/cell_state_test.dart index 686ecfca7..2935f07c0 100644 --- a/test/src/manager/state/cell_state_test.dart +++ b/test/src/manager/state/cell_state_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/column_sizing_state_test.dart b/test/src/manager/state/column_sizing_state_test.dart index 01ba26e94..e251e3527 100644 --- a/test/src/manager/state/column_sizing_state_test.dart +++ b/test/src/manager/state/column_sizing_state_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/manager/state/column_state_test.dart b/test/src/manager/state/column_state_test.dart index 3f077e2f1..5e252f52b 100644 --- a/test/src/manager/state/column_state_test.dart +++ b/test/src/manager/state/column_state_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/dragging_row_state_test.dart b/test/src/manager/state/dragging_row_state_test.dart index 3ef2317b1..3570087a3 100644 --- a/test/src/manager/state/dragging_row_state_test.dart +++ b/test/src/manager/state/dragging_row_state_test.dart @@ -1,7 +1,7 @@ import 'package:collection/collection.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/editing_state_test.dart b/test/src/manager/state/editing_state_test.dart index 57f13cf60..f90738da3 100644 --- a/test/src/manager/state/editing_state_test.dart +++ b/test/src/manager/state/editing_state_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/filtering_row_state_test.dart b/test/src/manager/state/filtering_row_state_test.dart index 8523cd231..b1ea308fe 100644 --- a/test/src/manager/state/filtering_row_state_test.dart +++ b/test/src/manager/state/filtering_row_state_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/keyboard_state_test.dart b/test/src/manager/state/keyboard_state_test.dart index 71c9839f2..7b326165b 100644 --- a/test/src/manager/state/keyboard_state_test.dart +++ b/test/src/manager/state/keyboard_state_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/manager/state/layout_state_test.dart b/test/src/manager/state/layout_state_test.dart index fa883999f..150bcb7c7 100644 --- a/test/src/manager/state/layout_state_test.dart +++ b/test/src/manager/state/layout_state_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/manager/state/row_group_state_test.dart b/test/src/manager/state/row_group_state_test.dart index 4d1fd54eb..9b6614216 100644 --- a/test/src/manager/state/row_group_state_test.dart +++ b/test/src/manager/state/row_group_state_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/manager/state/row_state_test.dart b/test/src/manager/state/row_state_test.dart index 2f2d7b11a..7b3525a68 100644 --- a/test/src/manager/state/row_state_test.dart +++ b/test/src/manager/state/row_state_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/manager/state/scroll_state_test.dart b/test/src/manager/state/scroll_state_test.dart index 585e601b8..0cd60a41f 100644 --- a/test/src/manager/state/scroll_state_test.dart +++ b/test/src/manager/state/scroll_state_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/selecting_state_test.dart b/test/src/manager/state/selecting_state_test.dart index 814dc0a84..c16399bbb 100644 --- a/test/src/manager/state/selecting_state_test.dart +++ b/test/src/manager/state/selecting_state_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/visibility_state_test.dart b/test/src/manager/state/visibility_state_test.dart index 3bd8daed4..fc5b3425e 100644 --- a/test/src/manager/state/visibility_state_test.dart +++ b/test/src/manager/state/visibility_state_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/model/pluto_column_group_test.dart b/test/src/model/pluto_column_group_test.dart index d445501ec..18a74af6c 100644 --- a/test/src/model/pluto_column_group_test.dart +++ b/test/src/model/pluto_column_group_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; void main() { test('fields 가 null 이면 children 이 null 인 경우 assert 에러가 발생 되어야 한다.', () { diff --git a/test/src/model/pluto_column_test.dart b/test/src/model/pluto_column_test.dart index bcb1ab773..5326d1fe8 100644 --- a/test/src/model/pluto_column_test.dart +++ b/test/src/model/pluto_column_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/row_helper.dart'; diff --git a/test/src/model/pluto_column_type_test.dart b/test/src/model/pluto_column_type_test.dart index ab2d2257a..5cda8464a 100644 --- a/test/src/model/pluto_column_type_test.dart +++ b/test/src/model/pluto_column_type_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; void main() { group('text', () { diff --git a/test/src/model/pluto_row_test.dart b/test/src/model/pluto_row_test.dart index f193959ab..d4bf00477 100644 --- a/test/src/model/pluto_row_test.dart +++ b/test/src/model/pluto_row_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../matcher/pluto_object_matcher.dart'; diff --git a/test/src/plugin/pluto_aggregate_column_footer_test.dart b/test/src/plugin/pluto_aggregate_column_footer_test.dart index ce45c7f39..9c13b005b 100644 --- a/test/src/plugin/pluto_aggregate_column_footer_test.dart +++ b/test/src/plugin/pluto_aggregate_column_footer_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'package:rxdart/rxdart.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/plugin/pluto_pagination_test.dart b/test/src/plugin/pluto_pagination_test.dart index 03af13cf8..2af7ce23a 100644 --- a/test/src/plugin/pluto_pagination_test.dart +++ b/test/src/plugin/pluto_pagination_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import 'package:rxdart/rxdart.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/pluto_dual_grid_popup_test.dart b/test/src/pluto_dual_grid_popup_test.dart index 14cf2c9a7..81b655216 100644 --- a/test/src/pluto_dual_grid_popup_test.dart +++ b/test/src/pluto_dual_grid_popup_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../helper/column_helper.dart'; import '../helper/row_helper.dart'; diff --git a/test/src/pluto_dual_grid_test.dart b/test/src/pluto_dual_grid_test.dart index 788239ed7..9aaa9fe3a 100644 --- a/test/src/pluto_dual_grid_test.dart +++ b/test/src/pluto_dual_grid_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../helper/column_helper.dart'; import '../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/pluto_grid_configuration_test.dart b/test/src/pluto_grid_configuration_test.dart index 0f13e8d6e..d4212e037 100644 --- a/test/src/pluto_grid_configuration_test.dart +++ b/test/src/pluto_grid_configuration_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; void main() { testWidgets( diff --git a/test/src/pluto_grid_date_picker_test.dart b/test/src/pluto_grid_date_picker_test.dart index 540d8a704..2054867f8 100644 --- a/test/src/pluto_grid_date_picker_test.dart +++ b/test/src/pluto_grid_date_picker_test.dart @@ -3,8 +3,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:intl/intl.dart' as intl; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../helper/pluto_widget_test_helper.dart'; import '../matcher/pluto_object_matcher.dart'; diff --git a/test/src/pluto_grid_popup_test.dart b/test/src/pluto_grid_popup_test.dart index 6ed495241..e1625e5cf 100644 --- a/test/src/pluto_grid_popup_test.dart +++ b/test/src/pluto_grid_popup_test.dart @@ -3,8 +3,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../helper/column_helper.dart'; import '../helper/row_helper.dart'; diff --git a/test/src/pluto_grid_test.dart b/test/src/pluto_grid_test.dart index 7d1e976b0..9db4e728e 100644 --- a/test/src/pluto_grid_test.dart +++ b/test/src/pluto_grid_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../helper/column_helper.dart'; import '../helper/row_helper.dart'; diff --git a/test/src/ui/cells/pluto_currency_cell_test.dart b/test/src/ui/cells/pluto_currency_cell_test.dart index 7b08494e3..0a20e19c2 100644 --- a/test/src/ui/cells/pluto_currency_cell_test.dart +++ b/test/src/ui/cells/pluto_currency_cell_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../helper/row_helper.dart'; import '../../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/ui/cells/pluto_date_cell_test.dart b/test/src/ui/cells/pluto_date_cell_test.dart index 79cee3ce5..430e00c9d 100644 --- a/test/src/ui/cells/pluto_date_cell_test.dart +++ b/test/src/ui/cells/pluto_date_cell_test.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../helper/pluto_widget_test_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/ui/cells/pluto_default_cell_test.dart b/test/src/ui/cells/pluto_default_cell_test.dart index 886a98a48..ba69d4339 100644 --- a/test/src/ui/cells/pluto_default_cell_test.dart +++ b/test/src/ui/cells/pluto_default_cell_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; import '../../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/ui/cells/pluto_number_cell_test.dart b/test/src/ui/cells/pluto_number_cell_test.dart index c50aee5e2..5ca8cd83c 100644 --- a/test/src/ui/cells/pluto_number_cell_test.dart +++ b/test/src/ui/cells/pluto_number_cell_test.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:intl/intl.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../helper/pluto_widget_test_helper.dart'; import '../../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/ui/cells/pluto_select_cell_test.dart b/test/src/ui/cells/pluto_select_cell_test.dart index 37cef6bb9..c766792cf 100644 --- a/test/src/ui/cells/pluto_select_cell_test.dart +++ b/test/src/ui/cells/pluto_select_cell_test.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../helper/pluto_widget_test_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/ui/cells/pluto_text_cell_test.dart b/test/src/ui/cells/pluto_text_cell_test.dart index 330a94e3e..96b7e82b0 100644 --- a/test/src/ui/cells/pluto_text_cell_test.dart +++ b/test/src/ui/cells/pluto_text_cell_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/ui/cells/pluto_time_cell_test.dart b/test/src/ui/cells/pluto_time_cell_test.dart index 38d625b04..88790a9fb 100644 --- a/test/src/ui/cells/pluto_time_cell_test.dart +++ b/test/src/ui/cells/pluto_time_cell_test.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../helper/pluto_widget_test_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/ui/columns/pluto_column_filter_test.dart b/test/src/ui/columns/pluto_column_filter_test.dart index 587b45948..8174595b7 100644 --- a/test/src/ui/columns/pluto_column_filter_test.dart +++ b/test/src/ui/columns/pluto_column_filter_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; import '../../../matcher/pluto_object_matcher.dart'; diff --git a/test/src/ui/columns/pluto_column_title_test.dart b/test/src/ui/columns/pluto_column_title_test.dart index 6cf9265a1..df56cc21b 100644 --- a/test/src/ui/columns/pluto_column_title_test.dart +++ b/test/src/ui/columns/pluto_column_title_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; import '../../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/ui/miscellaneous/pluto_visibility_layout_test.dart b/test/src/ui/miscellaneous/pluto_visibility_layout_test.dart index cda05eef4..1978afbb4 100644 --- a/test/src/ui/miscellaneous/pluto_visibility_layout_test.dart +++ b/test/src/ui/miscellaneous/pluto_visibility_layout_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/src/ui/miscellaneous/pluto_visibility_layout.dart'; +import 'package:pluto_grid_plus/src/ui/miscellaneous/pluto_visibility_layout.dart'; import '../../../mock/shared_mocks.mocks.dart'; @@ -11,8 +11,7 @@ const double defaultChildWidth = 200; class _TestWidgetWrapper extends StatefulWidget { const _TestWidgetWrapper({ required this.child, - Key? key, - }) : super(key: key); + }); final Widget child; diff --git a/test/src/ui/pluto_base_cell_test.dart b/test/src/ui/pluto_base_cell_test.dart index 9a0217024..c8ddb30bb 100644 --- a/test/src/ui/pluto_base_cell_test.dart +++ b/test/src/ui/pluto_base_cell_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/ui/pluto_base_column_footer_test.dart b/test/src/ui/pluto_base_column_footer_test.dart index 038e270d3..5db8e7da2 100644 --- a/test/src/ui/pluto_base_column_footer_test.dart +++ b/test/src/ui/pluto_base_column_footer_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/pluto_base_column_footer.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/pluto_base_column_footer.dart'; import '../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/ui/pluto_base_column_group_test.dart b/test/src/ui/pluto_base_column_group_test.dart index fae712807..507b8fb35 100644 --- a/test/src/ui/pluto_base_column_group_test.dart +++ b/test/src/ui/pluto_base_column_group_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; import '../../helper/column_helper.dart'; diff --git a/test/src/ui/pluto_base_row_test.dart b/test/src/ui/pluto_base_row_test.dart index 342cb9d4e..16ea353c4 100644 --- a/test/src/ui/pluto_base_row_test.dart +++ b/test/src/ui/pluto_base_row_test.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid/pluto_grid.dart'; -import 'package:pluto_grid/src/ui/ui.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; import '../../helper/column_helper.dart'; diff --git a/test/src/widgets/pluto_scaled_checkbox_test.dart b/test/src/widgets/pluto_scaled_checkbox_test.dart index 451caec27..d2ceac648 100644 --- a/test/src/widgets/pluto_scaled_checkbox_test.dart +++ b/test/src/widgets/pluto_scaled_checkbox_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; void main() { testWidgets( diff --git a/test/src/widgets/pluto_scrollbar_test.dart b/test/src/widgets/pluto_scrollbar_test.dart index 3343445f6..69350e548 100644 --- a/test/src/widgets/pluto_scrollbar_test.dart +++ b/test/src/widgets/pluto_scrollbar_test.dart @@ -2,7 +2,7 @@ import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; import '../../helper/test_helper_util.dart'; diff --git a/test/src/widgets/pluto_shadow_container_test.dart b/test/src/widgets/pluto_shadow_container_test.dart index f9b7d9ba0..4fbf96635 100644 --- a/test/src/widgets/pluto_shadow_container_test.dart +++ b/test/src/widgets/pluto_shadow_container_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid.dart'; void main() { testWidgets( From 74b3f98b412324b4373f5b3291032588a693cb56 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Thu, 7 Dec 2023 23:46:01 +0300 Subject: [PATCH 03/80] update version to 8.0.0 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7fafa2ae..6eddf3267 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [8.0.0] - 2023. 7. 12 +* Change Package name to pluto_grid_plus +* Upgrade the packages to the latest version. + ## [7.0.2] - 2023. 5. 13 * Add Japanese, Turkish languages. From 9ac783d003d68a69a55b45dd5e8ff6c5e3ba87a4 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Thu, 7 Dec 2023 23:53:00 +0300 Subject: [PATCH 04/80] update enviroment sdk --- demo/pubspec.yaml | 2 +- example/pubspec.yaml | 2 +- packages/pluto_grid_export/pubspec.yaml | 2 +- pubspec.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/pubspec.yaml b/demo/pubspec.yaml index 638088140..581bc27ec 100644 --- a/demo/pubspec.yaml +++ b/demo/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=2.17.0 <4.0.0" dependencies: flutter: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 945d85d7b..6c71292c3 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=2.17.0 <4.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/packages/pluto_grid_export/pubspec.yaml b/packages/pluto_grid_export/pubspec.yaml index aaa01cf5a..f6f528d51 100644 --- a/packages/pluto_grid_export/pubspec.yaml +++ b/packages/pluto_grid_export/pubspec.yaml @@ -6,7 +6,7 @@ repository: https://github.com/bosskmk/pluto_grid/tree/master/packages/pluto_gri publish_to: none environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=2.17.0 <4.0.0" flutter: ">=2.5.0" dependencies: diff --git a/pubspec.yaml b/pubspec.yaml index f956ee8e2..49323f8d5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://pluto.weblaze.dev repository: https://github.com/doonfrs/pluto_grid_plus environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=2.17.0 <4.0.0" flutter: ">=2.5.0" dependencies: From 6f5f15dc4031828be9d8d16221bd6cda2e27c998 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Thu, 7 Dec 2023 23:53:25 +0300 Subject: [PATCH 05/80] chand main dart file from pluto_grid to pluto_grid_plus.dart --- demo/lib/dummy_data/development.dart | 2 +- demo/lib/dummy_data/quick_start.dart | 2 +- demo/lib/screen/development_screen.dart | 2 +- demo/lib/screen/empty_screen.dart | 2 +- demo/lib/screen/feature/add_and_remove_column_row_screen.dart | 2 +- demo/lib/screen/feature/add_rows_asynchronously.dart | 2 +- demo/lib/screen/feature/cell_renderer_screen.dart | 2 +- demo/lib/screen/feature/cell_selection_screen.dart | 2 +- demo/lib/screen/feature/column_filtering_screen.dart | 2 +- demo/lib/screen/feature/column_footer_screen.dart | 2 +- demo/lib/screen/feature/column_freezing_screen.dart | 2 +- demo/lib/screen/feature/column_group_screen.dart | 2 +- demo/lib/screen/feature/column_hiding_screen.dart | 2 +- demo/lib/screen/feature/column_menu_screen.dart | 2 +- demo/lib/screen/feature/column_moving_screen.dart | 2 +- demo/lib/screen/feature/column_resizing_screen.dart | 2 +- demo/lib/screen/feature/column_sorting_screen.dart | 2 +- demo/lib/screen/feature/copy_and_paste_screen.dart | 2 +- demo/lib/screen/feature/currency_type_column_screen.dart | 2 +- demo/lib/screen/feature/dark_mode_screen.dart | 2 +- demo/lib/screen/feature/date_type_column_screen.dart | 2 +- demo/lib/screen/feature/dual_mode_screen.dart | 2 +- demo/lib/screen/feature/editing_state_screen.dart | 2 +- demo/lib/screen/feature/export_screen.dart | 2 +- demo/lib/screen/feature/grid_as_popup_screen.dart | 2 +- demo/lib/screen/feature/listing_mode_screen.dart | 2 +- demo/lib/screen/feature/moving_screen.dart | 2 +- demo/lib/screen/feature/number_type_column_screen.dart | 2 +- demo/lib/screen/feature/row_color_screen.dart | 2 +- demo/lib/screen/feature/row_group_screen.dart | 4 ++-- demo/lib/screen/feature/row_infinity_scroll_screen.dart | 2 +- demo/lib/screen/feature/row_lazy_pagination_screen.dart | 2 +- demo/lib/screen/feature/row_moving_screen.dart | 2 +- demo/lib/screen/feature/row_pagination_screen.dart | 2 +- demo/lib/screen/feature/row_selection_screen.dart | 2 +- demo/lib/screen/feature/row_with_checkbox_screen.dart | 2 +- demo/lib/screen/feature/rtl_screen.dart | 2 +- demo/lib/screen/feature/selection_type_column_screen.dart | 2 +- demo/lib/screen/feature/text_type_column_screen.dart | 2 +- demo/lib/screen/feature/time_type_column_screen.dart | 2 +- demo/lib/screen/feature/value_formatter_screen.dart | 2 +- example/lib/main.dart | 2 +- lib/{pluto_grid.dart => pluto_grid_plus.dart} | 2 +- lib/src/helper/filter_helper.dart | 2 +- lib/src/helper/pluto_aggregate_helper.dart | 2 +- lib/src/helper/pluto_column_group_helper.dart | 2 +- lib/src/helper/pluto_row_group_delegate.dart | 2 +- lib/src/helper/pluto_row_group_helper.dart | 2 +- lib/src/helper/show_column_menu.dart | 2 +- .../event/pluto_grid_cannot_move_current_cell_event.dart | 2 +- lib/src/manager/event/pluto_grid_cell_gesture_event.dart | 2 +- .../manager/event/pluto_grid_change_column_filter_event.dart | 2 +- .../manager/event/pluto_grid_change_column_sort_event.dart | 2 +- lib/src/manager/event/pluto_grid_drag_rows_event.dart | 2 +- lib/src/manager/event/pluto_grid_event.dart | 2 +- lib/src/manager/event/pluto_grid_scroll_update_event.dart | 2 +- lib/src/manager/event/pluto_grid_set_column_filter_event.dart | 2 +- lib/src/manager/pluto_change_notifier_filter.dart | 2 +- lib/src/manager/pluto_grid_event_manager.dart | 2 +- lib/src/manager/pluto_grid_key_manager.dart | 4 ++-- lib/src/manager/pluto_grid_state_manager.dart | 2 +- lib/src/manager/shortcut/pluto_grid_shortcut.dart | 2 +- lib/src/manager/shortcut/pluto_grid_shortcut_action.dart | 2 +- lib/src/manager/state/cell_state.dart | 2 +- lib/src/manager/state/column_group_state.dart | 2 +- lib/src/manager/state/column_sizing_state.dart | 2 +- lib/src/manager/state/column_state.dart | 2 +- lib/src/manager/state/dragging_row_state.dart | 2 +- lib/src/manager/state/editing_state.dart | 2 +- lib/src/manager/state/filtering_row_state.dart | 2 +- lib/src/manager/state/focus_state.dart | 2 +- lib/src/manager/state/grid_state.dart | 2 +- lib/src/manager/state/keyboard_state.dart | 2 +- lib/src/manager/state/layout_state.dart | 2 +- lib/src/manager/state/pagination_row_state.dart | 2 +- lib/src/manager/state/row_group_state.dart | 2 +- lib/src/manager/state/row_state.dart | 2 +- lib/src/manager/state/scroll_state.dart | 2 +- lib/src/manager/state/selecting_state.dart | 2 +- lib/src/manager/state/visibility_layout_state.dart | 2 +- lib/src/model/pluto_cell.dart | 2 +- lib/src/model/pluto_column.dart | 2 +- lib/src/model/pluto_column_group.dart | 2 +- lib/src/model/pluto_row.dart | 2 +- lib/src/model/pluto_row_type.dart | 2 +- lib/src/plugin/pluto_aggregate_column_footer.dart | 2 +- lib/src/plugin/pluto_infinity_scroll_rows.dart | 2 +- lib/src/plugin/pluto_lazy_pagination.dart | 2 +- lib/src/plugin/pluto_pagination.dart | 2 +- lib/src/pluto_dual_grid.dart | 2 +- lib/src/pluto_dual_grid_popup.dart | 2 +- lib/src/pluto_grid.dart | 2 +- lib/src/pluto_grid_configuration.dart | 2 +- lib/src/pluto_grid_date_picker.dart | 2 +- lib/src/pluto_grid_popup.dart | 2 +- lib/src/ui/cells/pluto_currency_cell.dart | 2 +- lib/src/ui/cells/pluto_date_cell.dart | 2 +- lib/src/ui/cells/pluto_default_cell.dart | 2 +- lib/src/ui/cells/pluto_number_cell.dart | 2 +- lib/src/ui/cells/pluto_select_cell.dart | 2 +- lib/src/ui/cells/pluto_text_cell.dart | 2 +- lib/src/ui/cells/pluto_time_cell.dart | 2 +- lib/src/ui/cells/popup_cell.dart | 2 +- lib/src/ui/cells/text_cell.dart | 2 +- lib/src/ui/columns/pluto_column_filter.dart | 2 +- lib/src/ui/columns/pluto_column_title.dart | 2 +- lib/src/ui/miscellaneous/pluto_no_rows_widget.dart | 2 +- lib/src/ui/miscellaneous/pluto_state_with_change.dart | 2 +- lib/src/ui/miscellaneous/pluto_visibility_layout.dart | 2 +- lib/src/ui/pluto_base_cell.dart | 2 +- lib/src/ui/pluto_base_column.dart | 2 +- lib/src/ui/pluto_base_column_footer.dart | 2 +- lib/src/ui/pluto_base_column_group.dart | 2 +- lib/src/ui/pluto_base_row.dart | 2 +- lib/src/ui/pluto_body_columns.dart | 2 +- lib/src/ui/pluto_body_columns_footer.dart | 2 +- lib/src/ui/pluto_body_rows.dart | 2 +- lib/src/ui/pluto_left_frozen_columns.dart | 2 +- lib/src/ui/pluto_left_frozen_columns_footer.dart | 2 +- lib/src/ui/pluto_left_frozen_rows.dart | 2 +- lib/src/ui/pluto_right_frozen_columns.dart | 2 +- lib/src/ui/pluto_right_frozen_columns_footer.dart | 2 +- lib/src/ui/pluto_right_frozen_rows.dart | 2 +- lib/src/widgets/pluto_loading.dart | 2 +- packages/pluto_grid_export/README.md | 2 +- packages/pluto_grid_export/example/lib/main.dart | 2 +- packages/pluto_grid_export/example/pubspec.yaml | 2 +- packages/pluto_grid_export/lib/src/abstract_text_export.dart | 2 +- .../pluto_grid_export/lib/src/csv/pluto_grid_csv_export.dart | 2 +- .../pluto_grid_export/lib/src/pdf/pluto_grid_pdf_export.dart | 2 +- packages/pluto_grid_export/lib/src/pluto_grid_export.dart | 2 +- test/helper/build_grid_helper.dart | 2 +- test/helper/column_helper.dart | 2 +- test/helper/row_helper.dart | 2 +- test/mock/shared_mocks.dart | 2 +- test/mock/shared_mocks.mocks.dart | 2 +- test/scenario/columns_footer/rendering_test.dart | 2 +- .../configuration/behavior_setting_enter_key_action_test.dart | 2 +- .../configuration/behavior_setting_row_height_test.dart | 2 +- .../editing_cell_state/auto_editing_of_column_test.dart | 2 +- test/scenario/editing_cell_state/auto_editing_test.dart | 2 +- .../scenario/editing_cell_state/number_cell_editing_test.dart | 2 +- test/scenario/filtering/currency_filtering_test.dart | 2 +- test/scenario/filtering/number_filtering_test.dart | 2 +- test/scenario/filtering/text_filtering_test.dart | 2 +- .../freeze_columns/behavior_absence_freeze_column_test.dart | 2 +- .../freeze_columns/behavior_presence_freeze_column_test.dart | 2 +- test/scenario/grid_mode/multi_select_mode_test.dart | 2 +- test/scenario/grid_mode/select_mode_test.dart | 2 +- test/scenario/grid_mode/select_with_one_tap_test.dart | 2 +- test/scenario/grouping_columns/rendering_test.dart | 2 +- test/scenario/grouping_rows/checkbox_test.dart | 2 +- test/scenario/grouping_rows/on_toggled_test.dart | 2 +- test/scenario/grouping_rows/rendering_test.dart | 2 +- test/scenario/grouping_rows/sorting_tree_group_test.dart | 2 +- test/scenario/hide_columns/hide_column_test.dart | 2 +- test/scenario/insert_columns/rendering_test.dart | 2 +- test/scenario/keyboard/behavior_ctrl_a_key_test.dart | 2 +- test/scenario/keyboard/behavior_enter_key_test.dart | 2 +- test/scenario/keyboard/behavior_esc_key_test.dart | 2 +- test/scenario/keyboard/behavior_f2_key_test.dart | 2 +- test/scenario/keyboard/behavior_f3_key_test.dart | 2 +- .../scenario/keyboard/behavior_moving_column_filter_test.dart | 2 +- test/scenario/keyboard/behavior_tab_key_test.dart | 2 +- .../keyboard/behavior_to_call_popup_with_keyboard_test.dart | 2 +- test/scenario/keyboard/custom_shortcut_test.dart | 2 +- test/scenario/layout/layout_test.dart | 2 +- test/scenario/paginate_rows/button_navigation_test.dart | 2 +- test/scenario/paginate_rows/infinity_scroll_rows_test.dart | 2 +- test/scenario/paginate_rows/lazy_pagination_test.dart | 2 +- test/scenario/paginate_rows/sorting_test.dart | 2 +- test/scenario/resizing_window/layout_test.dart | 2 +- .../selecting/behavior_after_selecting_cells_test.dart | 2 +- .../selecting/behavior_after_selecting_rows_test.dart | 2 +- test/scenario/selecting/selecting_cells_by_long_tap_test.dart | 2 +- test/src/helper/filter_helper_test.dart | 2 +- test/src/helper/filtered_list_test.dart | 2 +- test/src/helper/pluto_aggregate_helper_test.dart | 2 +- test/src/helper/pluto_column_group_helper_test.dart | 2 +- test/src/helper/pluto_date_time_helper_test.dart | 2 +- test/src/helper/pluto_debounce_test.dart | 2 +- test/src/helper/pluto_key_manager_event_test.dart | 2 +- test/src/helper/pluto_row_group_delegate_test.dart | 2 +- test/src/helper/pluto_row_group_helper_test.dart | 2 +- test/src/helper/pluto_size_helper_test.dart | 2 +- .../src/manager/event/pluto_grid_cell_gesture_event_test.dart | 2 +- .../manager/event/pluto_grid_scroll_update_event_test.dart | 2 +- test/src/manager/pluto_grid_key_manager_test.dart | 2 +- test/src/manager/pluto_grid_state_manager_test.dart | 2 +- test/src/manager/state/cell_state_test.dart | 2 +- test/src/manager/state/column_sizing_state_test.dart | 2 +- test/src/manager/state/column_state_test.dart | 2 +- test/src/manager/state/dragging_row_state_test.dart | 2 +- test/src/manager/state/editing_state_test.dart | 2 +- test/src/manager/state/filtering_row_state_test.dart | 2 +- test/src/manager/state/keyboard_state_test.dart | 2 +- test/src/manager/state/layout_state_test.dart | 2 +- test/src/manager/state/row_group_state_test.dart | 2 +- test/src/manager/state/row_state_test.dart | 2 +- test/src/manager/state/scroll_state_test.dart | 2 +- test/src/manager/state/selecting_state_test.dart | 2 +- test/src/manager/state/visibility_state_test.dart | 2 +- test/src/model/pluto_column_group_test.dart | 2 +- test/src/model/pluto_column_test.dart | 2 +- test/src/model/pluto_column_type_test.dart | 2 +- test/src/model/pluto_row_test.dart | 2 +- test/src/plugin/pluto_aggregate_column_footer_test.dart | 2 +- test/src/plugin/pluto_pagination_test.dart | 2 +- test/src/pluto_dual_grid_popup_test.dart | 2 +- test/src/pluto_dual_grid_test.dart | 2 +- test/src/pluto_grid_configuration_test.dart | 2 +- test/src/pluto_grid_date_picker_test.dart | 2 +- test/src/pluto_grid_popup_test.dart | 2 +- test/src/pluto_grid_test.dart | 2 +- test/src/ui/cells/pluto_currency_cell_test.dart | 2 +- test/src/ui/cells/pluto_date_cell_test.dart | 2 +- test/src/ui/cells/pluto_default_cell_test.dart | 2 +- test/src/ui/cells/pluto_number_cell_test.dart | 2 +- test/src/ui/cells/pluto_select_cell_test.dart | 2 +- test/src/ui/cells/pluto_text_cell_test.dart | 2 +- test/src/ui/cells/pluto_time_cell_test.dart | 2 +- test/src/ui/columns/pluto_column_filter_test.dart | 2 +- test/src/ui/columns/pluto_column_title_test.dart | 2 +- test/src/ui/pluto_base_cell_test.dart | 2 +- test/src/ui/pluto_base_column_footer_test.dart | 2 +- test/src/ui/pluto_base_column_group_test.dart | 2 +- test/src/ui/pluto_base_row_test.dart | 2 +- test/src/widgets/pluto_scaled_checkbox_test.dart | 2 +- test/src/widgets/pluto_scrollbar_test.dart | 2 +- test/src/widgets/pluto_shadow_container_test.dart | 2 +- 230 files changed, 232 insertions(+), 232 deletions(-) rename lib/{pluto_grid.dart => pluto_grid_plus.dart} (99%) diff --git a/demo/lib/dummy_data/development.dart b/demo/lib/dummy_data/development.dart index d45a35675..c659e5131 100644 --- a/demo/lib/dummy_data/development.dart +++ b/demo/lib/dummy_data/development.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:demo/dummy_data/words_multilingual.dart'; import 'package:faker/faker.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; class DummyData { late List columns; diff --git a/demo/lib/dummy_data/quick_start.dart b/demo/lib/dummy_data/quick_start.dart index b89917099..e7063a08a 100644 --- a/demo/lib/dummy_data/quick_start.dart +++ b/demo/lib/dummy_data/quick_start.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; class DummyData { List? columns; diff --git a/demo/lib/screen/development_screen.dart b/demo/lib/screen/development_screen.dart index 60086d8b1..a2e1782fb 100644 --- a/demo/lib/screen/development_screen.dart +++ b/demo/lib/screen/development_screen.dart @@ -1,7 +1,7 @@ import 'package:faker/faker.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_menu_bar/pluto_menu_bar.dart'; import '../dummy_data/development.dart'; diff --git a/demo/lib/screen/empty_screen.dart b/demo/lib/screen/empty_screen.dart index 6f23604d4..9da49ea6a 100644 --- a/demo/lib/screen/empty_screen.dart +++ b/demo/lib/screen/empty_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../dummy_data/development.dart'; diff --git a/demo/lib/screen/feature/add_and_remove_column_row_screen.dart b/demo/lib/screen/feature/add_and_remove_column_row_screen.dart index 2cdd89b8a..819f0ef20 100644 --- a/demo/lib/screen/feature/add_and_remove_column_row_screen.dart +++ b/demo/lib/screen/feature/add_and_remove_column_row_screen.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:faker/faker.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; diff --git a/demo/lib/screen/feature/add_rows_asynchronously.dart b/demo/lib/screen/feature/add_rows_asynchronously.dart index fd7c086bb..9fe9f7f3a 100644 --- a/demo/lib/screen/feature/add_rows_asynchronously.dart +++ b/demo/lib/screen/feature/add_rows_asynchronously.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/cell_renderer_screen.dart b/demo/lib/screen/feature/cell_renderer_screen.dart index 1be588e2a..2c073a462 100644 --- a/demo/lib/screen/feature/cell_renderer_screen.dart +++ b/demo/lib/screen/feature/cell_renderer_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/cell_selection_screen.dart b/demo/lib/screen/feature/cell_selection_screen.dart index fed282a8b..80905ed4f 100644 --- a/demo/lib/screen/feature/cell_selection_screen.dart +++ b/demo/lib/screen/feature/cell_selection_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/column_filtering_screen.dart b/demo/lib/screen/feature/column_filtering_screen.dart index 2724c3e1e..255dda572 100644 --- a/demo/lib/screen/feature/column_filtering_screen.dart +++ b/demo/lib/screen/feature/column_filtering_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/column_footer_screen.dart b/demo/lib/screen/feature/column_footer_screen.dart index 7f08627e3..58b6bec36 100644 --- a/demo/lib/screen/feature/column_footer_screen.dart +++ b/demo/lib/screen/feature/column_footer_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/column_freezing_screen.dart b/demo/lib/screen/feature/column_freezing_screen.dart index 96b1a83b6..2695a474a 100644 --- a/demo/lib/screen/feature/column_freezing_screen.dart +++ b/demo/lib/screen/feature/column_freezing_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/column_group_screen.dart b/demo/lib/screen/feature/column_group_screen.dart index dae2a2007..a8de2597a 100644 --- a/demo/lib/screen/feature/column_group_screen.dart +++ b/demo/lib/screen/feature/column_group_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/column_hiding_screen.dart b/demo/lib/screen/feature/column_hiding_screen.dart index b3c60a857..9725a8648 100644 --- a/demo/lib/screen/feature/column_hiding_screen.dart +++ b/demo/lib/screen/feature/column_hiding_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; diff --git a/demo/lib/screen/feature/column_menu_screen.dart b/demo/lib/screen/feature/column_menu_screen.dart index 6c5f3c378..f0abad817 100644 --- a/demo/lib/screen/feature/column_menu_screen.dart +++ b/demo/lib/screen/feature/column_menu_screen.dart @@ -1,6 +1,6 @@ import 'package:demo/dummy_data/development.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; diff --git a/demo/lib/screen/feature/column_moving_screen.dart b/demo/lib/screen/feature/column_moving_screen.dart index bd62cfd80..712614987 100644 --- a/demo/lib/screen/feature/column_moving_screen.dart +++ b/demo/lib/screen/feature/column_moving_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; diff --git a/demo/lib/screen/feature/column_resizing_screen.dart b/demo/lib/screen/feature/column_resizing_screen.dart index 7d481005c..50dd64a57 100644 --- a/demo/lib/screen/feature/column_resizing_screen.dart +++ b/demo/lib/screen/feature/column_resizing_screen.dart @@ -1,6 +1,6 @@ import 'package:demo/dummy_data/development.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; diff --git a/demo/lib/screen/feature/column_sorting_screen.dart b/demo/lib/screen/feature/column_sorting_screen.dart index c25e02668..930bcc5b1 100644 --- a/demo/lib/screen/feature/column_sorting_screen.dart +++ b/demo/lib/screen/feature/column_sorting_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; diff --git a/demo/lib/screen/feature/copy_and_paste_screen.dart b/demo/lib/screen/feature/copy_and_paste_screen.dart index 250369add..3cb64b61d 100644 --- a/demo/lib/screen/feature/copy_and_paste_screen.dart +++ b/demo/lib/screen/feature/copy_and_paste_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/currency_type_column_screen.dart b/demo/lib/screen/feature/currency_type_column_screen.dart index 16998f682..15cb2c5c8 100644 --- a/demo/lib/screen/feature/currency_type_column_screen.dart +++ b/demo/lib/screen/feature/currency_type_column_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/dark_mode_screen.dart b/demo/lib/screen/feature/dark_mode_screen.dart index fdfd27012..2bea6c963 100644 --- a/demo/lib/screen/feature/dark_mode_screen.dart +++ b/demo/lib/screen/feature/dark_mode_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/date_type_column_screen.dart b/demo/lib/screen/feature/date_type_column_screen.dart index 58f779950..063ffa517 100644 --- a/demo/lib/screen/feature/date_type_column_screen.dart +++ b/demo/lib/screen/feature/date_type_column_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; diff --git a/demo/lib/screen/feature/dual_mode_screen.dart b/demo/lib/screen/feature/dual_mode_screen.dart index afb4a1066..366efa553 100644 --- a/demo/lib/screen/feature/dual_mode_screen.dart +++ b/demo/lib/screen/feature/dual_mode_screen.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:faker/faker.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/editing_state_screen.dart b/demo/lib/screen/feature/editing_state_screen.dart index 13904c74c..ae1dd30db 100644 --- a/demo/lib/screen/feature/editing_state_screen.dart +++ b/demo/lib/screen/feature/editing_state_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/export_screen.dart b/demo/lib/screen/feature/export_screen.dart index 24252ce52..ee68e516d 100644 --- a/demo/lib/screen/feature/export_screen.dart +++ b/demo/lib/screen/feature/export_screen.dart @@ -1,7 +1,7 @@ // ignore_for_file: unused_local_variable import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; // import 'package:pluto_grid_plus_export/pluto_grid_export.dart' as pluto_grid_export; diff --git a/demo/lib/screen/feature/grid_as_popup_screen.dart b/demo/lib/screen/feature/grid_as_popup_screen.dart index b9ccd98d3..d870fcfe9 100644 --- a/demo/lib/screen/feature/grid_as_popup_screen.dart +++ b/demo/lib/screen/feature/grid_as_popup_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/listing_mode_screen.dart b/demo/lib/screen/feature/listing_mode_screen.dart index 967917095..9fb845354 100644 --- a/demo/lib/screen/feature/listing_mode_screen.dart +++ b/demo/lib/screen/feature/listing_mode_screen.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/moving_screen.dart b/demo/lib/screen/feature/moving_screen.dart index 62fef4cf2..cc1a4bcab 100644 --- a/demo/lib/screen/feature/moving_screen.dart +++ b/demo/lib/screen/feature/moving_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/number_type_column_screen.dart b/demo/lib/screen/feature/number_type_column_screen.dart index ca0d7ba3a..9dfbe9ae8 100644 --- a/demo/lib/screen/feature/number_type_column_screen.dart +++ b/demo/lib/screen/feature/number_type_column_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; diff --git a/demo/lib/screen/feature/row_color_screen.dart b/demo/lib/screen/feature/row_color_screen.dart index 5112de341..b3d2bbb92 100644 --- a/demo/lib/screen/feature/row_color_screen.dart +++ b/demo/lib/screen/feature/row_color_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/row_group_screen.dart b/demo/lib/screen/feature/row_group_screen.dart index cf19835fc..0eb95dea3 100644 --- a/demo/lib/screen/feature/row_group_screen.dart +++ b/demo/lib/screen/feature/row_group_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_docs_button.dart'; @@ -89,7 +89,7 @@ class _RowGroupScreenState extends State { children: FilteredList( initialList: [ PlutoRow(cells: { - 'files': PlutoCell(value: 'pluto_grid.dart') + 'files': PlutoCell(value: 'pluto_grid_plus.dart') }), PlutoRow(cells: { 'files': PlutoCell(value: 'pluto_dual_grid.dart') diff --git a/demo/lib/screen/feature/row_infinity_scroll_screen.dart b/demo/lib/screen/feature/row_infinity_scroll_screen.dart index f257f327b..b963d291a 100644 --- a/demo/lib/screen/feature/row_infinity_scroll_screen.dart +++ b/demo/lib/screen/feature/row_infinity_scroll_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/row_lazy_pagination_screen.dart b/demo/lib/screen/feature/row_lazy_pagination_screen.dart index e7403e5fc..5f590931b 100644 --- a/demo/lib/screen/feature/row_lazy_pagination_screen.dart +++ b/demo/lib/screen/feature/row_lazy_pagination_screen.dart @@ -1,7 +1,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/row_moving_screen.dart b/demo/lib/screen/feature/row_moving_screen.dart index 97ac2df15..dc2dd335b 100644 --- a/demo/lib/screen/feature/row_moving_screen.dart +++ b/demo/lib/screen/feature/row_moving_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/row_pagination_screen.dart b/demo/lib/screen/feature/row_pagination_screen.dart index eb1f35969..aae44db3e 100644 --- a/demo/lib/screen/feature/row_pagination_screen.dart +++ b/demo/lib/screen/feature/row_pagination_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/row_selection_screen.dart b/demo/lib/screen/feature/row_selection_screen.dart index 504d58c4a..4203b253d 100644 --- a/demo/lib/screen/feature/row_selection_screen.dart +++ b/demo/lib/screen/feature/row_selection_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/row_with_checkbox_screen.dart b/demo/lib/screen/feature/row_with_checkbox_screen.dart index bd73f62b2..7694765de 100644 --- a/demo/lib/screen/feature/row_with_checkbox_screen.dart +++ b/demo/lib/screen/feature/row_with_checkbox_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/rtl_screen.dart b/demo/lib/screen/feature/rtl_screen.dart index 90a337b5a..af9f1fff6 100644 --- a/demo/lib/screen/feature/rtl_screen.dart +++ b/demo/lib/screen/feature/rtl_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; diff --git a/demo/lib/screen/feature/selection_type_column_screen.dart b/demo/lib/screen/feature/selection_type_column_screen.dart index 3806188dd..5e09a6439 100644 --- a/demo/lib/screen/feature/selection_type_column_screen.dart +++ b/demo/lib/screen/feature/selection_type_column_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; diff --git a/demo/lib/screen/feature/text_type_column_screen.dart b/demo/lib/screen/feature/text_type_column_screen.dart index 89833a614..5b09ae953 100644 --- a/demo/lib/screen/feature/text_type_column_screen.dart +++ b/demo/lib/screen/feature/text_type_column_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; diff --git a/demo/lib/screen/feature/time_type_column_screen.dart b/demo/lib/screen/feature/time_type_column_screen.dart index 910085fd5..c77ecedec 100644 --- a/demo/lib/screen/feature/time_type_column_screen.dart +++ b/demo/lib/screen/feature/time_type_column_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; diff --git a/demo/lib/screen/feature/value_formatter_screen.dart b/demo/lib/screen/feature/value_formatter_screen.dart index 05fd30eee..25b5aa3fa 100644 --- a/demo/lib/screen/feature/value_formatter_screen.dart +++ b/demo/lib/screen/feature/value_formatter_screen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../widget/pluto_example_button.dart'; import '../../widget/pluto_example_screen.dart'; diff --git a/example/lib/main.dart b/example/lib/main.dart index 71073cd2c..bf14b9294 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; void main() { runApp(const MyApp()); diff --git a/lib/pluto_grid.dart b/lib/pluto_grid_plus.dart similarity index 99% rename from lib/pluto_grid.dart rename to lib/pluto_grid_plus.dart index d177608ec..2f96cf79d 100644 --- a/lib/pluto_grid.dart +++ b/lib/pluto_grid_plus.dart @@ -1,4 +1,4 @@ -library pluto_grid; +library pluto_grid_plus; export './src/helper/filter_helper.dart'; export './src/helper/filtered_list.dart'; diff --git a/lib/src/helper/filter_helper.dart b/lib/src/helper/filter_helper.dart index 8ce57e997..672c5fcc4 100644 --- a/lib/src/helper/filter_helper.dart +++ b/lib/src/helper/filter_helper.dart @@ -1,7 +1,7 @@ import 'package:collection/collection.dart' show IterableExtension; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; typedef SetFilterPopupHandler = void Function( PlutoGridStateManager? stateManager); diff --git a/lib/src/helper/pluto_aggregate_helper.dart b/lib/src/helper/pluto_aggregate_helper.dart index 4eabc3ba1..d49a45c7f 100644 --- a/lib/src/helper/pluto_aggregate_helper.dart +++ b/lib/src/helper/pluto_aggregate_helper.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart' show IterableNumberExtension, IterableExtension; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; class PlutoAggregateHelper { static num sum({ diff --git a/lib/src/helper/pluto_column_group_helper.dart b/lib/src/helper/pluto_column_group_helper.dart index 638c13add..62ef977b0 100644 --- a/lib/src/helper/pluto_column_group_helper.dart +++ b/lib/src/helper/pluto_column_group_helper.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// Helper class for handling [PlutoColumnGroup]. class PlutoColumnGroupHelper { diff --git a/lib/src/helper/pluto_row_group_delegate.dart b/lib/src/helper/pluto_row_group_delegate.dart index 85658c143..627514fe3 100644 --- a/lib/src/helper/pluto_row_group_delegate.dart +++ b/lib/src/helper/pluto_row_group_delegate.dart @@ -1,7 +1,7 @@ import 'package:collection/collection.dart'; import 'package:flutter/foundation.dart'; import 'package:intl/intl.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// {@template pluto_row_group_delegate_type} /// Determines the grouping type of the row. diff --git a/lib/src/helper/pluto_row_group_helper.dart b/lib/src/helper/pluto_row_group_helper.dart index 7c72b8960..b23dc728e 100644 --- a/lib/src/helper/pluto_row_group_helper.dart +++ b/lib/src/helper/pluto_row_group_helper.dart @@ -1,5 +1,5 @@ import 'package:collection/collection.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// Helper class for grouping rows. class PlutoRowGroupHelper { diff --git a/lib/src/helper/show_column_menu.dart b/lib/src/helper/show_column_menu.dart index 90d9859f6..585a65f16 100644 --- a/lib/src/helper/show_column_menu.dart +++ b/lib/src/helper/show_column_menu.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class PlutoColumnMenuDelegate { List> buildMenuItems({ diff --git a/lib/src/manager/event/pluto_grid_cannot_move_current_cell_event.dart b/lib/src/manager/event/pluto_grid_cannot_move_current_cell_event.dart index e45b230d8..583ed0efe 100644 --- a/lib/src/manager/event/pluto_grid_cannot_move_current_cell_event.dart +++ b/lib/src/manager/event/pluto_grid_cannot_move_current_cell_event.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// Occurs when the keyboard hits the end of the grid. class PlutoGridCannotMoveCurrentCellEvent extends PlutoGridEvent { diff --git a/lib/src/manager/event/pluto_grid_cell_gesture_event.dart b/lib/src/manager/event/pluto_grid_cell_gesture_event.dart index 30533231c..10b23f1f1 100644 --- a/lib/src/manager/event/pluto_grid_cell_gesture_event.dart +++ b/lib/src/manager/event/pluto_grid_cell_gesture_event.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// [PlutoCell] This event handles the gesture of the widget. class PlutoGridCellGestureEvent extends PlutoGridEvent { diff --git a/lib/src/manager/event/pluto_grid_change_column_filter_event.dart b/lib/src/manager/event/pluto_grid_change_column_filter_event.dart index 469b8bc3a..bc4623d54 100644 --- a/lib/src/manager/event/pluto_grid_change_column_filter_event.dart +++ b/lib/src/manager/event/pluto_grid_change_column_filter_event.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// Event called when the value of the TextField /// that handles the filter under the column changes. diff --git a/lib/src/manager/event/pluto_grid_change_column_sort_event.dart b/lib/src/manager/event/pluto_grid_change_column_sort_event.dart index 43da5ff1d..dfb4fd7c9 100644 --- a/lib/src/manager/event/pluto_grid_change_column_sort_event.dart +++ b/lib/src/manager/event/pluto_grid_change_column_sort_event.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// Event issued when the sort state of a column is changed. class PlutoGridChangeColumnSortEvent extends PlutoGridEvent { diff --git a/lib/src/manager/event/pluto_grid_drag_rows_event.dart b/lib/src/manager/event/pluto_grid_drag_rows_event.dart index 0e765e887..d1f8f06ea 100644 --- a/lib/src/manager/event/pluto_grid_drag_rows_event.dart +++ b/lib/src/manager/event/pluto_grid_drag_rows_event.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// Event called when a row is dragged. class PlutoGridDragRowsEvent extends PlutoGridEvent { diff --git a/lib/src/manager/event/pluto_grid_event.dart b/lib/src/manager/event/pluto_grid_event.dart index c21d12c44..1c5ab8e54 100644 --- a/lib/src/manager/event/pluto_grid_event.dart +++ b/lib/src/manager/event/pluto_grid_event.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; enum PlutoGridEventType { normal, diff --git a/lib/src/manager/event/pluto_grid_scroll_update_event.dart b/lib/src/manager/event/pluto_grid_scroll_update_event.dart index cc96d875f..27c6eb2b4 100644 --- a/lib/src/manager/event/pluto_grid_scroll_update_event.dart +++ b/lib/src/manager/event/pluto_grid_scroll_update_event.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; enum PlutoGridScrollUpdateDirection { all, diff --git a/lib/src/manager/event/pluto_grid_set_column_filter_event.dart b/lib/src/manager/event/pluto_grid_set_column_filter_event.dart index 937ed9fc7..6d2d34961 100644 --- a/lib/src/manager/event/pluto_grid_set_column_filter_event.dart +++ b/lib/src/manager/event/pluto_grid_set_column_filter_event.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// If the value of [PlutoGridStateManager.filterOnlyEvent] is true, /// an event is issued. diff --git a/lib/src/manager/pluto_change_notifier_filter.dart b/lib/src/manager/pluto_change_notifier_filter.dart index 687563c2c..81bb50c06 100644 --- a/lib/src/manager/pluto_change_notifier_filter.dart +++ b/lib/src/manager/pluto_change_notifier_filter.dart @@ -1,5 +1,5 @@ import 'package:flutter/cupertino.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../ui/ui.dart'; diff --git a/lib/src/manager/pluto_grid_event_manager.dart b/lib/src/manager/pluto_grid_event_manager.dart index 496569e2e..732d28a50 100644 --- a/lib/src/manager/pluto_grid_event_manager.dart +++ b/lib/src/manager/pluto_grid_event_manager.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:rxdart/rxdart.dart'; class PlutoGridEventManager { diff --git a/lib/src/manager/pluto_grid_key_manager.dart b/lib/src/manager/pluto_grid_key_manager.dart index d99d1ac1e..d232f25a2 100644 --- a/lib/src/manager/pluto_grid_key_manager.dart +++ b/lib/src/manager/pluto_grid_key_manager.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:rxdart/rxdart.dart'; /// 2021-11-19 @@ -10,7 +10,7 @@ import 'package:rxdart/rxdart.dart'; /// 이슈 해결 후 : 삭제 /// /// desktop 에서만 발생 -/// skipRemainingHandlers 을 리턴하면 pluto_grid.dart 의 FocusScope 의 +/// skipRemainingHandlers 을 리턴하면 pluto_grid_plus.dart 의 FocusScope 의 /// 콜백이 호출 되지 않고 TextField 에 키 입력이 되어야 하는데 /// 방향키, 백스페이스 등이 입력되지 않음.(문자등은 입력 됨) /// https://github.com/flutter/flutter/issues/93873 diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index 61431eb9f..a64bc43f4 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -4,7 +4,7 @@ import 'dart:collection'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'state/cell_state.dart'; import 'state/column_group_state.dart'; diff --git a/lib/src/manager/shortcut/pluto_grid_shortcut.dart b/lib/src/manager/shortcut/pluto_grid_shortcut.dart index 4f8370ff3..e6b0772db 100644 --- a/lib/src/manager/shortcut/pluto_grid_shortcut.dart +++ b/lib/src/manager/shortcut/pluto_grid_shortcut.dart @@ -1,6 +1,6 @@ import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// Class for setting shortcut actions. /// diff --git a/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart b/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart index a4cac3bef..56b582b53 100644 --- a/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart +++ b/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart @@ -1,5 +1,5 @@ import 'package:flutter/services.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// Define the action by implementing the [execute] method /// as an action that can be mapped to a shortcut key. diff --git a/lib/src/manager/state/cell_state.dart b/lib/src/manager/state/cell_state.dart index b5a5318c0..abc84540b 100644 --- a/lib/src/manager/state/cell_state.dart +++ b/lib/src/manager/state/cell_state.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class ICellState { /// currently selected cell. diff --git a/lib/src/manager/state/column_group_state.dart b/lib/src/manager/state/column_group_state.dart index e7d69d494..8904b88a4 100644 --- a/lib/src/manager/state/column_group_state.dart +++ b/lib/src/manager/state/column_group_state.dart @@ -1,5 +1,5 @@ import 'package:flutter/cupertino.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IColumnGroupState { List get columnGroups; diff --git a/lib/src/manager/state/column_sizing_state.dart b/lib/src/manager/state/column_sizing_state.dart index b0722e982..39df3e521 100644 --- a/lib/src/manager/state/column_sizing_state.dart +++ b/lib/src/manager/state/column_sizing_state.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// Automatically adjust column width or manage width adjustment mode. abstract class IColumnSizingState { diff --git a/lib/src/manager/state/column_state.dart b/lib/src/manager/state/column_state.dart index c0ee6393e..6d6d31821 100644 --- a/lib/src/manager/state/column_state.dart +++ b/lib/src/manager/state/column_state.dart @@ -1,7 +1,7 @@ import 'dart:collection'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IColumnState { /// Columns provided at grid start. diff --git a/lib/src/manager/state/dragging_row_state.dart b/lib/src/manager/state/dragging_row_state.dart index 237671bc5..8a27db127 100644 --- a/lib/src/manager/state/dragging_row_state.dart +++ b/lib/src/manager/state/dragging_row_state.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IDraggingRowState { bool get isDraggingRow; diff --git a/lib/src/manager/state/editing_state.dart b/lib/src/manager/state/editing_state.dart index fa42d947f..36797e002 100644 --- a/lib/src/manager/state/editing_state.dart +++ b/lib/src/manager/state/editing_state.dart @@ -1,7 +1,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IEditingState { /// Editing status of the current. diff --git a/lib/src/manager/state/filtering_row_state.dart b/lib/src/manager/state/filtering_row_state.dart index ceaabd609..a064c7dfb 100644 --- a/lib/src/manager/state/filtering_row_state.dart +++ b/lib/src/manager/state/filtering_row_state.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IFilteringRowState { List get filterRows; diff --git a/lib/src/manager/state/focus_state.dart b/lib/src/manager/state/focus_state.dart index 3be5bf7f5..d0f516a67 100644 --- a/lib/src/manager/state/focus_state.dart +++ b/lib/src/manager/state/focus_state.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IFocusState { /// FocusNode to control keyboard input. diff --git a/lib/src/manager/state/grid_state.dart b/lib/src/manager/state/grid_state.dart index 75148effb..fb32e145b 100644 --- a/lib/src/manager/state/grid_state.dart +++ b/lib/src/manager/state/grid_state.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IGridState { GlobalKey get gridKey; diff --git a/lib/src/manager/state/keyboard_state.dart b/lib/src/manager/state/keyboard_state.dart index 79f7df51e..4194241b0 100644 --- a/lib/src/manager/state/keyboard_state.dart +++ b/lib/src/manager/state/keyboard_state.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IKeyboardState { /// Currently pressed key diff --git a/lib/src/manager/state/layout_state.dart b/lib/src/manager/state/layout_state.dart index abf8ea19c..9ac870daa 100644 --- a/lib/src/manager/state/layout_state.dart +++ b/lib/src/manager/state/layout_state.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class ILayoutState { ChangeNotifier get resizingChangeNotifier; diff --git a/lib/src/manager/state/pagination_row_state.dart b/lib/src/manager/state/pagination_row_state.dart index 68ff8a224..b057b4b3a 100644 --- a/lib/src/manager/state/pagination_row_state.dart +++ b/lib/src/manager/state/pagination_row_state.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IPaginationRowState { int get page; diff --git a/lib/src/manager/state/row_group_state.dart b/lib/src/manager/state/row_group_state.dart index 9f25b4424..76e0ef3b5 100644 --- a/lib/src/manager/state/row_group_state.dart +++ b/lib/src/manager/state/row_group_state.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart'; import 'package:flutter/foundation.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /* todo diff --git a/lib/src/manager/state/row_state.dart b/lib/src/manager/state/row_state.dart index 4a3d27889..5d12e306f 100644 --- a/lib/src/manager/state/row_state.dart +++ b/lib/src/manager/state/row_state.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IRowState { List get rows; diff --git a/lib/src/manager/state/scroll_state.dart b/lib/src/manager/state/scroll_state.dart index 57ce4fab3..141cf4ec5 100644 --- a/lib/src/manager/state/scroll_state.dart +++ b/lib/src/manager/state/scroll_state.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IScrollState { /// Controller to control the scrolling of the grid. diff --git a/lib/src/manager/state/selecting_state.dart b/lib/src/manager/state/selecting_state.dart index a4a65af18..1bd7de409 100644 --- a/lib/src/manager/state/selecting_state.dart +++ b/lib/src/manager/state/selecting_state.dart @@ -2,7 +2,7 @@ import 'dart:math'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class ISelectingState { /// Multi-selection state. diff --git a/lib/src/manager/state/visibility_layout_state.dart b/lib/src/manager/state/visibility_layout_state.dart index c94c4ee3e..1738f6c66 100644 --- a/lib/src/manager/state/visibility_layout_state.dart +++ b/lib/src/manager/state/visibility_layout_state.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IVisibilityLayoutState { /// Set [PlutoColumn.startPosition] to [PlutoColumn.width]. diff --git a/lib/src/model/pluto_cell.dart b/lib/src/model/pluto_cell.dart index 5d2e2c47d..1854cb040 100644 --- a/lib/src/model/pluto_cell.dart +++ b/lib/src/model/pluto_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; class PlutoCell { PlutoCell({ diff --git a/lib/src/model/pluto_column.dart b/lib/src/model/pluto_column.dart index 70d919a34..a79d723f1 100644 --- a/lib/src/model/pluto_column.dart +++ b/lib/src/model/pluto_column.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; typedef PlutoColumnValueFormatter = String Function(dynamic value); diff --git a/lib/src/model/pluto_column_group.dart b/lib/src/model/pluto_column_group.dart index ca5a898b5..24bbbf70f 100644 --- a/lib/src/model/pluto_column_group.dart +++ b/lib/src/model/pluto_column_group.dart @@ -1,5 +1,5 @@ import 'package:flutter/cupertino.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; class PlutoColumnGroup { final String title; diff --git a/lib/src/model/pluto_row.dart b/lib/src/model/pluto_row.dart index da7a10e2d..79d2d5005 100644 --- a/lib/src/model/pluto_row.dart +++ b/lib/src/model/pluto_row.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; class PlutoRow { PlutoRow({ diff --git a/lib/src/model/pluto_row_type.dart b/lib/src/model/pluto_row_type.dart index 3fa0765b7..851773a6c 100644 --- a/lib/src/model/pluto_row_type.dart +++ b/lib/src/model/pluto_row_type.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class PlutoRowType { factory PlutoRowType.normal() { diff --git a/lib/src/plugin/pluto_aggregate_column_footer.dart b/lib/src/plugin/pluto_aggregate_column_footer.dart index 03e11e4ae..d254c35b4 100644 --- a/lib/src/plugin/pluto_aggregate_column_footer.dart +++ b/lib/src/plugin/pluto_aggregate_column_footer.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../ui/ui.dart'; diff --git a/lib/src/plugin/pluto_infinity_scroll_rows.dart b/lib/src/plugin/pluto_infinity_scroll_rows.dart index 24648565b..76acb08ce 100644 --- a/lib/src/plugin/pluto_infinity_scroll_rows.dart +++ b/lib/src/plugin/pluto_infinity_scroll_rows.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// A callback function to implement when the scroll reaches the end. typedef PlutoInfinityScrollRowsFetch = Future diff --git a/lib/src/plugin/pluto_lazy_pagination.dart b/lib/src/plugin/pluto_lazy_pagination.dart index 4be796fbc..e8299d3f5 100644 --- a/lib/src/plugin/pluto_lazy_pagination.dart +++ b/lib/src/plugin/pluto_lazy_pagination.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// Callback function to implement to add lazy pagination data. typedef PlutoLazyPaginationFetch = Future Function( diff --git a/lib/src/plugin/pluto_pagination.dart b/lib/src/plugin/pluto_pagination.dart index 72df276de..a952f9056 100644 --- a/lib/src/plugin/pluto_pagination.dart +++ b/lib/src/plugin/pluto_pagination.dart @@ -1,7 +1,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../ui/ui.dart'; diff --git a/lib/src/pluto_dual_grid.dart b/lib/src/pluto_dual_grid.dart index 099d09b8d..43ecb6576 100644 --- a/lib/src/pluto_dual_grid.dart +++ b/lib/src/pluto_dual_grid.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; typedef PlutoDualOnSelectedEventCallback = void Function( PlutoDualOnSelectedEvent event); diff --git a/lib/src/pluto_dual_grid_popup.dart b/lib/src/pluto_dual_grid_popup.dart index a9d0a810d..249c26c97 100644 --- a/lib/src/pluto_dual_grid_popup.dart +++ b/lib/src/pluto_dual_grid_popup.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// [PlutoDualGridPopup] can connect the keyboard movement between the two grids /// by arranging two [PlutoGrid] left and right. diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index b67f59e1e..607d2ae60 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -4,7 +4,7 @@ import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:intl/date_symbol_data_local.dart'; import 'package:intl/intl.dart' show Intl; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'helper/platform_helper.dart'; import 'ui/ui.dart'; diff --git a/lib/src/pluto_grid_configuration.dart b/lib/src/pluto_grid_configuration.dart index df170a8c1..bf25c5171 100644 --- a/lib/src/pluto_grid_configuration.dart +++ b/lib/src/pluto_grid_configuration.dart @@ -2,7 +2,7 @@ import 'package:collection/collection.dart' show IterableExtension; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; class PlutoGridConfiguration { /// When you select a value in the pop-up grid, it moves down. diff --git a/lib/src/pluto_grid_date_picker.dart b/lib/src/pluto_grid_date_picker.dart index f6ba033f5..dbaefe1f9 100644 --- a/lib/src/pluto_grid_date_picker.dart +++ b/lib/src/pluto_grid_date_picker.dart @@ -3,7 +3,7 @@ import 'dart:math' show min; import 'package:flutter/material.dart'; import 'package:intl/intl.dart' as intl; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui/ui.dart'; diff --git a/lib/src/pluto_grid_popup.dart b/lib/src/pluto_grid_popup.dart index 338249f2e..89b36db9b 100644 --- a/lib/src/pluto_grid_popup.dart +++ b/lib/src/pluto_grid_popup.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// [PlutoGridPopup] calls [PlutoGrid] in the form of a popup. class PlutoGridPopup { diff --git a/lib/src/ui/cells/pluto_currency_cell.dart b/lib/src/ui/cells/pluto_currency_cell.dart index 3d573e435..216a489cd 100644 --- a/lib/src/ui/cells/pluto_currency_cell.dart +++ b/lib/src/ui/cells/pluto_currency_cell.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'decimal_input_formatter.dart'; import 'text_cell.dart'; diff --git a/lib/src/ui/cells/pluto_date_cell.dart b/lib/src/ui/cells/pluto_date_cell.dart index 81e113747..0e788c1d5 100644 --- a/lib/src/ui/cells/pluto_date_cell.dart +++ b/lib/src/ui/cells/pluto_date_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'popup_cell.dart'; diff --git a/lib/src/ui/cells/pluto_default_cell.dart b/lib/src/ui/cells/pluto_default_cell.dart index c9fd2104d..09d738cd0 100644 --- a/lib/src/ui/cells/pluto_default_cell.dart +++ b/lib/src/ui/cells/pluto_default_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../ui.dart'; diff --git a/lib/src/ui/cells/pluto_number_cell.dart b/lib/src/ui/cells/pluto_number_cell.dart index d60aece67..757f0ef50 100644 --- a/lib/src/ui/cells/pluto_number_cell.dart +++ b/lib/src/ui/cells/pluto_number_cell.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'decimal_input_formatter.dart'; import 'text_cell.dart'; diff --git a/lib/src/ui/cells/pluto_select_cell.dart b/lib/src/ui/cells/pluto_select_cell.dart index 9a472c677..3d6a99741 100644 --- a/lib/src/ui/cells/pluto_select_cell.dart +++ b/lib/src/ui/cells/pluto_select_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'popup_cell.dart'; diff --git a/lib/src/ui/cells/pluto_text_cell.dart b/lib/src/ui/cells/pluto_text_cell.dart index 704fac602..852862412 100644 --- a/lib/src/ui/cells/pluto_text_cell.dart +++ b/lib/src/ui/cells/pluto_text_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'text_cell.dart'; diff --git a/lib/src/ui/cells/pluto_time_cell.dart b/lib/src/ui/cells/pluto_time_cell.dart index 4b4a28aec..ec6bf9b9d 100644 --- a/lib/src/ui/cells/pluto_time_cell.dart +++ b/lib/src/ui/cells/pluto_time_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'popup_cell.dart'; diff --git a/lib/src/ui/cells/popup_cell.dart b/lib/src/ui/cells/popup_cell.dart index 6021b7941..e945eeed7 100644 --- a/lib/src/ui/cells/popup_cell.dart +++ b/lib/src/ui/cells/popup_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class PopupCell extends StatefulWidget { final PlutoGridStateManager stateManager; diff --git a/lib/src/ui/cells/text_cell.dart b/lib/src/ui/cells/text_cell.dart index 49e6d80d5..a586daed5 100644 --- a/lib/src/ui/cells/text_cell.dart +++ b/lib/src/ui/cells/text_cell.dart @@ -1,7 +1,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/helper/platform_helper.dart'; abstract class TextCell extends StatefulWidget { diff --git a/lib/src/ui/columns/pluto_column_filter.dart b/lib/src/ui/columns/pluto_column_filter.dart index 3913829a2..28cb968a0 100644 --- a/lib/src/ui/columns/pluto_column_filter.dart +++ b/lib/src/ui/columns/pluto_column_filter.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../ui.dart'; diff --git a/lib/src/ui/columns/pluto_column_title.dart b/lib/src/ui/columns/pluto_column_title.dart index 514d305b1..578a8bb20 100644 --- a/lib/src/ui/columns/pluto_column_title.dart +++ b/lib/src/ui/columns/pluto_column_title.dart @@ -1,7 +1,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../ui.dart'; diff --git a/lib/src/ui/miscellaneous/pluto_no_rows_widget.dart b/lib/src/ui/miscellaneous/pluto_no_rows_widget.dart index a12049d6d..c3981d1a7 100644 --- a/lib/src/ui/miscellaneous/pluto_no_rows_widget.dart +++ b/lib/src/ui/miscellaneous/pluto_no_rows_widget.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../ui.dart'; diff --git a/lib/src/ui/miscellaneous/pluto_state_with_change.dart b/lib/src/ui/miscellaneous/pluto_state_with_change.dart index 65b8e1d90..edbdf8486 100644 --- a/lib/src/ui/miscellaneous/pluto_state_with_change.dart +++ b/lib/src/ui/miscellaneous/pluto_state_with_change.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class PlutoStatefulWidget extends StatefulWidget { const PlutoStatefulWidget({super.key}); diff --git a/lib/src/ui/miscellaneous/pluto_visibility_layout.dart b/lib/src/ui/miscellaneous/pluto_visibility_layout.dart index 2348bdeaa..26fb19af0 100644 --- a/lib/src/ui/miscellaneous/pluto_visibility_layout.dart +++ b/lib/src/ui/miscellaneous/pluto_visibility_layout.dart @@ -3,7 +3,7 @@ import 'dart:collection'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// It is used to lay out the widgets /// of [PlutoCell] or [PlutoColumn], [PlutoColumnGroup] of [PlutoRow] diff --git a/lib/src/ui/pluto_base_cell.dart b/lib/src/ui/pluto_base_cell.dart index 0c4210a52..106c14c34 100644 --- a/lib/src/ui/pluto_base_cell.dart +++ b/lib/src/ui/pluto_base_cell.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_base_column.dart b/lib/src/ui/pluto_base_column.dart index cbdfeab6b..38711ca16 100644 --- a/lib/src/ui/pluto_base_column.dart +++ b/lib/src/ui/pluto_base_column.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_base_column_footer.dart b/lib/src/ui/pluto_base_column_footer.dart index f67cf861e..844beb83b 100644 --- a/lib/src/ui/pluto_base_column_footer.dart +++ b/lib/src/ui/pluto_base_column_footer.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_base_column_group.dart b/lib/src/ui/pluto_base_column_group.dart index 354d527c5..c3155afc0 100644 --- a/lib/src/ui/pluto_base_column_group.dart +++ b/lib/src/ui/pluto_base_column_group.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_base_row.dart b/lib/src/ui/pluto_base_row.dart index 9d7b9f8b3..a957702ee 100644 --- a/lib/src/ui/pluto_base_row.dart +++ b/lib/src/ui/pluto_base_row.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_body_columns.dart b/lib/src/ui/pluto_body_columns.dart index ccad4d4b6..154d9d948 100644 --- a/lib/src/ui/pluto_body_columns.dart +++ b/lib/src/ui/pluto_body_columns.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_body_columns_footer.dart b/lib/src/ui/pluto_body_columns_footer.dart index 16faa7c3e..1cce136f3 100644 --- a/lib/src/ui/pluto_body_columns_footer.dart +++ b/lib/src/ui/pluto_body_columns_footer.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_body_rows.dart b/lib/src/ui/pluto_body_rows.dart index 76505c3ab..67a9fa0bc 100644 --- a/lib/src/ui/pluto_body_rows.dart +++ b/lib/src/ui/pluto_body_rows.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../helper/platform_helper.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_left_frozen_columns.dart b/lib/src/ui/pluto_left_frozen_columns.dart index 9972ddfa1..27d0c818d 100644 --- a/lib/src/ui/pluto_left_frozen_columns.dart +++ b/lib/src/ui/pluto_left_frozen_columns.dart @@ -1,6 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_left_frozen_columns_footer.dart b/lib/src/ui/pluto_left_frozen_columns_footer.dart index a49e83708..9a6426d32 100644 --- a/lib/src/ui/pluto_left_frozen_columns_footer.dart +++ b/lib/src/ui/pluto_left_frozen_columns_footer.dart @@ -1,6 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_left_frozen_rows.dart b/lib/src/ui/pluto_left_frozen_rows.dart index 8a9972e51..984cb1f80 100644 --- a/lib/src/ui/pluto_left_frozen_rows.dart +++ b/lib/src/ui/pluto_left_frozen_rows.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_right_frozen_columns.dart b/lib/src/ui/pluto_right_frozen_columns.dart index b760d306f..eb9a46d8a 100644 --- a/lib/src/ui/pluto_right_frozen_columns.dart +++ b/lib/src/ui/pluto_right_frozen_columns.dart @@ -1,6 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_right_frozen_columns_footer.dart b/lib/src/ui/pluto_right_frozen_columns_footer.dart index 2d418874e..2570666a0 100644 --- a/lib/src/ui/pluto_right_frozen_columns_footer.dart +++ b/lib/src/ui/pluto_right_frozen_columns_footer.dart @@ -1,6 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/ui/pluto_right_frozen_rows.dart b/lib/src/ui/pluto_right_frozen_rows.dart index ddce213e4..67e6b33f4 100644 --- a/lib/src/ui/pluto_right_frozen_rows.dart +++ b/lib/src/ui/pluto_right_frozen_rows.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'ui.dart'; diff --git a/lib/src/widgets/pluto_loading.dart b/lib/src/widgets/pluto_loading.dart index adbd1fdd4..6a662a8af 100644 --- a/lib/src/widgets/pluto_loading.dart +++ b/lib/src/widgets/pluto_loading.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// Widget that is displayed when loading is enabled /// with the [PlutoGridStateManager.setShowLoading] method. diff --git a/packages/pluto_grid_export/README.md b/packages/pluto_grid_export/README.md index 46ffe4722..a7b52de6c 100644 --- a/packages/pluto_grid_export/README.md +++ b/packages/pluto_grid_export/README.md @@ -27,7 +27,7 @@ import 'dart:convert'; import 'package:file_saver/file_saver.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus_export/pluto_grid_export.dart' as pluto_grid_export; void main() { diff --git a/packages/pluto_grid_export/example/lib/main.dart b/packages/pluto_grid_export/example/lib/main.dart index ba87d3e67..fcc09be24 100644 --- a/packages/pluto_grid_export/example/lib/main.dart +++ b/packages/pluto_grid_export/example/lib/main.dart @@ -3,7 +3,7 @@ import 'dart:convert'; import 'package:file_saver/file_saver.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_export/pluto_grid_export.dart' as pluto_grid_export; void main() { diff --git a/packages/pluto_grid_export/example/pubspec.yaml b/packages/pluto_grid_export/example/pubspec.yaml index fce47e3cd..bf1d6455f 100644 --- a/packages/pluto_grid_export/example/pubspec.yaml +++ b/packages/pluto_grid_export/example/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=2.17.0 <4.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/packages/pluto_grid_export/lib/src/abstract_text_export.dart b/packages/pluto_grid_export/lib/src/abstract_text_export.dart index 312f3a945..967223cd7 100644 --- a/packages/pluto_grid_export/lib/src/abstract_text_export.dart +++ b/packages/pluto_grid_export/lib/src/abstract_text_export.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /// Abstract class for converting PlutoGrid's metadata. abstract class AbstractTextExport { diff --git a/packages/pluto_grid_export/lib/src/csv/pluto_grid_csv_export.dart b/packages/pluto_grid_export/lib/src/csv/pluto_grid_csv_export.dart index 1d732d2c6..f7fdb22ba 100644 --- a/packages/pluto_grid_export/lib/src/csv/pluto_grid_csv_export.dart +++ b/packages/pluto_grid_export/lib/src/csv/pluto_grid_csv_export.dart @@ -1,5 +1,5 @@ import 'package:csv/csv.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../abstract_text_export.dart'; diff --git a/packages/pluto_grid_export/lib/src/pdf/pluto_grid_pdf_export.dart b/packages/pluto_grid_export/lib/src/pdf/pluto_grid_pdf_export.dart index 66a2e66c5..5acc0901e 100644 --- a/packages/pluto_grid_export/lib/src/pdf/pluto_grid_pdf_export.dart +++ b/packages/pluto_grid_export/lib/src/pdf/pluto_grid_pdf_export.dart @@ -2,7 +2,7 @@ import 'dart:typed_data'; import 'package:pdf/pdf.dart'; import 'package:pdf/widgets.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../abstract_text_export.dart'; import 'generic_pdf_controller.dart'; diff --git a/packages/pluto_grid_export/lib/src/pluto_grid_export.dart b/packages/pluto_grid_export/lib/src/pluto_grid_export.dart index d79364d05..20990d9bd 100644 --- a/packages/pluto_grid_export/lib/src/pluto_grid_export.dart +++ b/packages/pluto_grid_export/lib/src/pluto_grid_export.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import './csv/pluto_grid_csv_export.dart'; diff --git a/test/helper/build_grid_helper.dart b/test/helper/build_grid_helper.dart index 9f265d765..21b3ca1ec 100644 --- a/test/helper/build_grid_helper.dart +++ b/test/helper/build_grid_helper.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'column_helper.dart'; import 'pluto_widget_test_helper.dart'; diff --git a/test/helper/column_helper.dart b/test/helper/column_helper.dart index fa87ffd21..db3c52712 100644 --- a/test/helper/column_helper.dart +++ b/test/helper/column_helper.dart @@ -1,4 +1,4 @@ -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; class ColumnHelper { static List textColumn( diff --git a/test/helper/row_helper.dart b/test/helper/row_helper.dart index ba28942e4..6602753e9 100644 --- a/test/helper/row_helper.dart +++ b/test/helper/row_helper.dart @@ -1,6 +1,6 @@ import 'dart:math'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; class RowHelper { /// cell value format : '$columnFieldName value $rowIdx' diff --git a/test/mock/shared_mocks.dart b/test/mock/shared_mocks.dart index cb52d70d1..cc170ed08 100644 --- a/test/mock/shared_mocks.dart +++ b/test/mock/shared_mocks.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/widgets.dart'; import 'package:mockito/annotations.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; @GenerateNiceMocks([ MockSpec(), diff --git a/test/mock/shared_mocks.mocks.dart b/test/mock/shared_mocks.mocks.dart index 063d83f14..58b4f81cf 100644 --- a/test/mock/shared_mocks.mocks.dart +++ b/test/mock/shared_mocks.mocks.dart @@ -13,7 +13,7 @@ import 'package:flutter/services.dart' as _i10; import 'package:flutter/src/foundation/assertions.dart' as _i11; import 'package:flutter/src/foundation/diagnostics.dart' as _i8; import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid_plus/pluto_grid.dart' as _i2; +import 'package:pluto_grid_plus/pluto_grid_plus.dart' as _i2; import 'package:rxdart/rxdart.dart' as _i4; // ignore_for_file: type=lint diff --git a/test/scenario/columns_footer/rendering_test.dart b/test/scenario/columns_footer/rendering_test.dart index 5c2c7deb1..e095b73e9 100644 --- a/test/scenario/columns_footer/rendering_test.dart +++ b/test/scenario/columns_footer/rendering_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/configuration/behavior_setting_enter_key_action_test.dart b/test/scenario/configuration/behavior_setting_enter_key_action_test.dart index b1ff2d8ad..b40f6f27b 100644 --- a/test/scenario/configuration/behavior_setting_enter_key_action_test.dart +++ b/test/scenario/configuration/behavior_setting_enter_key_action_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/configuration/behavior_setting_row_height_test.dart b/test/scenario/configuration/behavior_setting_row_height_test.dart index 346e40116..191c13d18 100644 --- a/test/scenario/configuration/behavior_setting_row_height_test.dart +++ b/test/scenario/configuration/behavior_setting_row_height_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/editing_cell_state/auto_editing_of_column_test.dart b/test/scenario/editing_cell_state/auto_editing_of_column_test.dart index fdb78c24b..c9040f526 100644 --- a/test/scenario/editing_cell_state/auto_editing_of_column_test.dart +++ b/test/scenario/editing_cell_state/auto_editing_of_column_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/pluto_widget_test_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/editing_cell_state/auto_editing_test.dart b/test/scenario/editing_cell_state/auto_editing_test.dart index 56cf7de6c..55a20922f 100644 --- a/test/scenario/editing_cell_state/auto_editing_test.dart +++ b/test/scenario/editing_cell_state/auto_editing_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/editing_cell_state/number_cell_editing_test.dart b/test/scenario/editing_cell_state/number_cell_editing_test.dart index ab37fe4e0..4e2fd01ea 100644 --- a/test/scenario/editing_cell_state/number_cell_editing_test.dart +++ b/test/scenario/editing_cell_state/number_cell_editing_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../mock/mock_methods.dart'; diff --git a/test/scenario/filtering/currency_filtering_test.dart b/test/scenario/filtering/currency_filtering_test.dart index 2b3bf8182..e63e5073b 100644 --- a/test/scenario/filtering/currency_filtering_test.dart +++ b/test/scenario/filtering/currency_filtering_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; void main() { diff --git a/test/scenario/filtering/number_filtering_test.dart b/test/scenario/filtering/number_filtering_test.dart index 1cc4214b6..cf4620195 100644 --- a/test/scenario/filtering/number_filtering_test.dart +++ b/test/scenario/filtering/number_filtering_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; void main() { diff --git a/test/scenario/filtering/text_filtering_test.dart b/test/scenario/filtering/text_filtering_test.dart index 6292cc07f..34a04cb1d 100644 --- a/test/scenario/filtering/text_filtering_test.dart +++ b/test/scenario/filtering/text_filtering_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/freeze_columns/behavior_absence_freeze_column_test.dart b/test/scenario/freeze_columns/behavior_absence_freeze_column_test.dart index 2c257833a..1eec21998 100644 --- a/test/scenario/freeze_columns/behavior_absence_freeze_column_test.dart +++ b/test/scenario/freeze_columns/behavior_absence_freeze_column_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/freeze_columns/behavior_presence_freeze_column_test.dart b/test/scenario/freeze_columns/behavior_presence_freeze_column_test.dart index cb67ced2d..a44c606c1 100644 --- a/test/scenario/freeze_columns/behavior_presence_freeze_column_test.dart +++ b/test/scenario/freeze_columns/behavior_presence_freeze_column_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/grid_mode/multi_select_mode_test.dart b/test/scenario/grid_mode/multi_select_mode_test.dart index c8febd5bb..65c5ac3b2 100644 --- a/test/scenario/grid_mode/multi_select_mode_test.dart +++ b/test/scenario/grid_mode/multi_select_mode_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/build_grid_helper.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/grid_mode/select_mode_test.dart b/test/scenario/grid_mode/select_mode_test.dart index 751dd38df..f86cd9175 100644 --- a/test/scenario/grid_mode/select_mode_test.dart +++ b/test/scenario/grid_mode/select_mode_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/grid_mode/select_with_one_tap_test.dart b/test/scenario/grid_mode/select_with_one_tap_test.dart index dc368b48a..0891ff8a7 100644 --- a/test/scenario/grid_mode/select_with_one_tap_test.dart +++ b/test/scenario/grid_mode/select_with_one_tap_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/grouping_columns/rendering_test.dart b/test/scenario/grouping_columns/rendering_test.dart index 80e30cfde..187a48fc9 100644 --- a/test/scenario/grouping_columns/rendering_test.dart +++ b/test/scenario/grouping_columns/rendering_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/grouping_rows/checkbox_test.dart b/test/scenario/grouping_rows/checkbox_test.dart index 630827db1..dd638413f 100644 --- a/test/scenario/grouping_rows/checkbox_test.dart +++ b/test/scenario/grouping_rows/checkbox_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/test_helper_util.dart'; diff --git a/test/scenario/grouping_rows/on_toggled_test.dart b/test/scenario/grouping_rows/on_toggled_test.dart index e28201f85..4d8889fa2 100644 --- a/test/scenario/grouping_rows/on_toggled_test.dart +++ b/test/scenario/grouping_rows/on_toggled_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/test_helper_util.dart'; diff --git a/test/scenario/grouping_rows/rendering_test.dart b/test/scenario/grouping_rows/rendering_test.dart index af1c8aa9a..d7fdf3e67 100644 --- a/test/scenario/grouping_rows/rendering_test.dart +++ b/test/scenario/grouping_rows/rendering_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/grouping_rows/sorting_tree_group_test.dart b/test/scenario/grouping_rows/sorting_tree_group_test.dart index cf90089dd..25dabb879 100644 --- a/test/scenario/grouping_rows/sorting_tree_group_test.dart +++ b/test/scenario/grouping_rows/sorting_tree_group_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/test_helper_util.dart'; diff --git a/test/scenario/hide_columns/hide_column_test.dart b/test/scenario/hide_columns/hide_column_test.dart index 9d39bcaf1..b957742e7 100644 --- a/test/scenario/hide_columns/hide_column_test.dart +++ b/test/scenario/hide_columns/hide_column_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/insert_columns/rendering_test.dart b/test/scenario/insert_columns/rendering_test.dart index 5a966d652..33454262a 100644 --- a/test/scenario/insert_columns/rendering_test.dart +++ b/test/scenario/insert_columns/rendering_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/keyboard/behavior_ctrl_a_key_test.dart b/test/scenario/keyboard/behavior_ctrl_a_key_test.dart index 81472cd7e..677b171ef 100644 --- a/test/scenario/keyboard/behavior_ctrl_a_key_test.dart +++ b/test/scenario/keyboard/behavior_ctrl_a_key_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_enter_key_test.dart b/test/scenario/keyboard/behavior_enter_key_test.dart index 5a8937d97..bb79d74ac 100644 --- a/test/scenario/keyboard/behavior_enter_key_test.dart +++ b/test/scenario/keyboard/behavior_enter_key_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_esc_key_test.dart b/test/scenario/keyboard/behavior_esc_key_test.dart index b302b95da..0b48bb788 100644 --- a/test/scenario/keyboard/behavior_esc_key_test.dart +++ b/test/scenario/keyboard/behavior_esc_key_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_f2_key_test.dart b/test/scenario/keyboard/behavior_f2_key_test.dart index 4dd2253fd..82696ed91 100644 --- a/test/scenario/keyboard/behavior_f2_key_test.dart +++ b/test/scenario/keyboard/behavior_f2_key_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_f3_key_test.dart b/test/scenario/keyboard/behavior_f3_key_test.dart index faf349613..2f0f61b82 100644 --- a/test/scenario/keyboard/behavior_f3_key_test.dart +++ b/test/scenario/keyboard/behavior_f3_key_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_moving_column_filter_test.dart b/test/scenario/keyboard/behavior_moving_column_filter_test.dart index 17f8c748b..ca725f323 100644 --- a/test/scenario/keyboard/behavior_moving_column_filter_test.dart +++ b/test/scenario/keyboard/behavior_moving_column_filter_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/keyboard/behavior_tab_key_test.dart b/test/scenario/keyboard/behavior_tab_key_test.dart index 9f88ad568..dbad53ea2 100644 --- a/test/scenario/keyboard/behavior_tab_key_test.dart +++ b/test/scenario/keyboard/behavior_tab_key_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/behavior_to_call_popup_with_keyboard_test.dart b/test/scenario/keyboard/behavior_to_call_popup_with_keyboard_test.dart index 3d2f50b3f..d6bf09324 100644 --- a/test/scenario/keyboard/behavior_to_call_popup_with_keyboard_test.dart +++ b/test/scenario/keyboard/behavior_to_call_popup_with_keyboard_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/keyboard/custom_shortcut_test.dart b/test/scenario/keyboard/custom_shortcut_test.dart index d738d16e6..becb8870a 100644 --- a/test/scenario/keyboard/custom_shortcut_test.dart +++ b/test/scenario/keyboard/custom_shortcut_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/scenario/layout/layout_test.dart b/test/scenario/layout/layout_test.dart index f77b3a4e5..2f17f78ee 100644 --- a/test/scenario/layout/layout_test.dart +++ b/test/scenario/layout/layout_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/paginate_rows/button_navigation_test.dart b/test/scenario/paginate_rows/button_navigation_test.dart index 9b7f9c9cb..877229d2c 100644 --- a/test/scenario/paginate_rows/button_navigation_test.dart +++ b/test/scenario/paginate_rows/button_navigation_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/paginate_rows/infinity_scroll_rows_test.dart b/test/scenario/paginate_rows/infinity_scroll_rows_test.dart index d7ba96283..16f189ee7 100644 --- a/test/scenario/paginate_rows/infinity_scroll_rows_test.dart +++ b/test/scenario/paginate_rows/infinity_scroll_rows_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/paginate_rows/lazy_pagination_test.dart b/test/scenario/paginate_rows/lazy_pagination_test.dart index ad2a03cc3..dce14b045 100644 --- a/test/scenario/paginate_rows/lazy_pagination_test.dart +++ b/test/scenario/paginate_rows/lazy_pagination_test.dart @@ -3,7 +3,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/paginate_rows/sorting_test.dart b/test/scenario/paginate_rows/sorting_test.dart index 02617e994..c7eb61427 100644 --- a/test/scenario/paginate_rows/sorting_test.dart +++ b/test/scenario/paginate_rows/sorting_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/pluto_base_cell.dart'; void main() { diff --git a/test/scenario/resizing_window/layout_test.dart b/test/scenario/resizing_window/layout_test.dart index ad9b7e8c9..b7759df35 100644 --- a/test/scenario/resizing_window/layout_test.dart +++ b/test/scenario/resizing_window/layout_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../helper/column_helper.dart'; diff --git a/test/scenario/selecting/behavior_after_selecting_cells_test.dart b/test/scenario/selecting/behavior_after_selecting_cells_test.dart index 97f0d008b..bc31206fc 100644 --- a/test/scenario/selecting/behavior_after_selecting_cells_test.dart +++ b/test/scenario/selecting/behavior_after_selecting_cells_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/selecting/behavior_after_selecting_rows_test.dart b/test/scenario/selecting/behavior_after_selecting_rows_test.dart index 83ffa5003..b5f01e9a3 100644 --- a/test/scenario/selecting/behavior_after_selecting_rows_test.dart +++ b/test/scenario/selecting/behavior_after_selecting_rows_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/scenario/selecting/selecting_cells_by_long_tap_test.dart b/test/scenario/selecting/selecting_cells_by_long_tap_test.dart index b6ae7ac52..4ade51f87 100644 --- a/test/scenario/selecting/selecting_cells_by_long_tap_test.dart +++ b/test/scenario/selecting/selecting_cells_by_long_tap_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/build_grid_helper.dart'; diff --git a/test/src/helper/filter_helper_test.dart b/test/src/helper/filter_helper_test.dart index f0f62457e..b807acc6e 100644 --- a/test/src/helper/filter_helper_test.dart +++ b/test/src/helper/filter_helper_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/src/helper/filtered_list_test.dart b/test/src/helper/filtered_list_test.dart index b9cdbf11e..f2cfc31ed 100644 --- a/test/src/helper/filtered_list_test.dart +++ b/test/src/helper/filtered_list_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; void main() { group('Int List 를 짝수로 필터링.', () { diff --git a/test/src/helper/pluto_aggregate_helper_test.dart b/test/src/helper/pluto_aggregate_helper_test.dart index 830be2054..2bc4111d7 100644 --- a/test/src/helper/pluto_aggregate_helper_test.dart +++ b/test/src/helper/pluto_aggregate_helper_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; void main() { group('sum', () { diff --git a/test/src/helper/pluto_column_group_helper_test.dart b/test/src/helper/pluto_column_group_helper_test.dart index 1ee7c208f..a600636fe 100644 --- a/test/src/helper/pluto_column_group_helper_test.dart +++ b/test/src/helper/pluto_column_group_helper_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; diff --git a/test/src/helper/pluto_date_time_helper_test.dart b/test/src/helper/pluto_date_time_helper_test.dart index 013c3b4ee..e625ab442 100644 --- a/test/src/helper/pluto_date_time_helper_test.dart +++ b/test/src/helper/pluto_date_time_helper_test.dart @@ -1,7 +1,7 @@ // ignore_for_file: slash_for_doc_comments import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; /** 2022. 11 월 달력 diff --git a/test/src/helper/pluto_debounce_test.dart b/test/src/helper/pluto_debounce_test.dart index 91f764ab3..184b25f21 100644 --- a/test/src/helper/pluto_debounce_test.dart +++ b/test/src/helper/pluto_debounce_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; void main() { group('PlutoDebounce', () { diff --git a/test/src/helper/pluto_key_manager_event_test.dart b/test/src/helper/pluto_key_manager_event_test.dart index e35c81742..3ad157635 100644 --- a/test/src/helper/pluto_key_manager_event_test.dart +++ b/test/src/helper/pluto_key_manager_event_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; void main() { late FocusNode focusNode; diff --git a/test/src/helper/pluto_row_group_delegate_test.dart b/test/src/helper/pluto_row_group_delegate_test.dart index 090dab2f7..a2aa7ce29 100644 --- a/test/src/helper/pluto_row_group_delegate_test.dart +++ b/test/src/helper/pluto_row_group_delegate_test.dart @@ -1,7 +1,7 @@ // ignore_for_file: non_constant_identifier_names import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; void main() { PlutoRow createRow( diff --git a/test/src/helper/pluto_row_group_helper_test.dart b/test/src/helper/pluto_row_group_helper_test.dart index e1a1e4ef4..e9b49ba47 100644 --- a/test/src/helper/pluto_row_group_helper_test.dart +++ b/test/src/helper/pluto_row_group_helper_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../mock/mock_methods.dart'; diff --git a/test/src/helper/pluto_size_helper_test.dart b/test/src/helper/pluto_size_helper_test.dart index 4623b081d..f20406266 100644 --- a/test/src/helper/pluto_size_helper_test.dart +++ b/test/src/helper/pluto_size_helper_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; class _ResizeItem { _ResizeItem({ diff --git a/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart b/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart index 6c659edde..df908cb0d 100644 --- a/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart +++ b/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../helper/column_helper.dart'; import '../../../matcher/pluto_object_matcher.dart'; diff --git a/test/src/manager/event/pluto_grid_scroll_update_event_test.dart b/test/src/manager/event/pluto_grid_scroll_update_event_test.dart index 85c9f0fcf..fa0f692f8 100644 --- a/test/src/manager/event/pluto_grid_scroll_update_event_test.dart +++ b/test/src/manager/event/pluto_grid_scroll_update_event_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/manager/pluto_grid_key_manager_test.dart b/test/src/manager/pluto_grid_key_manager_test.dart index cf0b5c625..0ab7236da 100644 --- a/test/src/manager/pluto_grid_key_manager_test.dart +++ b/test/src/manager/pluto_grid_key_manager_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/pluto_widget_test_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/src/manager/pluto_grid_state_manager_test.dart b/test/src/manager/pluto_grid_state_manager_test.dart index 76c2c0cba..c00153848 100644 --- a/test/src/manager/pluto_grid_state_manager_test.dart +++ b/test/src/manager/pluto_grid_state_manager_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; diff --git a/test/src/manager/state/cell_state_test.dart b/test/src/manager/state/cell_state_test.dart index 2935f07c0..a07595339 100644 --- a/test/src/manager/state/cell_state_test.dart +++ b/test/src/manager/state/cell_state_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/column_sizing_state_test.dart b/test/src/manager/state/column_sizing_state_test.dart index e251e3527..2902ac41b 100644 --- a/test/src/manager/state/column_sizing_state_test.dart +++ b/test/src/manager/state/column_sizing_state_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../helper/column_helper.dart'; import '../../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/manager/state/column_state_test.dart b/test/src/manager/state/column_state_test.dart index 5e252f52b..542cac1a6 100644 --- a/test/src/manager/state/column_state_test.dart +++ b/test/src/manager/state/column_state_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../helper/column_helper.dart'; diff --git a/test/src/manager/state/dragging_row_state_test.dart b/test/src/manager/state/dragging_row_state_test.dart index 3570087a3..be21a2508 100644 --- a/test/src/manager/state/dragging_row_state_test.dart +++ b/test/src/manager/state/dragging_row_state_test.dart @@ -1,7 +1,7 @@ import 'package:collection/collection.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/editing_state_test.dart b/test/src/manager/state/editing_state_test.dart index f90738da3..c74f01c5d 100644 --- a/test/src/manager/state/editing_state_test.dart +++ b/test/src/manager/state/editing_state_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/filtering_row_state_test.dart b/test/src/manager/state/filtering_row_state_test.dart index b1ea308fe..657995620 100644 --- a/test/src/manager/state/filtering_row_state_test.dart +++ b/test/src/manager/state/filtering_row_state_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/keyboard_state_test.dart b/test/src/manager/state/keyboard_state_test.dart index 7b326165b..d6bc44ca4 100644 --- a/test/src/manager/state/keyboard_state_test.dart +++ b/test/src/manager/state/keyboard_state_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/manager/state/layout_state_test.dart b/test/src/manager/state/layout_state_test.dart index 150bcb7c7..da3da3f31 100644 --- a/test/src/manager/state/layout_state_test.dart +++ b/test/src/manager/state/layout_state_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/manager/state/row_group_state_test.dart b/test/src/manager/state/row_group_state_test.dart index 9b6614216..ac78a0b26 100644 --- a/test/src/manager/state/row_group_state_test.dart +++ b/test/src/manager/state/row_group_state_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/manager/state/row_state_test.dart b/test/src/manager/state/row_state_test.dart index 7b3525a68..202564133 100644 --- a/test/src/manager/state/row_state_test.dart +++ b/test/src/manager/state/row_state_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/manager/state/scroll_state_test.dart b/test/src/manager/state/scroll_state_test.dart index 0cd60a41f..3203edf77 100644 --- a/test/src/manager/state/scroll_state_test.dart +++ b/test/src/manager/state/scroll_state_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/selecting_state_test.dart b/test/src/manager/state/selecting_state_test.dart index c16399bbb..e378545f4 100644 --- a/test/src/manager/state/selecting_state_test.dart +++ b/test/src/manager/state/selecting_state_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/manager/state/visibility_state_test.dart b/test/src/manager/state/visibility_state_test.dart index fc5b3425e..d1e3b4f7b 100644 --- a/test/src/manager/state/visibility_state_test.dart +++ b/test/src/manager/state/visibility_state_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../../helper/column_helper.dart'; import '../../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/model/pluto_column_group_test.dart b/test/src/model/pluto_column_group_test.dart index 18a74af6c..fc1cb3fc5 100644 --- a/test/src/model/pluto_column_group_test.dart +++ b/test/src/model/pluto_column_group_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; void main() { test('fields 가 null 이면 children 이 null 인 경우 assert 에러가 발생 되어야 한다.', () { diff --git a/test/src/model/pluto_column_test.dart b/test/src/model/pluto_column_test.dart index 5326d1fe8..2915044c1 100644 --- a/test/src/model/pluto_column_test.dart +++ b/test/src/model/pluto_column_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/row_helper.dart'; diff --git a/test/src/model/pluto_column_type_test.dart b/test/src/model/pluto_column_type_test.dart index 5cda8464a..21d2f81a9 100644 --- a/test/src/model/pluto_column_type_test.dart +++ b/test/src/model/pluto_column_type_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; void main() { group('text', () { diff --git a/test/src/model/pluto_row_test.dart b/test/src/model/pluto_row_test.dart index d4bf00477..d5eb4424b 100644 --- a/test/src/model/pluto_row_test.dart +++ b/test/src/model/pluto_row_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../matcher/pluto_object_matcher.dart'; diff --git a/test/src/plugin/pluto_aggregate_column_footer_test.dart b/test/src/plugin/pluto_aggregate_column_footer_test.dart index 9c13b005b..88883d604 100644 --- a/test/src/plugin/pluto_aggregate_column_footer_test.dart +++ b/test/src/plugin/pluto_aggregate_column_footer_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:rxdart/rxdart.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/plugin/pluto_pagination_test.dart b/test/src/plugin/pluto_pagination_test.dart index 2af7ce23a..93196c8b5 100644 --- a/test/src/plugin/pluto_pagination_test.dart +++ b/test/src/plugin/pluto_pagination_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:rxdart/rxdart.dart'; import '../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/pluto_dual_grid_popup_test.dart b/test/src/pluto_dual_grid_popup_test.dart index 81b655216..078217dd4 100644 --- a/test/src/pluto_dual_grid_popup_test.dart +++ b/test/src/pluto_dual_grid_popup_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../helper/column_helper.dart'; import '../helper/row_helper.dart'; diff --git a/test/src/pluto_dual_grid_test.dart b/test/src/pluto_dual_grid_test.dart index 9aaa9fe3a..91acf775b 100644 --- a/test/src/pluto_dual_grid_test.dart +++ b/test/src/pluto_dual_grid_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../helper/column_helper.dart'; import '../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/pluto_grid_configuration_test.dart b/test/src/pluto_grid_configuration_test.dart index d4212e037..9f3f2244d 100644 --- a/test/src/pluto_grid_configuration_test.dart +++ b/test/src/pluto_grid_configuration_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; void main() { testWidgets( diff --git a/test/src/pluto_grid_date_picker_test.dart b/test/src/pluto_grid_date_picker_test.dart index 2054867f8..8b7bb6d13 100644 --- a/test/src/pluto_grid_date_picker_test.dart +++ b/test/src/pluto_grid_date_picker_test.dart @@ -3,7 +3,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:intl/intl.dart' as intl; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/pluto_grid_popup_test.dart b/test/src/pluto_grid_popup_test.dart index e1625e5cf..e5623b99e 100644 --- a/test/src/pluto_grid_popup_test.dart +++ b/test/src/pluto_grid_popup_test.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../helper/column_helper.dart'; diff --git a/test/src/pluto_grid_test.dart b/test/src/pluto_grid_test.dart index 9db4e728e..f7d1a62dc 100644 --- a/test/src/pluto_grid_test.dart +++ b/test/src/pluto_grid_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../helper/column_helper.dart'; import '../helper/row_helper.dart'; diff --git a/test/src/ui/cells/pluto_currency_cell_test.dart b/test/src/ui/cells/pluto_currency_cell_test.dart index 0a20e19c2..950682ea8 100644 --- a/test/src/ui/cells/pluto_currency_cell_test.dart +++ b/test/src/ui/cells/pluto_currency_cell_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../helper/row_helper.dart'; diff --git a/test/src/ui/cells/pluto_date_cell_test.dart b/test/src/ui/cells/pluto_date_cell_test.dart index 430e00c9d..ad86f57bf 100644 --- a/test/src/ui/cells/pluto_date_cell_test.dart +++ b/test/src/ui/cells/pluto_date_cell_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/ui/cells/pluto_default_cell_test.dart b/test/src/ui/cells/pluto_default_cell_test.dart index ba69d4339..d86b21ca0 100644 --- a/test/src/ui/cells/pluto_default_cell_test.dart +++ b/test/src/ui/cells/pluto_default_cell_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; diff --git a/test/src/ui/cells/pluto_number_cell_test.dart b/test/src/ui/cells/pluto_number_cell_test.dart index 5ca8cd83c..e0ac69030 100644 --- a/test/src/ui/cells/pluto_number_cell_test.dart +++ b/test/src/ui/cells/pluto_number_cell_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:intl/intl.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/ui/cells/pluto_select_cell_test.dart b/test/src/ui/cells/pluto_select_cell_test.dart index c766792cf..e48e69e4b 100644 --- a/test/src/ui/cells/pluto_select_cell_test.dart +++ b/test/src/ui/cells/pluto_select_cell_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/ui/cells/pluto_text_cell_test.dart b/test/src/ui/cells/pluto_text_cell_test.dart index 96b7e82b0..cc13c8816 100644 --- a/test/src/ui/cells/pluto_text_cell_test.dart +++ b/test/src/ui/cells/pluto_text_cell_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/ui/cells/pluto_time_cell_test.dart b/test/src/ui/cells/pluto_time_cell_test.dart index 88790a9fb..e5f2058f1 100644 --- a/test/src/ui/cells/pluto_time_cell_test.dart +++ b/test/src/ui/cells/pluto_time_cell_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import '../../../helper/pluto_widget_test_helper.dart'; diff --git a/test/src/ui/columns/pluto_column_filter_test.dart b/test/src/ui/columns/pluto_column_filter_test.dart index 8174595b7..ab79383a9 100644 --- a/test/src/ui/columns/pluto_column_filter_test.dart +++ b/test/src/ui/columns/pluto_column_filter_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; diff --git a/test/src/ui/columns/pluto_column_title_test.dart b/test/src/ui/columns/pluto_column_title_test.dart index df56cc21b..5da94af17 100644 --- a/test/src/ui/columns/pluto_column_title_test.dart +++ b/test/src/ui/columns/pluto_column_title_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; diff --git a/test/src/ui/pluto_base_cell_test.dart b/test/src/ui/pluto_base_cell_test.dart index c8ddb30bb..e6919ae33 100644 --- a/test/src/ui/pluto_base_cell_test.dart +++ b/test/src/ui/pluto_base_cell_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; diff --git a/test/src/ui/pluto_base_column_footer_test.dart b/test/src/ui/pluto_base_column_footer_test.dart index 5db8e7da2..bd434015a 100644 --- a/test/src/ui/pluto_base_column_footer_test.dart +++ b/test/src/ui/pluto_base_column_footer_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/pluto_base_column_footer.dart'; import '../../mock/shared_mocks.mocks.dart'; diff --git a/test/src/ui/pluto_base_column_group_test.dart b/test/src/ui/pluto_base_column_group_test.dart index 507b8fb35..c99caefa8 100644 --- a/test/src/ui/pluto_base_column_group_test.dart +++ b/test/src/ui/pluto_base_column_group_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; diff --git a/test/src/ui/pluto_base_row_test.dart b/test/src/ui/pluto_base_row_test.dart index 16ea353c4..f23b4fcd8 100644 --- a/test/src/ui/pluto_base_row_test.dart +++ b/test/src/ui/pluto_base_row_test.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import 'package:pluto_grid_plus/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; diff --git a/test/src/widgets/pluto_scaled_checkbox_test.dart b/test/src/widgets/pluto_scaled_checkbox_test.dart index d2ceac648..fe23d7895 100644 --- a/test/src/widgets/pluto_scaled_checkbox_test.dart +++ b/test/src/widgets/pluto_scaled_checkbox_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; void main() { testWidgets( diff --git a/test/src/widgets/pluto_scrollbar_test.dart b/test/src/widgets/pluto_scrollbar_test.dart index 69350e548..8b2282fb0 100644 --- a/test/src/widgets/pluto_scrollbar_test.dart +++ b/test/src/widgets/pluto_scrollbar_test.dart @@ -2,7 +2,7 @@ import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; import '../../helper/test_helper_util.dart'; diff --git a/test/src/widgets/pluto_shadow_container_test.dart b/test/src/widgets/pluto_shadow_container_test.dart index 4fbf96635..9474f2cd0 100644 --- a/test/src/widgets/pluto_shadow_container_test.dart +++ b/test/src/widgets/pluto_shadow_container_test.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; void main() { testWidgets( From 3c1835fb31e8d70e90331e3c4c6a4f34cefc1fec Mon Sep 17 00:00:00 2001 From: doonfrs Date: Thu, 7 Dec 2023 23:55:05 +0300 Subject: [PATCH 06/80] update package name & version in readme file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3def278a3..0636bd4f2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## PlutoGrid for flutter - v7.0.2 +## PlutoGrid Plus for flutter - v8.0.0 [![Awesome Flutter](https://img.shields.io/badge/Awesome-Flutter-blue.svg)](https://github.com/Solido/awesome-flutter) [![codecov](https://codecov.io/gh/bosskmk/pluto_grid/branch/master/graph/badge.svg)](https://codecov.io/gh/bosskmk/pluto_grid) From 9f7c223a598b455599e4568391b938182bbfde32 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Fri, 8 Dec 2023 00:10:11 +0300 Subject: [PATCH 07/80] add onSelectedItem function in plutoColumnType.select https://github.com/bosskmk/pluto_grid/pull/935 --- lib/src/model/pluto_column_type.dart | 5 +++++ lib/src/ui/cells/pluto_select_cell.dart | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/lib/src/model/pluto_column_type.dart b/lib/src/model/pluto_column_type.dart index 12203c48b..353d445f1 100644 --- a/lib/src/model/pluto_column_type.dart +++ b/lib/src/model/pluto_column_type.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:intl/intl.dart' as intl; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class PlutoColumnType { dynamic get defaultValue; @@ -93,11 +94,13 @@ abstract class PlutoColumnType { /// The default icon is displayed, and if this value is set to null , the icon does not appear. factory PlutoColumnType.select( List items, { + final Function(PlutoGridOnSelectedEvent event)? onItemSelected, dynamic defaultValue = '', bool enableColumnFilter = false, IconData? popupIcon = Icons.arrow_drop_down, }) { return PlutoColumnTypeSelect( + onItemSelected: onItemSelected ?? (event) {}, defaultValue: defaultValue, items: items, enableColumnFilter: enableColumnFilter, @@ -359,11 +362,13 @@ class PlutoColumnTypeSelect final List items; final bool enableColumnFilter; + final Function(PlutoGridOnSelectedEvent event) onItemSelected; @override final IconData? popupIcon; const PlutoColumnTypeSelect({ + required this.onItemSelected, this.defaultValue, required this.items, required this.enableColumnFilter, diff --git a/lib/src/ui/cells/pluto_select_cell.dart b/lib/src/ui/cells/pluto_select_cell.dart index 3d6a99741..151fb5991 100644 --- a/lib/src/ui/cells/pluto_select_cell.dart +++ b/lib/src/ui/cells/pluto_select_cell.dart @@ -84,6 +84,12 @@ class PlutoSelectCellState extends State }).toList(); } + @override + void onSelected(PlutoGridOnSelectedEvent event) { + widget.column.type.select.onItemSelected(event); + super.onSelected(event); + } + @override void onLoaded(PlutoGridOnLoadedEvent event) { super.onLoaded(event); From 84bd66f1888e5521f5dadd3227ded1950c41dd55 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Fri, 8 Dec 2023 00:27:16 +0300 Subject: [PATCH 08/80] Add column title (padding, icon-size, and checkBox size to auto-fit calculation by @Milad-Akarie https://github.com/bosskmk/pluto_grid/pull/715 --- lib/src/manager/state/column_state.dart | 116 ++++++++++++++++------- lib/src/ui/cells/pluto_default_cell.dart | 74 ++++++++------- 2 files changed, 123 insertions(+), 67 deletions(-) diff --git a/lib/src/manager/state/column_state.dart b/lib/src/manager/state/column_state.dart index 6d6d31821..3c9e5316e 100644 --- a/lib/src/manager/state/column_state.dart +++ b/lib/src/manager/state/column_state.dart @@ -1,7 +1,10 @@ import 'dart:collection'; +import 'dart:math' as math; import 'package:flutter/material.dart'; -import 'package:pluto_grid_plus/pluto_grid_plus.dart'; + +import '../../../pluto_grid_plus.dart'; +import '../../ui/cells/pluto_default_cell.dart'; abstract class IColumnState { /// Columns provided at grid start. @@ -571,47 +574,72 @@ mixin ColumnState implements IPlutoGridState { @override void autoFitColumn(BuildContext context, PlutoColumn column) { - final String maxValue = refRows.fold('', (previousValue, element) { - final value = column.formattedValueForDisplay( - element.cells.entries - .firstWhere((element) => element.key == column.field) - .value - .value, - ); + String maxValue = ''; + bool hasExpandableRowGroup = false; + for (final row in refRows) { + final cell = row.cells.entries + .firstWhere((element) => element.key == column.field) + .value; + var value = column.formattedValueForDisplay(cell.value); + if (hasRowGroups) { + if (PlutoDefaultCell.showGroupCount(rowGroupDelegate!, cell)) { + final groupCountValue = + PlutoDefaultCell.groupCountText(rowGroupDelegate!, row); + if (groupCountValue.isNotEmpty) { + value = '$value $groupCountValue'; + } + } - if (previousValue.length < value.length) { - return value; + hasExpandableRowGroup |= + PlutoDefaultCell.canExpand(rowGroupDelegate!, cell); } - - return previousValue; - }); + if (maxValue.length < value.length) { + maxValue = value; + } + } // Get size after rendering virtually // https://stackoverflow.com/questions/54351655/flutter-textfield-width-should-match-width-of-contained-text - TextSpan textSpan = TextSpan( - style: DefaultTextStyle.of(context).style, - text: maxValue, - ); - - TextPainter textPainter = TextPainter( - text: textSpan, - textDirection: TextDirection.ltr, - ); - - textPainter.layout(); - - // todo : Apply (popup type icon, checkbox, drag indicator, renderer) + final titleTextWidth = + _visualTextWidth(column.title, style.columnTextStyle); + final maxValueTextWidth = _visualTextWidth(maxValue, style.cellTextStyle); + + // todo : Handle (renderer) width + + final calculatedTileWidth = titleTextWidth - + column.width + + [ + (column.titlePadding ?? style.defaultColumnTitlePadding).horizontal, + if (column.enableRowChecked) + _getEffectiveButtonWidth(context, checkBox: true), + if (column.isShowRightIcon) style.iconSize, + 8, + ].reduce((acc, a) => acc + a); + + final calculatedCellWidth = maxValueTextWidth - + column.width + + [ + (column.cellPadding ?? style.defaultCellPadding).horizontal, + if (hasExpandableRowGroup) _getEffectiveButtonWidth(context), + if (column.enableRowChecked) + _getEffectiveButtonWidth(context, checkBox: true), + if (column.isShowRightIcon) style.iconSize, + 2, + ].reduce((acc, a) => acc + a); - EdgeInsets cellPadding = - column.cellPadding ?? configuration.style.defaultCellPadding; + resizeColumn(column, math.max(calculatedTileWidth, calculatedCellWidth)); + } - resizeColumn( - column, - textPainter.width - - column.width + - (cellPadding.left + cellPadding.right) + - 2, - ); + double _visualTextWidth(String text, TextStyle style) { + if (text.isEmpty) return 0; + final painter = TextPainter( + text: TextSpan( + style: style, + text: text, + ), + textDirection: isRTL ? TextDirection.rtl : TextDirection.ltr, + )..layout(); + return painter.width; } @override @@ -1031,4 +1059,22 @@ mixin ColumnState implements IPlutoGridState { return resizeHelper.update(); } + + double _getEffectiveButtonWidth(BuildContext context, + {bool checkBox = false}) { + final theme = Theme.of(context); + late double width; + switch (theme.materialTapTargetSize) { + case MaterialTapTargetSize.padded: + width = kMinInteractiveDimension; + break; + case MaterialTapTargetSize.shrinkWrap: + width = kMinInteractiveDimension - 8.0; + break; + } + if (!checkBox) { + return width; + } + return width + theme.visualDensity.baseSizeAdjustment.dx; + } } diff --git a/lib/src/ui/cells/pluto_default_cell.dart b/lib/src/ui/cells/pluto_default_cell.dart index 09d738cd0..00386629e 100644 --- a/lib/src/ui/cells/pluto_default_cell.dart +++ b/lib/src/ui/cells/pluto_default_cell.dart @@ -27,6 +27,37 @@ class PlutoDefaultCell extends PlutoStatefulWidget { @override State createState() => _PlutoDefaultCellState(); + + static String groupCountText(PlutoRowGroupDelegate delegate, PlutoRow row) { + final compactCount = delegate.enableCompactCount; + final count = compactCount + ? delegate.compactNumber(row.type.group.children.length) + : row.type.group.children.length.toString(); + return '($count)'; + } + + static TextStyle groupCountTextStyle(PlutoGridStyleConfig style) { + return style.cellTextStyle.copyWith( + decoration: TextDecoration.none, + fontWeight: FontWeight.normal, + ); + } + + static bool canExpand(PlutoRowGroupDelegate? delegate, PlutoCell cell) { + if (delegate == null) return false; + if (!cell.row.type.isGroup || !delegate.enabled) { + return false; + } + return delegate.isExpandableCell(cell); + } + + static bool showGroupCount(PlutoRowGroupDelegate? delegate, PlutoCell cell) { + if (delegate == null) return false; + return delegate.enabled && + delegate.isExpandableCell(cell) && + cell.row.type.isGroup && + delegate.showCount; + } } class _PlutoDefaultCellState extends PlutoStateWithChange { @@ -41,24 +72,16 @@ class _PlutoDefaultCellState extends PlutoStateWithChange { @override PlutoGridStateManager get stateManager => widget.stateManager; - bool get _canExpand { - if (!widget.row.type.isGroup || !stateManager.enabledRowGroups) { - return false; - } - - return _isExpandableCell; - } - - bool get _isExpandableCell => - stateManager.rowGroupDelegate!.isExpandableCell(widget.cell); - bool get _showSpacing { if (!stateManager.enabledRowGroups || !stateManager.rowGroupDelegate!.showFirstExpandableIcon) { return false; } - if (_canExpand) return true; + if (PlutoDefaultCell.canExpand( + stateManager.rowGroupDelegate!, widget.cell)) { + return true; + } final parentCell = widget.row.parent?.cells[widget.column.field]; @@ -68,19 +91,6 @@ class _PlutoDefaultCellState extends PlutoStateWithChange { bool get _isEmptyGroup => widget.row.type.group.children.isEmpty; - bool get _showGroupCount => - stateManager.enabledRowGroups && - _isExpandableCell && - widget.row.type.isGroup && - stateManager.rowGroupDelegate!.showCount; - - String get _groupCount => _compactCount - ? stateManager.rowGroupDelegate! - .compactNumber(widget.row.type.group.children.length) - : widget.row.type.group.children.length.toString(); - - bool get _compactCount => stateManager.rowGroupDelegate!.enableCompactCount; - @override void initState() { super.initState(); @@ -140,7 +150,8 @@ class _PlutoDefaultCellState extends PlutoStateWithChange { } Widget? expandIcon; - if (_canExpand) { + if (PlutoDefaultCell.canExpand( + stateManager.rowGroupDelegate, widget.cell)) { expandIcon = IconButton( onPressed: _isEmptyGroup ? null : _handleToggleExpandedRowGroup, icon: _isEmptyGroup @@ -187,13 +198,12 @@ class _PlutoDefaultCellState extends PlutoStateWithChange { if (spacingWidget != null) spacingWidget, if (expandIcon != null) expandIcon, Expanded(child: cellWidget), - if (_showGroupCount) + if (PlutoDefaultCell.showGroupCount( + stateManager.rowGroupDelegate, widget.cell)) Text( - '($_groupCount)', - style: stateManager.configuration.style.cellTextStyle.copyWith( - decoration: TextDecoration.none, - fontWeight: FontWeight.normal, - ), + PlutoDefaultCell.groupCountText( + stateManager.rowGroupDelegate!, widget.row), + style: PlutoDefaultCell.groupCountTextStyle(stateManager.style), ), ]); } From 36207fde217db9a32e683ab3485e61e60ef4d3d2 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Fri, 8 Dec 2023 00:38:19 +0300 Subject: [PATCH 09/80] Customize filter column by @RamshaFarheen https://github.com/bosskmk/pluto_grid/pull/739 --- lib/src/manager/state/column_state.dart | 18 +- lib/src/model/pluto_column.dart | 16 ++ lib/src/pluto_grid_configuration.dart | 244 ++++++++++---------- lib/src/pluto_grid_popup.dart | 11 +- lib/src/ui/columns/pluto_column_filter.dart | 43 ++-- 5 files changed, 185 insertions(+), 147 deletions(-) diff --git a/lib/src/manager/state/column_state.dart b/lib/src/manager/state/column_state.dart index 3c9e5316e..525198431 100644 --- a/lib/src/manager/state/column_state.dart +++ b/lib/src/manager/state/column_state.dart @@ -754,15 +754,15 @@ mixin ColumnState implements IPlutoGridState { final columns = [ PlutoColumn( - title: configuration.localeText.setColumnsTitle, - field: titleField, - type: PlutoColumnType.text(), - enableRowChecked: true, - enableEditingMode: false, - enableDropToResize: true, - enableContextMenu: false, - enableColumnDrag: false, - ), + title: configuration.localeText.setColumnsTitle, + field: titleField, + type: PlutoColumnType.text(), + enableRowChecked: true, + enableEditingMode: false, + enableDropToResize: true, + enableContextMenu: false, + enableColumnDrag: false, + backgroundColor: configuration.style.filterHeaderColor), PlutoColumn( title: 'hidden column', field: columnField, diff --git a/lib/src/model/pluto_column.dart b/lib/src/model/pluto_column.dart index a79d723f1..d8145c7f0 100644 --- a/lib/src/model/pluto_column.dart +++ b/lib/src/model/pluto_column.dart @@ -176,6 +176,18 @@ class PlutoColumn { /// Valid only when [enableContextMenu] is activated. bool enableFilterMenuItem; + ///Set hint text for filter field + String? filterHintText; + + ///Set hint text color for filter field + Color? filterHintTextColor; + + ///Set suffix icon for filter field + Icon? filterSuffixIcon; + + ///Set custom widget + Widget? filterWidget; + /// Displays Hide column menu in the column context menu. /// Valid only when [enableContextMenu] is activated. bool enableHideColumnMenuItem; @@ -221,6 +233,10 @@ class PlutoColumn { this.enableContextMenu = true, this.enableDropToResize = true, this.enableFilterMenuItem = true, + this.filterHintText, + this.filterHintTextColor, + this.filterSuffixIcon, + this.filterWidget, this.enableHideColumnMenuItem = true, this.enableSetColumnsMenuItem = true, this.enableAutoEditing = false, diff --git a/lib/src/pluto_grid_configuration.dart b/lib/src/pluto_grid_configuration.dart index bf25c5171..a569697af 100644 --- a/lib/src/pluto_grid_configuration.dart +++ b/lib/src/pluto_grid_configuration.dart @@ -245,63 +245,66 @@ class PlutoGridStyleConfig { this.rowGroupEmptyIcon = Icons.noise_control_off, this.gridBorderRadius = BorderRadius.zero, this.gridPopupBorderRadius = BorderRadius.zero, + this.filterHeaderColor, + this.filterHeaderIconColor, }); - const PlutoGridStyleConfig.dark({ - this.enableGridBorderShadow = false, - this.enableColumnBorderVertical = true, - this.enableColumnBorderHorizontal = true, - this.enableCellBorderVertical = true, - this.enableCellBorderHorizontal = true, - this.enableRowColorAnimation = false, - this.gridBackgroundColor = const Color(0xFF111111), - this.rowColor = const Color(0xFF111111), - this.oddRowColor, - this.evenRowColor, - this.activatedColor = const Color(0xFF313131), - this.checkedColor = const Color(0x11202020), - this.cellColorInEditState = const Color(0xFF666666), - this.cellColorInReadOnlyState = const Color(0xFF222222), - this.cellColorGroupedRow, - this.dragTargetColumnColor = const Color(0xFF313131), - this.iconColor = Colors.white38, - this.disabledIconColor = Colors.white12, - this.menuBackgroundColor = const Color(0xFF414141), - this.gridBorderColor = const Color(0xFF666666), - this.borderColor = const Color(0xFF222222), - this.activatedBorderColor = const Color(0xFFFFFFFF), - this.inactivatedBorderColor = const Color(0xFF666666), - this.iconSize = 18, - this.rowHeight = PlutoGridSettings.rowHeight, - this.columnHeight = PlutoGridSettings.rowHeight, - this.columnFilterHeight = PlutoGridSettings.rowHeight, - this.defaultColumnTitlePadding = PlutoGridSettings.columnTitlePadding, - this.defaultColumnFilterPadding = PlutoGridSettings.columnFilterPadding, - this.defaultCellPadding = PlutoGridSettings.cellPadding, - this.columnTextStyle = const TextStyle( - color: Colors.white, - decoration: TextDecoration.none, - fontSize: 14, - fontWeight: FontWeight.w600, - ), - this.cellTextStyle = const TextStyle( - color: Colors.white, - fontSize: 14, - ), - this.columnContextIcon = Icons.dehaze, - this.columnResizeIcon = Icons.code_sharp, - this.columnAscendingIcon, - this.columnDescendingIcon, - this.rowGroupExpandedIcon = Icons.keyboard_arrow_down, - this.rowGroupCollapsedIcon = const IconData( - 0xe355, - matchTextDirection: true, - fontFamily: 'MaterialIcons', - ), - this.rowGroupEmptyIcon = Icons.noise_control_off, - this.gridBorderRadius = BorderRadius.zero, - this.gridPopupBorderRadius = BorderRadius.zero, - }); + const PlutoGridStyleConfig.dark( + {this.enableGridBorderShadow = false, + this.enableColumnBorderVertical = true, + this.enableColumnBorderHorizontal = true, + this.enableCellBorderVertical = true, + this.enableCellBorderHorizontal = true, + this.enableRowColorAnimation = false, + this.gridBackgroundColor = const Color(0xFF111111), + this.rowColor = const Color(0xFF111111), + this.oddRowColor, + this.evenRowColor, + this.activatedColor = const Color(0xFF313131), + this.checkedColor = const Color(0x11202020), + this.cellColorInEditState = const Color(0xFF666666), + this.cellColorInReadOnlyState = const Color(0xFF222222), + this.cellColorGroupedRow, + this.dragTargetColumnColor = const Color(0xFF313131), + this.iconColor = Colors.white38, + this.disabledIconColor = Colors.white12, + this.menuBackgroundColor = const Color(0xFF414141), + this.gridBorderColor = const Color(0xFF666666), + this.borderColor = const Color(0xFF222222), + this.activatedBorderColor = const Color(0xFFFFFFFF), + this.inactivatedBorderColor = const Color(0xFF666666), + this.iconSize = 18, + this.rowHeight = PlutoGridSettings.rowHeight, + this.columnHeight = PlutoGridSettings.rowHeight, + this.columnFilterHeight = PlutoGridSettings.rowHeight, + this.defaultColumnTitlePadding = PlutoGridSettings.columnTitlePadding, + this.defaultColumnFilterPadding = PlutoGridSettings.columnFilterPadding, + this.defaultCellPadding = PlutoGridSettings.cellPadding, + this.columnTextStyle = const TextStyle( + color: Colors.white, + decoration: TextDecoration.none, + fontSize: 14, + fontWeight: FontWeight.w600, + ), + this.cellTextStyle = const TextStyle( + color: Colors.white, + fontSize: 14, + ), + this.columnContextIcon = Icons.dehaze, + this.columnResizeIcon = Icons.code_sharp, + this.columnAscendingIcon, + this.columnDescendingIcon, + this.rowGroupExpandedIcon = Icons.keyboard_arrow_down, + this.rowGroupCollapsedIcon = const IconData( + 0xe355, + matchTextDirection: true, + fontFamily: 'MaterialIcons', + ), + this.rowGroupEmptyIcon = Icons.noise_control_off, + this.gridBorderRadius = BorderRadius.zero, + this.gridPopupBorderRadius = BorderRadius.zero, + this.filterHeaderColor, + this.filterHeaderIconColor}); /// Enable borderShadow in [PlutoGrid]. final bool enableGridBorderShadow; @@ -448,6 +451,12 @@ class PlutoGridStyleConfig { /// Apply border radius to popup opened inside [PlutoGrid]. final BorderRadiusGeometry gridPopupBorderRadius; + /// Set color of filter popup header + final Color? filterHeaderColor; + + /// Set color of filter popup header icon + final Color? filterHeaderIconColor; + PlutoGridStyleConfig copyWith({ bool? enableGridBorderShadow, bool? enableColumnBorderVertical, @@ -492,68 +501,69 @@ class PlutoGridStyleConfig { BorderRadiusGeometry? gridPopupBorderRadius, }) { return PlutoGridStyleConfig( - enableGridBorderShadow: - enableGridBorderShadow ?? this.enableGridBorderShadow, - enableColumnBorderVertical: - enableColumnBorderVertical ?? this.enableColumnBorderVertical, - enableColumnBorderHorizontal: - enableColumnBorderHorizontal ?? this.enableColumnBorderHorizontal, - enableCellBorderVertical: - enableCellBorderVertical ?? this.enableCellBorderVertical, - enableCellBorderHorizontal: - enableCellBorderHorizontal ?? this.enableCellBorderHorizontal, - enableRowColorAnimation: - enableRowColorAnimation ?? this.enableRowColorAnimation, - gridBackgroundColor: gridBackgroundColor ?? this.gridBackgroundColor, - rowColor: rowColor ?? this.rowColor, - oddRowColor: oddRowColor == null ? this.oddRowColor : oddRowColor.value, - evenRowColor: - evenRowColor == null ? this.evenRowColor : evenRowColor.value, - activatedColor: activatedColor ?? this.activatedColor, - checkedColor: checkedColor ?? this.checkedColor, - cellColorInEditState: cellColorInEditState ?? this.cellColorInEditState, - cellColorInReadOnlyState: - cellColorInReadOnlyState ?? this.cellColorInReadOnlyState, - cellColorGroupedRow: cellColorGroupedRow == null - ? this.cellColorGroupedRow - : cellColorGroupedRow.value, - dragTargetColumnColor: - dragTargetColumnColor ?? this.dragTargetColumnColor, - iconColor: iconColor ?? this.iconColor, - disabledIconColor: disabledIconColor ?? this.disabledIconColor, - menuBackgroundColor: menuBackgroundColor ?? this.menuBackgroundColor, - gridBorderColor: gridBorderColor ?? this.gridBorderColor, - borderColor: borderColor ?? this.borderColor, - activatedBorderColor: activatedBorderColor ?? this.activatedBorderColor, - inactivatedBorderColor: - inactivatedBorderColor ?? this.inactivatedBorderColor, - iconSize: iconSize ?? this.iconSize, - rowHeight: rowHeight ?? this.rowHeight, - columnHeight: columnHeight ?? this.columnHeight, - columnFilterHeight: columnFilterHeight ?? this.columnFilterHeight, - defaultColumnTitlePadding: - defaultColumnTitlePadding ?? this.defaultColumnTitlePadding, - defaultColumnFilterPadding: - defaultColumnFilterPadding ?? this.defaultColumnFilterPadding, - defaultCellPadding: defaultCellPadding ?? this.defaultCellPadding, - columnTextStyle: columnTextStyle ?? this.columnTextStyle, - cellTextStyle: cellTextStyle ?? this.cellTextStyle, - columnContextIcon: columnContextIcon ?? this.columnContextIcon, - columnResizeIcon: columnResizeIcon ?? this.columnResizeIcon, - columnAscendingIcon: columnAscendingIcon == null - ? this.columnAscendingIcon - : columnAscendingIcon.value, - columnDescendingIcon: columnDescendingIcon == null - ? this.columnDescendingIcon - : columnDescendingIcon.value, - rowGroupExpandedIcon: rowGroupExpandedIcon ?? this.rowGroupExpandedIcon, - rowGroupCollapsedIcon: - rowGroupCollapsedIcon ?? this.rowGroupCollapsedIcon, - rowGroupEmptyIcon: rowGroupEmptyIcon ?? this.rowGroupEmptyIcon, - gridBorderRadius: gridBorderRadius ?? this.gridBorderRadius, - gridPopupBorderRadius: - gridPopupBorderRadius ?? this.gridPopupBorderRadius, - ); + enableGridBorderShadow: + enableGridBorderShadow ?? this.enableGridBorderShadow, + enableColumnBorderVertical: + enableColumnBorderVertical ?? this.enableColumnBorderVertical, + enableColumnBorderHorizontal: + enableColumnBorderHorizontal ?? this.enableColumnBorderHorizontal, + enableCellBorderVertical: + enableCellBorderVertical ?? this.enableCellBorderVertical, + enableCellBorderHorizontal: + enableCellBorderHorizontal ?? this.enableCellBorderHorizontal, + enableRowColorAnimation: + enableRowColorAnimation ?? this.enableRowColorAnimation, + gridBackgroundColor: gridBackgroundColor ?? this.gridBackgroundColor, + rowColor: rowColor ?? this.rowColor, + oddRowColor: oddRowColor == null ? this.oddRowColor : oddRowColor.value, + evenRowColor: + evenRowColor == null ? this.evenRowColor : evenRowColor.value, + activatedColor: activatedColor ?? this.activatedColor, + checkedColor: checkedColor ?? this.checkedColor, + cellColorInEditState: cellColorInEditState ?? this.cellColorInEditState, + cellColorInReadOnlyState: + cellColorInReadOnlyState ?? this.cellColorInReadOnlyState, + cellColorGroupedRow: cellColorGroupedRow == null + ? this.cellColorGroupedRow + : cellColorGroupedRow.value, + dragTargetColumnColor: + dragTargetColumnColor ?? this.dragTargetColumnColor, + iconColor: iconColor ?? this.iconColor, + disabledIconColor: disabledIconColor ?? this.disabledIconColor, + menuBackgroundColor: menuBackgroundColor ?? this.menuBackgroundColor, + gridBorderColor: gridBorderColor ?? this.gridBorderColor, + borderColor: borderColor ?? this.borderColor, + activatedBorderColor: activatedBorderColor ?? this.activatedBorderColor, + inactivatedBorderColor: + inactivatedBorderColor ?? this.inactivatedBorderColor, + iconSize: iconSize ?? this.iconSize, + rowHeight: rowHeight ?? this.rowHeight, + columnHeight: columnHeight ?? this.columnHeight, + columnFilterHeight: columnFilterHeight ?? this.columnFilterHeight, + defaultColumnTitlePadding: + defaultColumnTitlePadding ?? this.defaultColumnTitlePadding, + defaultColumnFilterPadding: + defaultColumnFilterPadding ?? this.defaultColumnFilterPadding, + defaultCellPadding: defaultCellPadding ?? this.defaultCellPadding, + columnTextStyle: columnTextStyle ?? this.columnTextStyle, + cellTextStyle: cellTextStyle ?? this.cellTextStyle, + columnContextIcon: columnContextIcon ?? this.columnContextIcon, + columnResizeIcon: columnResizeIcon ?? this.columnResizeIcon, + columnAscendingIcon: columnAscendingIcon == null + ? this.columnAscendingIcon + : columnAscendingIcon.value, + columnDescendingIcon: columnDescendingIcon == null + ? this.columnDescendingIcon + : columnDescendingIcon.value, + rowGroupExpandedIcon: rowGroupExpandedIcon ?? this.rowGroupExpandedIcon, + rowGroupCollapsedIcon: + rowGroupCollapsedIcon ?? this.rowGroupCollapsedIcon, + rowGroupEmptyIcon: rowGroupEmptyIcon ?? this.rowGroupEmptyIcon, + gridBorderRadius: gridBorderRadius ?? this.gridBorderRadius, + gridPopupBorderRadius: + gridPopupBorderRadius ?? this.gridPopupBorderRadius, + filterHeaderColor: filterHeaderColor ?? filterHeaderColor, + filterHeaderIconColor: filterHeaderIconColor ?? filterHeaderIconColor); } @override diff --git a/lib/src/pluto_grid_popup.dart b/lib/src/pluto_grid_popup.dart index 89b36db9b..2666e5687 100644 --- a/lib/src/pluto_grid_popup.dart +++ b/lib/src/pluto_grid_popup.dart @@ -102,6 +102,15 @@ class PlutoGridPopup { open(); } + setColumnConfig() { + columns.map((element) { + if (configuration.style.filterHeaderColor != null) { + element.backgroundColor = configuration.style.filterHeaderColor!; + } + }).toList(); + return columns; + } + Future open() async { final textDirection = Directionality.of(context); @@ -126,7 +135,7 @@ class PlutoGridPopup { child: Directionality( textDirection: textDirection, child: PlutoGrid( - columns: columns, + columns: setColumnConfig(), rows: rows, columnGroups: columnGroups, onLoaded: onLoaded, diff --git a/lib/src/ui/columns/pluto_column_filter.dart b/lib/src/ui/columns/pluto_column_filter.dart index 28cb968a0..aaee97f32 100644 --- a/lib/src/ui/columns/pluto_column_filter.dart +++ b/lib/src/ui/columns/pluto_column_filter.dart @@ -254,27 +254,30 @@ class PlutoColumnFilterState extends PlutoStateWithChange { ), child: Padding( padding: _padding, - child: Center( - child: TextField( - focusNode: _focusNode, - controller: _controller, - enabled: _enabled, - style: style.cellTextStyle, - onTap: _handleOnTap, - onChanged: _handleOnChanged, - onEditingComplete: _handleOnEditingComplete, - decoration: InputDecoration( - hintText: _enabled ? widget.column.defaultFilter.title : '', - filled: true, - fillColor: _textFieldColor, - border: _border, - enabledBorder: _border, - disabledBorder: _disabledBorder, - focusedBorder: _enabledBorder, - contentPadding: const EdgeInsets.all(5), + child: widget.column.filterWidget ?? + TextField( + focusNode: _focusNode, + controller: _controller, + enabled: _enabled, + style: style.cellTextStyle, + onTap: _handleOnTap, + onChanged: _handleOnChanged, + onEditingComplete: _handleOnEditingComplete, + decoration: InputDecoration( + suffixIcon: widget.column.filterSuffixIcon, + hintText: widget.column.filterHintText ?? + (_enabled ? widget.column.defaultFilter.title : ''), + filled: true, + hintStyle: + TextStyle(color: widget.column.filterHintTextColor), + fillColor: _textFieldColor, + border: _border, + enabledBorder: _border, + disabledBorder: _disabledBorder, + focusedBorder: _enabledBorder, + contentPadding: const EdgeInsets.all(5), + ), ), - ), - ), ), ), ); From a84babedcda03f00dd048a06f69de7812323c12b Mon Sep 17 00:00:00 2001 From: doonfrs Date: Fri, 8 Dec 2023 02:00:48 +0300 Subject: [PATCH 10/80] fix unit test for autoFitColumn --- test/src/manager/state/column_state_test.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/src/manager/state/column_state_test.dart b/test/src/manager/state/column_state_test.dart index 542cac1a6..f50dafca3 100644 --- a/test/src/manager/state/column_state_test.dart +++ b/test/src/manager/state/column_state_test.dart @@ -1714,9 +1714,10 @@ void main() { ), ); + double oldWidth = columns.first.width; stateManager.autoFitColumn(context, columns.first); - expect(columns.first.width, columns.first.minWidth); + expect(columns.first.width, lessThan(oldWidth)); }); testWidgets('가장 넓은 셀이 컬럼 최소 넓이보다 큰 경우 최소 넓이 이상으로 변경 되어야 한다.', From 76e63b4cbcdb1bee1862157ad722721bb189ea98 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Fri, 8 Dec 2023 02:01:09 +0300 Subject: [PATCH 11/80] update readme, version and changelog --- CHANGELOG.md | 6 ++++++ README.md | 3 ++- pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eddf3267..d3c694591 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [8.1.0] - 2023. 12. 8 +* Customize filter column by @RamshaFarheen bosskmk#739 +* Add column title (padding, icon-size, and checkBox size to auto-fit calculation by @Milad-Akarie bosskmk#715 +* add onSelectedItem function in plutoColumnType.select bosskmk#935 + + ## [8.0.0] - 2023. 7. 12 * Change Package name to pluto_grid_plus * Upgrade the packages to the latest version. diff --git a/README.md b/README.md index 0636bd4f2..18086e004 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -## PlutoGrid Plus for flutter - v8.0.0 +## PlutoGrid Plus for flutter - v8.1.0 +PlutoGrid Plus is a maintained version of https://github.com/bosskmk/pluto_grid [![Awesome Flutter](https://img.shields.io/badge/Awesome-Flutter-blue.svg)](https://github.com/Solido/awesome-flutter) [![codecov](https://codecov.io/gh/bosskmk/pluto_grid/branch/master/graph/badge.svg)](https://codecov.io/gh/bosskmk/pluto_grid) diff --git a/pubspec.yaml b/pubspec.yaml index 49323f8d5..4d95cfa81 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pluto_grid_plus description: PlutoGrid plus is a maintained version of PlutoGrid, PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS. (DataGrid, DataTable, Data Grid, Data Table, Sticky) -version: 8.0.0 +version: 8.1.0 homepage: https://pluto.weblaze.dev repository: https://github.com/doonfrs/pluto_grid_plus From ef3804af28c1c88606967da946bf9e47505d10e2 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Tue, 19 Dec 2023 18:18:25 +0300 Subject: [PATCH 12/80] update build files --- example/android/build.gradle | 2 +- .../android/gradle/wrapper/gradle-wrapper.properties | 2 +- example/windows/flutter/CMakeLists.txt | 7 ++++++- example/windows/runner/Runner.rc | 10 +++++----- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/example/android/build.gradle b/example/android/build.gradle index 24047dce5..7af76c2ae 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index bc6a58afd..cfe88f690 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip diff --git a/example/windows/flutter/CMakeLists.txt b/example/windows/flutter/CMakeLists.txt index b2e4bd8d6..4f2af69bb 100644 --- a/example/windows/flutter/CMakeLists.txt +++ b/example/windows/flutter/CMakeLists.txt @@ -9,6 +9,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake) # https://github.com/flutter/flutter/issues/57146. set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + # === Flutter Library === set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") @@ -91,7 +96,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ + ${FLUTTER_TARGET_PLATFORM} $ VERBATIM ) add_custom_target(flutter_assemble DEPENDS diff --git a/example/windows/runner/Runner.rc b/example/windows/runner/Runner.rc index 51812dcd4..e5666e022 100644 --- a/example/windows/runner/Runner.rc +++ b/example/windows/runner/Runner.rc @@ -60,14 +60,14 @@ IDI_APP_ICON ICON "resources\\app_icon.ico" // Version // -#ifdef FLUTTER_BUILD_NUMBER -#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD #else -#define VERSION_AS_NUMBER 1,0,0 +#define VERSION_AS_NUMBER 1,0,0,0 #endif -#ifdef FLUTTER_BUILD_NAME -#define VERSION_AS_STRING #FLUTTER_BUILD_NAME +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION #else #define VERSION_AS_STRING "1.0.0" #endif From fffbd4b9b9c690c64beed354d006b152b2c85a1c Mon Sep 17 00:00:00 2001 From: doonfrs Date: Tue, 19 Dec 2023 18:19:52 +0300 Subject: [PATCH 13/80] add builder feature for select column type --- example/lib/main.dart | 24 +++++++++++++++++++- lib/src/model/pluto_column_type.dart | 29 ++++++++++++++----------- lib/src/ui/cells/pluto_select_cell.dart | 8 +++++++ 3 files changed, 47 insertions(+), 14 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index bf14b9294..b075606f8 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -56,6 +56,24 @@ class _PlutoGridExamplePageState extends State { 'Owner', ]), ), + PlutoColumn( + title: 'Role 2', + field: 'role2', + type: PlutoColumnType.select( + [ + 'Programmer', + 'Designer', + 'Owner', + ], + builder: (item) { + return Row(children: [ + Icon(item == 'Programmer' ? Icons.code : Icons.design_services), + const SizedBox(width: 8), + Text(item), + ]); + }, + ), + ), PlutoColumn( title: 'Joined', field: 'joined', @@ -99,6 +117,7 @@ class _PlutoGridExamplePageState extends State { 'name': PlutoCell(value: 'Mike'), 'age': PlutoCell(value: 20), 'role': PlutoCell(value: 'Programmer'), + 'role2': PlutoCell(value: 'Programmer'), 'joined': PlutoCell(value: '2021-01-01'), 'working_time': PlutoCell(value: '09:00'), 'salary': PlutoCell(value: 300), @@ -110,6 +129,7 @@ class _PlutoGridExamplePageState extends State { 'name': PlutoCell(value: 'Jack'), 'age': PlutoCell(value: 25), 'role': PlutoCell(value: 'Designer'), + 'role2': PlutoCell(value: 'Designer'), 'joined': PlutoCell(value: '2021-02-01'), 'working_time': PlutoCell(value: '10:00'), 'salary': PlutoCell(value: 400), @@ -121,6 +141,7 @@ class _PlutoGridExamplePageState extends State { 'name': PlutoCell(value: 'Suzi'), 'age': PlutoCell(value: 40), 'role': PlutoCell(value: 'Owner'), + 'role2': PlutoCell(value: 'Owner'), 'joined': PlutoCell(value: '2021-03-01'), 'working_time': PlutoCell(value: '11:00'), 'salary': PlutoCell(value: 700), @@ -134,7 +155,8 @@ class _PlutoGridExamplePageState extends State { PlutoColumnGroup(title: 'User information', fields: ['name', 'age']), PlutoColumnGroup(title: 'Status', children: [ PlutoColumnGroup(title: 'A', fields: ['role'], expandedColumn: true), - PlutoColumnGroup(title: 'Etc.', fields: ['joined', 'working_time']), + PlutoColumnGroup( + title: 'Etc.', fields: ['joined', 'working_time', 'role2']), ]), ]; diff --git a/lib/src/model/pluto_column_type.dart b/lib/src/model/pluto_column_type.dart index 353d445f1..68256a852 100644 --- a/lib/src/model/pluto_column_type.dart +++ b/lib/src/model/pluto_column_type.dart @@ -98,14 +98,15 @@ abstract class PlutoColumnType { dynamic defaultValue = '', bool enableColumnFilter = false, IconData? popupIcon = Icons.arrow_drop_down, + Widget Function(dynamic item)? builder, }) { return PlutoColumnTypeSelect( - onItemSelected: onItemSelected ?? (event) {}, - defaultValue: defaultValue, - items: items, - enableColumnFilter: enableColumnFilter, - popupIcon: popupIcon, - ); + onItemSelected: onItemSelected ?? (event) {}, + defaultValue: defaultValue, + items: items, + enableColumnFilter: enableColumnFilter, + popupIcon: popupIcon, + builder: builder); } /// Set as a date column. @@ -361,19 +362,21 @@ class PlutoColumnTypeSelect final List items; + final Widget Function(dynamic item)? builder; + final bool enableColumnFilter; final Function(PlutoGridOnSelectedEvent event) onItemSelected; @override final IconData? popupIcon; - const PlutoColumnTypeSelect({ - required this.onItemSelected, - this.defaultValue, - required this.items, - required this.enableColumnFilter, - this.popupIcon, - }); + const PlutoColumnTypeSelect( + {required this.onItemSelected, + this.defaultValue, + required this.items, + required this.enableColumnFilter, + this.popupIcon, + this.builder}); @override bool isValid(dynamic value) => items.contains(value) == true; diff --git a/lib/src/ui/cells/pluto_select_cell.dart b/lib/src/ui/cells/pluto_select_cell.dart index 151fb5991..d13c2acbf 100644 --- a/lib/src/ui/cells/pluto_select_cell.dart +++ b/lib/src/ui/cells/pluto_select_cell.dart @@ -72,6 +72,14 @@ class PlutoSelectCellState extends State enableFilterMenuItem: enableColumnFilter, enableHideColumnMenuItem: false, enableSetColumnsMenuItem: false, + renderer: widget.column.type.select.builder == null + ? null + : (rendererContext) { + var item = + widget.column.type.select.items[rendererContext.rowIdx]; + + return widget.column.type.select.builder!(item); + }, ) ]; From 36ed914a7de19d7fa552181036dc7f36d2b8c666 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Tue, 19 Dec 2023 18:32:00 +0300 Subject: [PATCH 14/80] increase version & update change log --- CHANGELOG.md | 3 +++ lib/src/manager/pluto_grid_state_manager.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3c694591..d44f9ad36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [8.2.0] - 2023. 12. 19 +* Add builder function in plutoColumnType.select allow user to customize the popup by item widget. + ## [8.1.0] - 2023. 12. 8 * Customize filter column by @RamshaFarheen bosskmk#739 * Add column title (padding, icon-size, and checkBox size to auto-fit calculation by @Milad-Akarie bosskmk#715 diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index a64bc43f4..20df94c7c 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -205,8 +205,8 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier /// stateManager.refRows.addAll(FilteredList(initialList: value)); /// stateManager.notifyListeners(); /// }); -/// {@endtemplate} /// ``` +/// {@endtemplate} class PlutoGridStateManager extends PlutoGridStateChangeNotifier { PlutoGridStateManager({ required super.columns, diff --git a/pubspec.yaml b/pubspec.yaml index 4d95cfa81..3266789f5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pluto_grid_plus description: PlutoGrid plus is a maintained version of PlutoGrid, PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS. (DataGrid, DataTable, Data Grid, Data Table, Sticky) -version: 8.1.0 +version: 8.2.0 homepage: https://pluto.weblaze.dev repository: https://github.com/doonfrs/pluto_grid_plus From 08879cbb17759905c2cbf8fa0713b0fc6c0187be Mon Sep 17 00:00:00 2001 From: Anthony S Date: Sat, 17 Feb 2024 19:56:22 -0600 Subject: [PATCH 15/80] Fixes #6 Migrate RawKeyboardEvent and related implications according to Flutter recommendations --- lib/src/helper/pluto_key_manager_event.dart | 13 +++++---- lib/src/manager/pluto_grid_key_manager.dart | 2 +- .../manager/shortcut/pluto_grid_shortcut.dart | 2 +- .../shortcut/pluto_grid_shortcut_action.dart | 6 ++-- lib/src/pluto_grid.dart | 4 +-- lib/src/ui/cells/popup_cell.dart | 4 +-- lib/src/ui/cells/text_cell.dart | 4 +-- lib/src/ui/columns/pluto_column_filter.dart | 4 +-- .../helper/pluto_key_manager_event_test.dart | 23 ++++++++++----- .../manager/pluto_grid_key_manager_test.dart | 28 +++++++++---------- 10 files changed, 50 insertions(+), 40 deletions(-) diff --git a/lib/src/helper/pluto_key_manager_event.dart b/lib/src/helper/pluto_key_manager_event.dart index 91267675c..3e31a927f 100644 --- a/lib/src/helper/pluto_key_manager_event.dart +++ b/lib/src/helper/pluto_key_manager_event.dart @@ -3,7 +3,7 @@ import 'package:flutter/services.dart'; class PlutoKeyManagerEvent { FocusNode focusNode; - RawKeyEvent event; + KeyEvent event; PlutoKeyManagerEvent({ required this.focusNode, @@ -12,9 +12,9 @@ class PlutoKeyManagerEvent { bool get needsThrottle => isMoving || isTab || isPageUp || isPageDown; - bool get isKeyDownEvent => event.runtimeType == RawKeyDownEvent; + bool get isKeyDownEvent => event.runtimeType == KeyDownEvent; - bool get isKeyUpEvent => event.runtimeType == RawKeyUpEvent; + bool get isKeyUpEvent => event.runtimeType == KeyUpEvent; bool get isMoving => isHorizontal || isVertical; @@ -94,15 +94,16 @@ class PlutoKeyManagerEvent { } bool get isShiftPressed { - return event.isShiftPressed; + return HardwareKeyboard.instance.isShiftPressed; } bool get isCtrlPressed { - return event.isMetaPressed || event.isControlPressed; + return HardwareKeyboard.instance.isMetaPressed || + HardwareKeyboard.instance.isControlPressed; } bool get isAltPressed { - return event.isAltPressed; + return HardwareKeyboard.instance.isAltPressed; } bool get isModifierPressed { diff --git a/lib/src/manager/pluto_grid_key_manager.dart b/lib/src/manager/pluto_grid_key_manager.dart index d232f25a2..0b06818fd 100644 --- a/lib/src/manager/pluto_grid_key_manager.dart +++ b/lib/src/manager/pluto_grid_key_manager.dart @@ -79,7 +79,7 @@ class PlutoGridKeyManager { if (stateManager.configuration.shortcut.handle( keyEvent: keyEvent, stateManager: stateManager, - state: RawKeyboard.instance, + state: HardwareKeyboard.instance, )) { return; } diff --git a/lib/src/manager/shortcut/pluto_grid_shortcut.dart b/lib/src/manager/shortcut/pluto_grid_shortcut.dart index e6b0772db..e926e34a2 100644 --- a/lib/src/manager/shortcut/pluto_grid_shortcut.dart +++ b/lib/src/manager/shortcut/pluto_grid_shortcut.dart @@ -27,7 +27,7 @@ class PlutoGridShortcut { bool handle({ required PlutoKeyManagerEvent keyEvent, required PlutoGridStateManager stateManager, - required RawKeyboard state, + required HardwareKeyboard state, }) { for (final action in actions.entries) { if (action.key.accepts(keyEvent.event, state)) { diff --git a/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart b/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart index 56b582b53..2e5f2364e 100644 --- a/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart +++ b/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart @@ -250,7 +250,7 @@ class PlutoGridActionDefaultTab extends PlutoGridShortcutAction { final saveIsEditing = stateManager.isEditing; - keyEvent.event.isShiftPressed + keyEvent.isShiftPressed ? _moveCellPrevious(stateManager) : _moveCellNext(stateManager); @@ -408,7 +408,7 @@ class PlutoGridActionDefaultEnterKey extends PlutoGridShortcutAction { } if (enterKeyAction.isEditingAndMoveDown) { - if (keyEvent.event.isShiftPressed) { + if (keyEvent.isShiftPressed) { stateManager.moveCurrentCell( PlutoMoveDirection.up, notify: false, @@ -420,7 +420,7 @@ class PlutoGridActionDefaultEnterKey extends PlutoGridShortcutAction { ); } } else if (enterKeyAction.isEditingAndMoveRight) { - if (keyEvent.event.isShiftPressed) { + if (keyEvent.isShiftPressed) { stateManager.moveCurrentCell( PlutoMoveDirection.left, force: true, diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index 607d2ae60..89e4178f0 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -593,7 +593,7 @@ class PlutoGridState extends PlutoStateWithChange { } } - KeyEventResult _handleGridFocusOnKey(FocusNode focusNode, RawKeyEvent event) { + KeyEventResult _handleGridFocusOnKey(FocusNode focusNode, KeyEvent event) { if (_keyManager.eventResult.isSkip == false) { _keyManager.subject.add(PlutoKeyManagerEvent( focusNode: focusNode, @@ -608,7 +608,7 @@ class PlutoGridState extends PlutoStateWithChange { Widget build(BuildContext context) { return FocusScope( onFocusChange: _stateManager.setKeepFocus, - onKey: _handleGridFocusOnKey, + onKeyEvent: _handleGridFocusOnKey, child: _GridContainer( stateManager: _stateManager, child: LayoutBuilder( diff --git a/lib/src/ui/cells/popup_cell.dart b/lib/src/ui/cells/popup_cell.dart index e945eeed7..ae9af6114 100644 --- a/lib/src/ui/cells/popup_cell.dart +++ b/lib/src/ui/cells/popup_cell.dart @@ -62,7 +62,7 @@ mixin PopupCellState on State ..text = widget.column.formattedValueForDisplayInEditing(widget.cell.value); - textFocus = FocusNode(onKey: _handleKeyboardFocusOnKey); + textFocus = FocusNode(onKeyEvent: _handleKeyboardFocusOnKey); } @override @@ -175,7 +175,7 @@ mixin PopupCellState on State } } - KeyEventResult _handleKeyboardFocusOnKey(FocusNode node, RawKeyEvent event) { + KeyEventResult _handleKeyboardFocusOnKey(FocusNode node, KeyEvent event) { var keyManager = PlutoKeyManagerEvent( focusNode: node, event: event, diff --git a/lib/src/ui/cells/text_cell.dart b/lib/src/ui/cells/text_cell.dart index a586daed5..e64181e14 100644 --- a/lib/src/ui/cells/text_cell.dart +++ b/lib/src/ui/cells/text_cell.dart @@ -52,7 +52,7 @@ mixin TextCellState on State implements TextFieldProps { void initState() { super.initState(); - cellFocus = FocusNode(onKey: _handleOnKey); + cellFocus = FocusNode(onKeyEvent: _handleOnKey); widget.stateManager.setTextEditingController(_textController); @@ -172,7 +172,7 @@ mixin TextCellState on State implements TextFieldProps { }); } - KeyEventResult _handleOnKey(FocusNode node, RawKeyEvent event) { + KeyEventResult _handleOnKey(FocusNode node, KeyEvent event) { var keyManager = PlutoKeyManagerEvent( focusNode: node, event: event, diff --git a/lib/src/ui/columns/pluto_column_filter.dart b/lib/src/ui/columns/pluto_column_filter.dart index aaee97f32..dfa02b734 100644 --- a/lib/src/ui/columns/pluto_column_filter.dart +++ b/lib/src/ui/columns/pluto_column_filter.dart @@ -83,7 +83,7 @@ class PlutoColumnFilterState extends PlutoStateWithChange { initState() { super.initState(); - _focusNode = FocusNode(onKey: _handleOnKey); + _focusNode = FocusNode(onKeyEvent: _handleOnKey); widget.column.setFilterFocusNode(_focusNode); @@ -145,7 +145,7 @@ class PlutoColumnFilterState extends PlutoStateWithChange { stateManager.notifyListeners(); } - KeyEventResult _handleOnKey(FocusNode node, RawKeyEvent event) { + KeyEventResult _handleOnKey(FocusNode node, KeyEvent event) { var keyManager = PlutoKeyManagerEvent( focusNode: node, event: event, diff --git a/test/src/helper/pluto_key_manager_event_test.dart b/test/src/helper/pluto_key_manager_event_test.dart index 3ad157635..dc20b95b2 100644 --- a/test/src/helper/pluto_key_manager_event_test.dart +++ b/test/src/helper/pluto_key_manager_event_test.dart @@ -8,7 +8,7 @@ void main() { late PlutoKeyManagerEvent? keyManagerEvent; - KeyEventResult callback(FocusNode node, RawKeyEvent event) { + KeyEventResult callback(FocusNode node, KeyEvent event) { keyManagerEvent = PlutoKeyManagerEvent( focusNode: node, event: event, @@ -23,17 +23,16 @@ void main() { tearDown(() { keyManagerEvent = null; - focusNode.dispose(); }); Future buildWidget({ required WidgetTester tester, - required KeyEventResult Function(FocusNode, RawKeyEvent) callback, + required KeyEventResult Function(FocusNode, KeyEvent) callback, }) async { await tester.pumpWidget(MaterialApp( home: FocusScope( autofocus: true, - onKey: callback, + onKeyEvent: callback, child: Focus( focusNode: focusNode, child: const SizedBox(width: 100, height: 100), @@ -62,7 +61,7 @@ void main() { (tester) async { late PlutoKeyManagerEvent keyManagerEvent; - KeyEventResult callback(FocusNode node, RawKeyEvent event) { + KeyEventResult callback(FocusNode node, KeyEvent event) { keyManagerEvent = PlutoKeyManagerEvent( focusNode: node, event: event, @@ -140,15 +139,25 @@ void main() { }, ); + // While key combos still work in the real world, these 3 tests are failing due to what I suspect is an + // incomplete deprecation/migration from focusNode `onKey` to `onKeyEvent`. + // Flutter 3.19 does not trigger our event for `sendKeyUpEvent` only, and I prefer not + // to switch these tests to `sendKeyDownEvent` as that may cause unexpected behavior + // such as pasting multiple times due to repeating key presses. It might also be fine. + + // https://github.com/flutter/flutter/issues/136419 testWidgets( 'Control + C 키를 입력하면 isCtrlC 가 true 여야 한다.', (tester) async { await buildWidget(tester: tester, callback: callback); const key = LogicalKeyboardKey.control; + const key2 = LogicalKeyboardKey.keyC; await tester.sendKeyDownEvent(key); - await tester.sendKeyUpEvent(LogicalKeyboardKey.keyC); - expect(keyManagerEvent!.isCtrlC, true); + await tester.sendKeyUpEvent( + key2); // sendKeyUpEvent is not sending a keyManagerEvent + + expect(keyManagerEvent?.isCtrlC, true); await tester.sendKeyUpEvent(key); }, ); diff --git a/test/src/manager/pluto_grid_key_manager_test.dart b/test/src/manager/pluto_grid_key_manager_test.dart index 0ab7236da..cfba6eea0 100644 --- a/test/src/manager/pluto_grid_key_manager_test.dart +++ b/test/src/manager/pluto_grid_key_manager_test.dart @@ -46,8 +46,8 @@ void main() { await tester.pumpWidget( MaterialApp( home: Material( - child: RawKeyboardListener( - onKey: (event) { + child: KeyboardListener( + onKeyEvent: (event) { keyManager.subject.add(PlutoKeyManagerEvent( focusNode: FocusNode(), event: event, @@ -98,8 +98,8 @@ void main() { await tester.pumpWidget( MaterialApp( home: Material( - child: RawKeyboardListener( - onKey: (event) { + child: KeyboardListener( + onKeyEvent: (event) { keyManager.subject.add(PlutoKeyManagerEvent( focusNode: FocusNode(), event: event, @@ -150,8 +150,8 @@ void main() { await tester.pumpWidget( MaterialApp( home: Material( - child: RawKeyboardListener( - onKey: (event) { + child: KeyboardListener( + onKeyEvent: (event) { keyManager.subject.add(PlutoKeyManagerEvent( focusNode: FocusNode(), event: event, @@ -204,8 +204,8 @@ void main() { await tester.pumpWidget( MaterialApp( home: Material( - child: RawKeyboardListener( - onKey: (event) { + child: KeyboardListener( + onKeyEvent: (event) { keyManager.subject.add(PlutoKeyManagerEvent( focusNode: FocusNode(), event: event, @@ -258,8 +258,8 @@ void main() { await tester.pumpWidget( MaterialApp( home: Material( - child: RawKeyboardListener( - onKey: (event) { + child: KeyboardListener( + onKeyEvent: (event) { keyManager.subject.add(PlutoKeyManagerEvent( focusNode: FocusNode(), event: event, @@ -311,8 +311,8 @@ void main() { await tester.pumpWidget( MaterialApp( home: Material( - child: RawKeyboardListener( - onKey: (event) { + child: KeyboardListener( + onKeyEvent: (event) { keyManager.subject.add(PlutoKeyManagerEvent( focusNode: FocusNode(), event: event, @@ -440,8 +440,8 @@ void main() { await tester.pumpWidget( MaterialApp( home: Material( - child: RawKeyboardListener( - onKey: (event) { + child: KeyboardListener( + onKeyEvent: (event) { keyManager.subject.add(PlutoKeyManagerEvent( focusNode: FocusNode(), event: event, From 753bbc00d136c023cbc4e00e6e7aeffcffa1e9b5 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Sun, 18 Feb 2024 14:28:48 +0300 Subject: [PATCH 16/80] Change pluto_grid_export to pluto_grid_plus_export as the old version is not maintained. --- CHANGELOG.md | 4 + README.md | 2 +- demo/lib/screen/feature/export_screen.dart | 73 ++++++++++++------ .../ephemeral/.plugin_symlinks/file_saver | 1 + .../.plugin_symlinks/path_provider_linux | 1 + .../ephemeral/.plugin_symlinks/printing | 1 + .../.plugin_symlinks/url_launcher_linux | 2 +- .../flutter/generated_plugin_registrant.cc | 8 ++ demo/linux/flutter/generated_plugins.cmake | 2 + .../Flutter/GeneratedPluginRegistrant.swift | 6 ++ demo/pubspec.yaml | 4 +- demo/windows/flutter/CMakeLists.txt | 7 +- .../flutter/generated_plugin_registrant.cc | 6 ++ demo/windows/flutter/generated_plugins.cmake | 2 + .../.gitignore | 0 .../.pubignore | 0 .../CHANGELOG.md | 0 .../LICENSE | 0 .../README.md | 4 +- .../analysis_options.yaml | 0 .../example/.gitignore | 0 .../example/.metadata | 0 .../example/README.md | 0 .../example/analysis_options.yaml | 0 .../example/android/.gitignore | 0 .../example/android/app/build.gradle | 0 .../android/app/src/debug/AndroidManifest.xml | 0 .../android/app/src/main/AndroidManifest.xml | 0 .../com/example/example/MainActivity.kt | 0 .../res/drawable-v21/launch_background.xml | 0 .../main/res/drawable/launch_background.xml | 0 .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../app/src/main/res/values-night/styles.xml | 0 .../app/src/main/res/values/styles.xml | 0 .../app/src/profile/AndroidManifest.xml | 0 .../example/android/build.gradle | 0 .../example/android/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.properties | 0 .../example/android/settings.gradle | 0 .../assets/fonts/open_sans/OpenSans-Bold.ttf | Bin .../fonts/open_sans/OpenSans-Regular.ttf | Bin .../example/ios/.gitignore | 0 .../ios/Flutter/AppFrameworkInfo.plist | 0 .../example/ios/Flutter/Debug.xcconfig | 0 .../example/ios/Flutter/Release.xcconfig | 0 .../ios/Runner.xcodeproj/project.pbxproj | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/WorkspaceSettings.xcsettings | 0 .../xcshareddata/xcschemes/Runner.xcscheme | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/WorkspaceSettings.xcsettings | 0 .../example/ios/Runner/AppDelegate.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../Icon-App-1024x1024@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin .../Icon-App-83.5x83.5@2x.png | Bin .../LaunchImage.imageset/Contents.json | 0 .../LaunchImage.imageset/LaunchImage.png | Bin .../LaunchImage.imageset/LaunchImage@2x.png | Bin .../LaunchImage.imageset/LaunchImage@3x.png | Bin .../LaunchImage.imageset/README.md | 0 .../Runner/Base.lproj/LaunchScreen.storyboard | 0 .../ios/Runner/Base.lproj/Main.storyboard | 0 .../example/ios/Runner/Info.plist | 0 .../ios/Runner/Runner-Bridging-Header.h | 0 .../example/lib/main.dart | 3 +- .../example/linux/.gitignore | 0 .../example/linux/CMakeLists.txt | 0 .../example/linux/flutter/CMakeLists.txt | 0 .../flutter/generated_plugin_registrant.cc | 0 .../flutter/generated_plugin_registrant.h | 0 .../linux/flutter/generated_plugins.cmake | 0 .../example/linux/main.cc | 0 .../example/linux/my_application.cc | 0 .../example/linux/my_application.h | 0 .../example/macos/.gitignore | 0 .../macos/Flutter/Flutter-Debug.xcconfig | 0 .../macos/Flutter/Flutter-Release.xcconfig | 0 .../Flutter/GeneratedPluginRegistrant.swift | 0 .../macos/Runner.xcodeproj/project.pbxproj | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/xcschemes/Runner.xcscheme | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../example/macos/Runner/AppDelegate.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../AppIcon.appiconset/app_icon_1024.png | Bin .../AppIcon.appiconset/app_icon_128.png | Bin .../AppIcon.appiconset/app_icon_16.png | Bin .../AppIcon.appiconset/app_icon_256.png | Bin .../AppIcon.appiconset/app_icon_32.png | Bin .../AppIcon.appiconset/app_icon_512.png | Bin .../AppIcon.appiconset/app_icon_64.png | Bin .../macos/Runner/Base.lproj/MainMenu.xib | 0 .../macos/Runner/Configs/AppInfo.xcconfig | 0 .../macos/Runner/Configs/Debug.xcconfig | 0 .../macos/Runner/Configs/Release.xcconfig | 0 .../macos/Runner/Configs/Warnings.xcconfig | 0 .../macos/Runner/DebugProfile.entitlements | 0 .../example/macos/Runner/Info.plist | 0 .../macos/Runner/MainFlutterWindow.swift | 0 .../example/macos/Runner/Release.entitlements | 0 .../example/pubspec.yaml | 2 +- .../example/web/favicon.png | Bin .../example/web/icons/Icon-192.png | Bin .../example/web/icons/Icon-512.png | Bin .../example/web/icons/Icon-maskable-192.png | Bin .../example/web/icons/Icon-maskable-512.png | Bin .../example/web/index.html | 0 .../example/web/manifest.json | 0 .../example/windows/.gitignore | 0 .../example/windows/CMakeLists.txt | 0 .../example/windows/flutter/CMakeLists.txt | 0 .../flutter/generated_plugin_registrant.cc | 0 .../flutter/generated_plugin_registrant.h | 0 .../windows/flutter/generated_plugins.cmake | 0 .../example/windows/runner/CMakeLists.txt | 0 .../example/windows/runner/Runner.rc | 0 .../example/windows/runner/flutter_window.cpp | 0 .../example/windows/runner/flutter_window.h | 0 .../example/windows/runner/main.cpp | 0 .../example/windows/runner/resource.h | 0 .../windows/runner/resources/app_icon.ico | Bin .../windows/runner/runner.exe.manifest | 0 .../example/windows/runner/utils.cpp | 0 .../example/windows/runner/utils.h | 0 .../example/windows/runner/win32_window.cpp | 0 .../example/windows/runner/win32_window.h | 0 .../lib/pluto_grid_plus_export.dart} | 4 +- .../lib/src/abstract_text_export.dart | 0 .../lib/src/csv/pluto_grid_csv_export.dart | 0 .../lib/src/pdf/generic_pdf_controller.dart | 0 .../lib/src/pdf/pdf_controller.dart | 0 .../lib/src/pdf/pluto_grid_pdf_export.dart | 0 .../lib/src/pluto_grid_plus_export.dart} | 0 .../pubspec.yaml | 4 +- pubspec.yaml | 2 +- 155 files changed, 101 insertions(+), 37 deletions(-) create mode 120000 demo/linux/flutter/ephemeral/.plugin_symlinks/file_saver create mode 120000 demo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux create mode 120000 demo/linux/flutter/ephemeral/.plugin_symlinks/printing rename packages/{pluto_grid_export => pluto_grid_plus_export}/.gitignore (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/.pubignore (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/CHANGELOG.md (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/LICENSE (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/README.md (96%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/analysis_options.yaml (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/.gitignore (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/.metadata (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/README.md (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/analysis_options.yaml (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/.gitignore (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/build.gradle (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/debug/AndroidManifest.xml (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/main/AndroidManifest.xml (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/main/res/drawable-v21/launch_background.xml (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/main/res/drawable/launch_background.xml (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/main/res/values-night/styles.xml (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/main/res/values/styles.xml (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/app/src/profile/AndroidManifest.xml (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/build.gradle (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/gradle.properties (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/gradle/wrapper/gradle-wrapper.properties (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/android/settings.gradle (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/assets/fonts/open_sans/OpenSans-Bold.ttf (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/assets/fonts/open_sans/OpenSans-Regular.ttf (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/.gitignore (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Flutter/AppFrameworkInfo.plist (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Flutter/Debug.xcconfig (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Flutter/Release.xcconfig (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner.xcodeproj/project.pbxproj (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner.xcworkspace/contents.xcworkspacedata (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/AppDelegate.swift (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Base.lproj/LaunchScreen.storyboard (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Base.lproj/Main.storyboard (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Info.plist (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/ios/Runner/Runner-Bridging-Header.h (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/lib/main.dart (97%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/linux/.gitignore (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/linux/CMakeLists.txt (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/linux/flutter/CMakeLists.txt (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/linux/flutter/generated_plugin_registrant.cc (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/linux/flutter/generated_plugin_registrant.h (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/linux/flutter/generated_plugins.cmake (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/linux/main.cc (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/linux/my_application.cc (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/linux/my_application.h (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/.gitignore (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Flutter/Flutter-Debug.xcconfig (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Flutter/Flutter-Release.xcconfig (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Flutter/GeneratedPluginRegistrant.swift (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner.xcodeproj/project.pbxproj (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner.xcworkspace/contents.xcworkspacedata (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/AppDelegate.swift (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Base.lproj/MainMenu.xib (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Configs/AppInfo.xcconfig (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Configs/Debug.xcconfig (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Configs/Release.xcconfig (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Configs/Warnings.xcconfig (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/DebugProfile.entitlements (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Info.plist (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/MainFlutterWindow.swift (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/macos/Runner/Release.entitlements (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/pubspec.yaml (99%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/web/favicon.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/web/icons/Icon-192.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/web/icons/Icon-512.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/web/icons/Icon-maskable-192.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/web/icons/Icon-maskable-512.png (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/web/index.html (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/web/manifest.json (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/.gitignore (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/CMakeLists.txt (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/flutter/CMakeLists.txt (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/flutter/generated_plugin_registrant.cc (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/flutter/generated_plugin_registrant.h (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/flutter/generated_plugins.cmake (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/runner/CMakeLists.txt (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/runner/Runner.rc (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/runner/flutter_window.cpp (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/runner/flutter_window.h (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/runner/main.cpp (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/runner/resource.h (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/runner/resources/app_icon.ico (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/runner/runner.exe.manifest (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/runner/utils.cpp (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/runner/utils.h (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/runner/win32_window.cpp (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/example/windows/runner/win32_window.h (100%) rename packages/{pluto_grid_export/lib/pluto_grid_export.dart => pluto_grid_plus_export/lib/pluto_grid_plus_export.dart} (81%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/lib/src/abstract_text_export.dart (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/lib/src/csv/pluto_grid_csv_export.dart (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/lib/src/pdf/generic_pdf_controller.dart (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/lib/src/pdf/pdf_controller.dart (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/lib/src/pdf/pluto_grid_pdf_export.dart (100%) rename packages/{pluto_grid_export/lib/src/pluto_grid_export.dart => pluto_grid_plus_export/lib/src/pluto_grid_plus_export.dart} (100%) rename packages/{pluto_grid_export => pluto_grid_plus_export}/pubspec.yaml (90%) diff --git a/CHANGELOG.md b/CHANGELOG.md index d44f9ad36..c3c93ca43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [8.3.0] - 2024. 02. 18 +* Change pluto_grid_export to pluto_grid_plus_export as the old version is not maintained. +* fix & enhance the example for csv export. + ## [8.2.0] - 2023. 12. 19 * Add builder function in plutoColumnType.select allow user to customize the popup by item widget. diff --git a/README.md b/README.md index 18086e004..4fe66c50d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## PlutoGrid Plus for flutter - v8.1.0 +## PlutoGrid Plus for flutter - v8.3.0 PlutoGrid Plus is a maintained version of https://github.com/bosskmk/pluto_grid [![Awesome Flutter](https://img.shields.io/badge/Awesome-Flutter-blue.svg)](https://github.com/Solido/awesome-flutter) diff --git a/demo/lib/screen/feature/export_screen.dart b/demo/lib/screen/feature/export_screen.dart index ee68e516d..de1b9bbdd 100644 --- a/demo/lib/screen/feature/export_screen.dart +++ b/demo/lib/screen/feature/export_screen.dart @@ -1,9 +1,14 @@ // ignore_for_file: unused_local_variable +import 'dart:convert'; + +import 'package:file_saver/file_saver.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:pluto_grid_plus/pluto_grid_plus.dart'; -// import 'package:pluto_grid_plus_export/pluto_grid_export.dart' as pluto_grid_export; +import 'package:pluto_grid_plus_export/pluto_grid_plus_export.dart' + as pluto_grid_export; import '../../dummy_data/development.dart'; import '../../widget/pluto_example_button.dart'; @@ -176,25 +181,25 @@ class _Header extends StatefulWidget { class _HeaderState extends State<_Header> { void _printToPdfAndShareOrSave() async { - // final themeData = pluto_grid_export.ThemeData.withFont( - // base: pluto_grid_export.Font.ttf( - // await rootBundle.load('assets/fonts/open_sans/OpenSans-Regular.ttf'), - // ), - // bold: pluto_grid_export.Font.ttf( - // await rootBundle.load('assets/fonts/open_sans/OpenSans-Bold.ttf'), - // ), - // ); - // - // var plutoGridPdfExport = pluto_grid_export.PlutoGridDefaultPdfExport( - // title: "Pluto Grid Sample pdf print", - // creator: "Pluto Grid Rocks!", - // format: pluto_grid_export.PdfPageFormat.a4.landscape, - // themeData: themeData, - // ); - // - // await pluto_grid_export.Printing.sharePdf( - // bytes: await plutoGridPdfExport.export(widget.stateManager), - // filename: plutoGridPdfExport.getFilename()); + final themeData = pluto_grid_export.ThemeData.withFont( + base: pluto_grid_export.Font.ttf( + await rootBundle.load('assets/fonts/open_sans/OpenSans-Regular.ttf'), + ), + bold: pluto_grid_export.Font.ttf( + await rootBundle.load('assets/fonts/open_sans/OpenSans-Bold.ttf'), + ), + ); + + var plutoGridPdfExport = pluto_grid_export.PlutoGridDefaultPdfExport( + title: "Pluto Grid Sample pdf print", + creator: "Pluto Grid Rocks!", + format: pluto_grid_export.PdfPageFormat.a4.landscape, + themeData: themeData, + ); + + await pluto_grid_export.Printing.sharePdf( + bytes: await plutoGridPdfExport.export(widget.stateManager), + filename: plutoGridPdfExport.getFilename()); } // This doesn't works properly in systems different from Windows. @@ -218,10 +223,30 @@ class _HeaderState extends State<_Header> { // } void _defaultExportGridAsCSV() async { - // String title = "pluto_grid_export"; - // var exported = const Utf8Encoder().convert( - // pluto_grid_export.PlutoGridExport.exportCSV(widget.stateManager)); - // await FileSaver.instance.saveFile("$title.csv", exported, ".csv"); + String title = "pluto_grid_export"; + var exported = const Utf8Encoder().convert( + pluto_grid_export.PlutoGridExport.exportCSV(widget.stateManager)); + String savedFile = await FileSaver.instance + .saveFile(name: title, bytes: exported, ext: ".csv"); + if (!mounted) return; + String msg = 'Exported successfully'; + + msg = + 'Exported successfully. Please open the file in Excel. Path: $savedFile'; + if (!mounted) return; + showDialog( + context: context, + builder: (context) => AlertDialog( + title: const Text('Success'), + content: Text(msg), + actions: [ + TextButton( + onPressed: () { + Navigator.pop(context); + }, + child: const Text('OK'), + ) + ])); } void _defaultExportGridAsCSVCompatibleWithExcel() async { diff --git a/demo/linux/flutter/ephemeral/.plugin_symlinks/file_saver b/demo/linux/flutter/ephemeral/.plugin_symlinks/file_saver new file mode 120000 index 000000000..265ba5f45 --- /dev/null +++ b/demo/linux/flutter/ephemeral/.plugin_symlinks/file_saver @@ -0,0 +1 @@ +C:/Users/DOONF/AppData/Local/Pub/Cache/hosted/pub.dev/file_saver-0.2.10/ \ No newline at end of file diff --git a/demo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux b/demo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux new file mode 120000 index 000000000..f9f3220b6 --- /dev/null +++ b/demo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux @@ -0,0 +1 @@ +C:/Users/DOONF/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_linux-2.2.1/ \ No newline at end of file diff --git a/demo/linux/flutter/ephemeral/.plugin_symlinks/printing b/demo/linux/flutter/ephemeral/.plugin_symlinks/printing new file mode 120000 index 000000000..08c478a37 --- /dev/null +++ b/demo/linux/flutter/ephemeral/.plugin_symlinks/printing @@ -0,0 +1 @@ +C:/Users/DOONF/AppData/Local/Pub/Cache/hosted/pub.dev/printing-5.11.1/ \ No newline at end of file diff --git a/demo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux b/demo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux index 1a160fa08..debad87a2 120000 --- a/demo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux +++ b/demo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux @@ -1 +1 @@ -C:/Users/DOONF/AppData/Local/Pub/Cache/hosted/pub.dev/url_launcher_linux-3.1.0/ \ No newline at end of file +C:/Users/DOONF/AppData/Local/Pub/Cache/hosted/pub.dev/url_launcher_linux-3.1.1/ \ No newline at end of file diff --git a/demo/linux/flutter/generated_plugin_registrant.cc b/demo/linux/flutter/generated_plugin_registrant.cc index f6f23bfe9..88c7a8bd9 100644 --- a/demo/linux/flutter/generated_plugin_registrant.cc +++ b/demo/linux/flutter/generated_plugin_registrant.cc @@ -6,9 +6,17 @@ #include "generated_plugin_registrant.h" +#include +#include #include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) file_saver_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FileSaverPlugin"); + file_saver_plugin_register_with_registrar(file_saver_registrar); + g_autoptr(FlPluginRegistrar) printing_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "PrintingPlugin"); + printing_plugin_register_with_registrar(printing_registrar); g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); diff --git a/demo/linux/flutter/generated_plugins.cmake b/demo/linux/flutter/generated_plugins.cmake index f16b4c342..561713c0b 100644 --- a/demo/linux/flutter/generated_plugins.cmake +++ b/demo/linux/flutter/generated_plugins.cmake @@ -3,6 +3,8 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_saver + printing url_launcher_linux ) diff --git a/demo/macos/Flutter/GeneratedPluginRegistrant.swift b/demo/macos/Flutter/GeneratedPluginRegistrant.swift index 8236f5728..f5e53edca 100644 --- a/demo/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/demo/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,8 +5,14 @@ import FlutterMacOS import Foundation +import file_saver +import path_provider_foundation +import printing import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FileSaverPlugin.register(with: registry.registrar(forPlugin: "FileSaverPlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + PrintingPlugin.register(with: registry.registrar(forPlugin: "PrintingPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/demo/pubspec.yaml b/demo/pubspec.yaml index 581bc27ec..b43887cd5 100644 --- a/demo/pubspec.yaml +++ b/demo/pubspec.yaml @@ -30,7 +30,9 @@ dependencies: font_awesome_flutter: ^10.6.0 rainbow_color: ^2.0.1 pluto_menu_bar: ^3.0.1 - + file_saver: ^0.2.10 + pluto_grid_plus_export: + path: ../packages/pluto_grid_plus_export # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.6 diff --git a/demo/windows/flutter/CMakeLists.txt b/demo/windows/flutter/CMakeLists.txt index 744f08a93..0a9177722 100644 --- a/demo/windows/flutter/CMakeLists.txt +++ b/demo/windows/flutter/CMakeLists.txt @@ -9,6 +9,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake) # https://github.com/flutter/flutter/issues/57146. set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + # === Flutter Library === set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") @@ -90,7 +95,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ + ${FLUTTER_TARGET_PLATFORM} $ VERBATIM ) add_custom_target(flutter_assemble DEPENDS diff --git a/demo/windows/flutter/generated_plugin_registrant.cc b/demo/windows/flutter/generated_plugin_registrant.cc index 4f7884874..5c30b255d 100644 --- a/demo/windows/flutter/generated_plugin_registrant.cc +++ b/demo/windows/flutter/generated_plugin_registrant.cc @@ -6,9 +6,15 @@ #include "generated_plugin_registrant.h" +#include +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { + FileSaverPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FileSaverPlugin")); + PrintingPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("PrintingPlugin")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/demo/windows/flutter/generated_plugins.cmake b/demo/windows/flutter/generated_plugins.cmake index 88b22e5c7..de50ed854 100644 --- a/demo/windows/flutter/generated_plugins.cmake +++ b/demo/windows/flutter/generated_plugins.cmake @@ -3,6 +3,8 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_saver + printing url_launcher_windows ) diff --git a/packages/pluto_grid_export/.gitignore b/packages/pluto_grid_plus_export/.gitignore similarity index 100% rename from packages/pluto_grid_export/.gitignore rename to packages/pluto_grid_plus_export/.gitignore diff --git a/packages/pluto_grid_export/.pubignore b/packages/pluto_grid_plus_export/.pubignore similarity index 100% rename from packages/pluto_grid_export/.pubignore rename to packages/pluto_grid_plus_export/.pubignore diff --git a/packages/pluto_grid_export/CHANGELOG.md b/packages/pluto_grid_plus_export/CHANGELOG.md similarity index 100% rename from packages/pluto_grid_export/CHANGELOG.md rename to packages/pluto_grid_plus_export/CHANGELOG.md diff --git a/packages/pluto_grid_export/LICENSE b/packages/pluto_grid_plus_export/LICENSE similarity index 100% rename from packages/pluto_grid_export/LICENSE rename to packages/pluto_grid_plus_export/LICENSE diff --git a/packages/pluto_grid_export/README.md b/packages/pluto_grid_plus_export/README.md similarity index 96% rename from packages/pluto_grid_export/README.md rename to packages/pluto_grid_plus_export/README.md index a7b52de6c..98b6f7e21 100644 --- a/packages/pluto_grid_export/README.md +++ b/packages/pluto_grid_plus_export/README.md @@ -9,7 +9,7 @@ https://github.com/bosskmk/pluto_grid/blob/master/demo/lib/screen/feature/export
-### [Pub.Dev](https://pub.dev/packages/pluto_grid_export) +### [Pub.Dev](https://pub.dev/packages/pluto_grid_export_plus) > Check out how to install from the official distribution site.
@@ -28,7 +28,7 @@ import 'package:file_saver/file_saver.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:pluto_grid_plus/pluto_grid_plus.dart'; -import 'package:pluto_grid_plus_export/pluto_grid_export.dart' as pluto_grid_export; +import 'package:pluto_grid_plus_export/pluto_grid_plus_export.dart' as pluto_grid_plus_export; void main() { runApp(const MyApp()); diff --git a/packages/pluto_grid_export/analysis_options.yaml b/packages/pluto_grid_plus_export/analysis_options.yaml similarity index 100% rename from packages/pluto_grid_export/analysis_options.yaml rename to packages/pluto_grid_plus_export/analysis_options.yaml diff --git a/packages/pluto_grid_export/example/.gitignore b/packages/pluto_grid_plus_export/example/.gitignore similarity index 100% rename from packages/pluto_grid_export/example/.gitignore rename to packages/pluto_grid_plus_export/example/.gitignore diff --git a/packages/pluto_grid_export/example/.metadata b/packages/pluto_grid_plus_export/example/.metadata similarity index 100% rename from packages/pluto_grid_export/example/.metadata rename to packages/pluto_grid_plus_export/example/.metadata diff --git a/packages/pluto_grid_export/example/README.md b/packages/pluto_grid_plus_export/example/README.md similarity index 100% rename from packages/pluto_grid_export/example/README.md rename to packages/pluto_grid_plus_export/example/README.md diff --git a/packages/pluto_grid_export/example/analysis_options.yaml b/packages/pluto_grid_plus_export/example/analysis_options.yaml similarity index 100% rename from packages/pluto_grid_export/example/analysis_options.yaml rename to packages/pluto_grid_plus_export/example/analysis_options.yaml diff --git a/packages/pluto_grid_export/example/android/.gitignore b/packages/pluto_grid_plus_export/example/android/.gitignore similarity index 100% rename from packages/pluto_grid_export/example/android/.gitignore rename to packages/pluto_grid_plus_export/example/android/.gitignore diff --git a/packages/pluto_grid_export/example/android/app/build.gradle b/packages/pluto_grid_plus_export/example/android/app/build.gradle similarity index 100% rename from packages/pluto_grid_export/example/android/app/build.gradle rename to packages/pluto_grid_plus_export/example/android/app/build.gradle diff --git a/packages/pluto_grid_export/example/android/app/src/debug/AndroidManifest.xml b/packages/pluto_grid_plus_export/example/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/debug/AndroidManifest.xml rename to packages/pluto_grid_plus_export/example/android/app/src/debug/AndroidManifest.xml diff --git a/packages/pluto_grid_export/example/android/app/src/main/AndroidManifest.xml b/packages/pluto_grid_plus_export/example/android/app/src/main/AndroidManifest.xml similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/main/AndroidManifest.xml rename to packages/pluto_grid_plus_export/example/android/app/src/main/AndroidManifest.xml diff --git a/packages/pluto_grid_export/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/pluto_grid_plus_export/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt rename to packages/pluto_grid_plus_export/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt diff --git a/packages/pluto_grid_export/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/pluto_grid_plus_export/example/android/app/src/main/res/drawable-v21/launch_background.xml similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/main/res/drawable-v21/launch_background.xml rename to packages/pluto_grid_plus_export/example/android/app/src/main/res/drawable-v21/launch_background.xml diff --git a/packages/pluto_grid_export/example/android/app/src/main/res/drawable/launch_background.xml b/packages/pluto_grid_plus_export/example/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/main/res/drawable/launch_background.xml rename to packages/pluto_grid_plus_export/example/android/app/src/main/res/drawable/launch_background.xml diff --git a/packages/pluto_grid_export/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/pluto_grid_plus_export/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to packages/pluto_grid_plus_export/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/packages/pluto_grid_export/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/pluto_grid_plus_export/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to packages/pluto_grid_plus_export/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/packages/pluto_grid_export/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/pluto_grid_plus_export/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to packages/pluto_grid_plus_export/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/packages/pluto_grid_export/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/pluto_grid_plus_export/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to packages/pluto_grid_plus_export/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/packages/pluto_grid_export/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/pluto_grid_plus_export/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to packages/pluto_grid_plus_export/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/packages/pluto_grid_export/example/android/app/src/main/res/values-night/styles.xml b/packages/pluto_grid_plus_export/example/android/app/src/main/res/values-night/styles.xml similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/main/res/values-night/styles.xml rename to packages/pluto_grid_plus_export/example/android/app/src/main/res/values-night/styles.xml diff --git a/packages/pluto_grid_export/example/android/app/src/main/res/values/styles.xml b/packages/pluto_grid_plus_export/example/android/app/src/main/res/values/styles.xml similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/main/res/values/styles.xml rename to packages/pluto_grid_plus_export/example/android/app/src/main/res/values/styles.xml diff --git a/packages/pluto_grid_export/example/android/app/src/profile/AndroidManifest.xml b/packages/pluto_grid_plus_export/example/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from packages/pluto_grid_export/example/android/app/src/profile/AndroidManifest.xml rename to packages/pluto_grid_plus_export/example/android/app/src/profile/AndroidManifest.xml diff --git a/packages/pluto_grid_export/example/android/build.gradle b/packages/pluto_grid_plus_export/example/android/build.gradle similarity index 100% rename from packages/pluto_grid_export/example/android/build.gradle rename to packages/pluto_grid_plus_export/example/android/build.gradle diff --git a/packages/pluto_grid_export/example/android/gradle.properties b/packages/pluto_grid_plus_export/example/android/gradle.properties similarity index 100% rename from packages/pluto_grid_export/example/android/gradle.properties rename to packages/pluto_grid_plus_export/example/android/gradle.properties diff --git a/packages/pluto_grid_export/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/pluto_grid_plus_export/example/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from packages/pluto_grid_export/example/android/gradle/wrapper/gradle-wrapper.properties rename to packages/pluto_grid_plus_export/example/android/gradle/wrapper/gradle-wrapper.properties diff --git a/packages/pluto_grid_export/example/android/settings.gradle b/packages/pluto_grid_plus_export/example/android/settings.gradle similarity index 100% rename from packages/pluto_grid_export/example/android/settings.gradle rename to packages/pluto_grid_plus_export/example/android/settings.gradle diff --git a/packages/pluto_grid_export/example/assets/fonts/open_sans/OpenSans-Bold.ttf b/packages/pluto_grid_plus_export/example/assets/fonts/open_sans/OpenSans-Bold.ttf similarity index 100% rename from packages/pluto_grid_export/example/assets/fonts/open_sans/OpenSans-Bold.ttf rename to packages/pluto_grid_plus_export/example/assets/fonts/open_sans/OpenSans-Bold.ttf diff --git a/packages/pluto_grid_export/example/assets/fonts/open_sans/OpenSans-Regular.ttf b/packages/pluto_grid_plus_export/example/assets/fonts/open_sans/OpenSans-Regular.ttf similarity index 100% rename from packages/pluto_grid_export/example/assets/fonts/open_sans/OpenSans-Regular.ttf rename to packages/pluto_grid_plus_export/example/assets/fonts/open_sans/OpenSans-Regular.ttf diff --git a/packages/pluto_grid_export/example/ios/.gitignore b/packages/pluto_grid_plus_export/example/ios/.gitignore similarity index 100% rename from packages/pluto_grid_export/example/ios/.gitignore rename to packages/pluto_grid_plus_export/example/ios/.gitignore diff --git a/packages/pluto_grid_export/example/ios/Flutter/AppFrameworkInfo.plist b/packages/pluto_grid_plus_export/example/ios/Flutter/AppFrameworkInfo.plist similarity index 100% rename from packages/pluto_grid_export/example/ios/Flutter/AppFrameworkInfo.plist rename to packages/pluto_grid_plus_export/example/ios/Flutter/AppFrameworkInfo.plist diff --git a/packages/pluto_grid_export/example/ios/Flutter/Debug.xcconfig b/packages/pluto_grid_plus_export/example/ios/Flutter/Debug.xcconfig similarity index 100% rename from packages/pluto_grid_export/example/ios/Flutter/Debug.xcconfig rename to packages/pluto_grid_plus_export/example/ios/Flutter/Debug.xcconfig diff --git a/packages/pluto_grid_export/example/ios/Flutter/Release.xcconfig b/packages/pluto_grid_plus_export/example/ios/Flutter/Release.xcconfig similarity index 100% rename from packages/pluto_grid_export/example/ios/Flutter/Release.xcconfig rename to packages/pluto_grid_plus_export/example/ios/Flutter/Release.xcconfig diff --git a/packages/pluto_grid_export/example/ios/Runner.xcodeproj/project.pbxproj b/packages/pluto_grid_plus_export/example/ios/Runner.xcodeproj/project.pbxproj similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner.xcodeproj/project.pbxproj rename to packages/pluto_grid_plus_export/example/ios/Runner.xcodeproj/project.pbxproj diff --git a/packages/pluto_grid_export/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/pluto_grid_plus_export/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to packages/pluto_grid_plus_export/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/packages/pluto_grid_export/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/pluto_grid_plus_export/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to packages/pluto_grid_plus_export/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/packages/pluto_grid_export/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/pluto_grid_plus_export/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to packages/pluto_grid_plus_export/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/packages/pluto_grid_export/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/pluto_grid_plus_export/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to packages/pluto_grid_plus_export/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme diff --git a/packages/pluto_grid_export/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/pluto_grid_plus_export/example/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner.xcworkspace/contents.xcworkspacedata rename to packages/pluto_grid_plus_export/example/ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/packages/pluto_grid_export/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/pluto_grid_plus_export/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to packages/pluto_grid_plus_export/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/packages/pluto_grid_export/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/pluto_grid_plus_export/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to packages/pluto_grid_plus_export/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/packages/pluto_grid_export/example/ios/Runner/AppDelegate.swift b/packages/pluto_grid_plus_export/example/ios/Runner/AppDelegate.swift similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/AppDelegate.swift rename to packages/pluto_grid_plus_export/example/ios/Runner/AppDelegate.swift diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to packages/pluto_grid_plus_export/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/packages/pluto_grid_export/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/pluto_grid_plus_export/example/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Base.lproj/LaunchScreen.storyboard rename to packages/pluto_grid_plus_export/example/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/packages/pluto_grid_export/example/ios/Runner/Base.lproj/Main.storyboard b/packages/pluto_grid_plus_export/example/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Base.lproj/Main.storyboard rename to packages/pluto_grid_plus_export/example/ios/Runner/Base.lproj/Main.storyboard diff --git a/packages/pluto_grid_export/example/ios/Runner/Info.plist b/packages/pluto_grid_plus_export/example/ios/Runner/Info.plist similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Info.plist rename to packages/pluto_grid_plus_export/example/ios/Runner/Info.plist diff --git a/packages/pluto_grid_export/example/ios/Runner/Runner-Bridging-Header.h b/packages/pluto_grid_plus_export/example/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from packages/pluto_grid_export/example/ios/Runner/Runner-Bridging-Header.h rename to packages/pluto_grid_plus_export/example/ios/Runner/Runner-Bridging-Header.h diff --git a/packages/pluto_grid_export/example/lib/main.dart b/packages/pluto_grid_plus_export/example/lib/main.dart similarity index 97% rename from packages/pluto_grid_export/example/lib/main.dart rename to packages/pluto_grid_plus_export/example/lib/main.dart index fcc09be24..4be09a222 100644 --- a/packages/pluto_grid_export/example/lib/main.dart +++ b/packages/pluto_grid_plus_export/example/lib/main.dart @@ -4,7 +4,8 @@ import 'package:file_saver/file_saver.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:pluto_grid_plus/pluto_grid_plus.dart'; -import 'package:pluto_grid_export/pluto_grid_export.dart' as pluto_grid_export; +import 'package:pluto_grid_plus_export/pluto_grid_plus_export.dart' + as pluto_grid_export; void main() { runApp(const MyApp()); diff --git a/packages/pluto_grid_export/example/linux/.gitignore b/packages/pluto_grid_plus_export/example/linux/.gitignore similarity index 100% rename from packages/pluto_grid_export/example/linux/.gitignore rename to packages/pluto_grid_plus_export/example/linux/.gitignore diff --git a/packages/pluto_grid_export/example/linux/CMakeLists.txt b/packages/pluto_grid_plus_export/example/linux/CMakeLists.txt similarity index 100% rename from packages/pluto_grid_export/example/linux/CMakeLists.txt rename to packages/pluto_grid_plus_export/example/linux/CMakeLists.txt diff --git a/packages/pluto_grid_export/example/linux/flutter/CMakeLists.txt b/packages/pluto_grid_plus_export/example/linux/flutter/CMakeLists.txt similarity index 100% rename from packages/pluto_grid_export/example/linux/flutter/CMakeLists.txt rename to packages/pluto_grid_plus_export/example/linux/flutter/CMakeLists.txt diff --git a/packages/pluto_grid_export/example/linux/flutter/generated_plugin_registrant.cc b/packages/pluto_grid_plus_export/example/linux/flutter/generated_plugin_registrant.cc similarity index 100% rename from packages/pluto_grid_export/example/linux/flutter/generated_plugin_registrant.cc rename to packages/pluto_grid_plus_export/example/linux/flutter/generated_plugin_registrant.cc diff --git a/packages/pluto_grid_export/example/linux/flutter/generated_plugin_registrant.h b/packages/pluto_grid_plus_export/example/linux/flutter/generated_plugin_registrant.h similarity index 100% rename from packages/pluto_grid_export/example/linux/flutter/generated_plugin_registrant.h rename to packages/pluto_grid_plus_export/example/linux/flutter/generated_plugin_registrant.h diff --git a/packages/pluto_grid_export/example/linux/flutter/generated_plugins.cmake b/packages/pluto_grid_plus_export/example/linux/flutter/generated_plugins.cmake similarity index 100% rename from packages/pluto_grid_export/example/linux/flutter/generated_plugins.cmake rename to packages/pluto_grid_plus_export/example/linux/flutter/generated_plugins.cmake diff --git a/packages/pluto_grid_export/example/linux/main.cc b/packages/pluto_grid_plus_export/example/linux/main.cc similarity index 100% rename from packages/pluto_grid_export/example/linux/main.cc rename to packages/pluto_grid_plus_export/example/linux/main.cc diff --git a/packages/pluto_grid_export/example/linux/my_application.cc b/packages/pluto_grid_plus_export/example/linux/my_application.cc similarity index 100% rename from packages/pluto_grid_export/example/linux/my_application.cc rename to packages/pluto_grid_plus_export/example/linux/my_application.cc diff --git a/packages/pluto_grid_export/example/linux/my_application.h b/packages/pluto_grid_plus_export/example/linux/my_application.h similarity index 100% rename from packages/pluto_grid_export/example/linux/my_application.h rename to packages/pluto_grid_plus_export/example/linux/my_application.h diff --git a/packages/pluto_grid_export/example/macos/.gitignore b/packages/pluto_grid_plus_export/example/macos/.gitignore similarity index 100% rename from packages/pluto_grid_export/example/macos/.gitignore rename to packages/pluto_grid_plus_export/example/macos/.gitignore diff --git a/packages/pluto_grid_export/example/macos/Flutter/Flutter-Debug.xcconfig b/packages/pluto_grid_plus_export/example/macos/Flutter/Flutter-Debug.xcconfig similarity index 100% rename from packages/pluto_grid_export/example/macos/Flutter/Flutter-Debug.xcconfig rename to packages/pluto_grid_plus_export/example/macos/Flutter/Flutter-Debug.xcconfig diff --git a/packages/pluto_grid_export/example/macos/Flutter/Flutter-Release.xcconfig b/packages/pluto_grid_plus_export/example/macos/Flutter/Flutter-Release.xcconfig similarity index 100% rename from packages/pluto_grid_export/example/macos/Flutter/Flutter-Release.xcconfig rename to packages/pluto_grid_plus_export/example/macos/Flutter/Flutter-Release.xcconfig diff --git a/packages/pluto_grid_export/example/macos/Flutter/GeneratedPluginRegistrant.swift b/packages/pluto_grid_plus_export/example/macos/Flutter/GeneratedPluginRegistrant.swift similarity index 100% rename from packages/pluto_grid_export/example/macos/Flutter/GeneratedPluginRegistrant.swift rename to packages/pluto_grid_plus_export/example/macos/Flutter/GeneratedPluginRegistrant.swift diff --git a/packages/pluto_grid_export/example/macos/Runner.xcodeproj/project.pbxproj b/packages/pluto_grid_plus_export/example/macos/Runner.xcodeproj/project.pbxproj similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner.xcodeproj/project.pbxproj rename to packages/pluto_grid_plus_export/example/macos/Runner.xcodeproj/project.pbxproj diff --git a/packages/pluto_grid_export/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/pluto_grid_plus_export/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to packages/pluto_grid_plus_export/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/packages/pluto_grid_export/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/pluto_grid_plus_export/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to packages/pluto_grid_plus_export/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme diff --git a/packages/pluto_grid_export/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/packages/pluto_grid_plus_export/example/macos/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner.xcworkspace/contents.xcworkspacedata rename to packages/pluto_grid_plus_export/example/macos/Runner.xcworkspace/contents.xcworkspacedata diff --git a/packages/pluto_grid_export/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/pluto_grid_plus_export/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to packages/pluto_grid_plus_export/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/packages/pluto_grid_export/example/macos/Runner/AppDelegate.swift b/packages/pluto_grid_plus_export/example/macos/Runner/AppDelegate.swift similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/AppDelegate.swift rename to packages/pluto_grid_plus_export/example/macos/Runner/AppDelegate.swift diff --git a/packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png rename to packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png diff --git a/packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png rename to packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png diff --git a/packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png rename to packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png diff --git a/packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png rename to packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png diff --git a/packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png rename to packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png diff --git a/packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png rename to packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png diff --git a/packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png rename to packages/pluto_grid_plus_export/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png diff --git a/packages/pluto_grid_export/example/macos/Runner/Base.lproj/MainMenu.xib b/packages/pluto_grid_plus_export/example/macos/Runner/Base.lproj/MainMenu.xib similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Base.lproj/MainMenu.xib rename to packages/pluto_grid_plus_export/example/macos/Runner/Base.lproj/MainMenu.xib diff --git a/packages/pluto_grid_export/example/macos/Runner/Configs/AppInfo.xcconfig b/packages/pluto_grid_plus_export/example/macos/Runner/Configs/AppInfo.xcconfig similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Configs/AppInfo.xcconfig rename to packages/pluto_grid_plus_export/example/macos/Runner/Configs/AppInfo.xcconfig diff --git a/packages/pluto_grid_export/example/macos/Runner/Configs/Debug.xcconfig b/packages/pluto_grid_plus_export/example/macos/Runner/Configs/Debug.xcconfig similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Configs/Debug.xcconfig rename to packages/pluto_grid_plus_export/example/macos/Runner/Configs/Debug.xcconfig diff --git a/packages/pluto_grid_export/example/macos/Runner/Configs/Release.xcconfig b/packages/pluto_grid_plus_export/example/macos/Runner/Configs/Release.xcconfig similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Configs/Release.xcconfig rename to packages/pluto_grid_plus_export/example/macos/Runner/Configs/Release.xcconfig diff --git a/packages/pluto_grid_export/example/macos/Runner/Configs/Warnings.xcconfig b/packages/pluto_grid_plus_export/example/macos/Runner/Configs/Warnings.xcconfig similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Configs/Warnings.xcconfig rename to packages/pluto_grid_plus_export/example/macos/Runner/Configs/Warnings.xcconfig diff --git a/packages/pluto_grid_export/example/macos/Runner/DebugProfile.entitlements b/packages/pluto_grid_plus_export/example/macos/Runner/DebugProfile.entitlements similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/DebugProfile.entitlements rename to packages/pluto_grid_plus_export/example/macos/Runner/DebugProfile.entitlements diff --git a/packages/pluto_grid_export/example/macos/Runner/Info.plist b/packages/pluto_grid_plus_export/example/macos/Runner/Info.plist similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Info.plist rename to packages/pluto_grid_plus_export/example/macos/Runner/Info.plist diff --git a/packages/pluto_grid_export/example/macos/Runner/MainFlutterWindow.swift b/packages/pluto_grid_plus_export/example/macos/Runner/MainFlutterWindow.swift similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/MainFlutterWindow.swift rename to packages/pluto_grid_plus_export/example/macos/Runner/MainFlutterWindow.swift diff --git a/packages/pluto_grid_export/example/macos/Runner/Release.entitlements b/packages/pluto_grid_plus_export/example/macos/Runner/Release.entitlements similarity index 100% rename from packages/pluto_grid_export/example/macos/Runner/Release.entitlements rename to packages/pluto_grid_plus_export/example/macos/Runner/Release.entitlements diff --git a/packages/pluto_grid_export/example/pubspec.yaml b/packages/pluto_grid_plus_export/example/pubspec.yaml similarity index 99% rename from packages/pluto_grid_export/example/pubspec.yaml rename to packages/pluto_grid_plus_export/example/pubspec.yaml index bf1d6455f..695196581 100644 --- a/packages/pluto_grid_export/example/pubspec.yaml +++ b/packages/pluto_grid_plus_export/example/pubspec.yaml @@ -31,7 +31,7 @@ dependencies: sdk: flutter pluto_grid_plus: path: ../../../ - pluto_grid_export: + pluto_grid_plus_export: path: ../ file_saver: ^0.1.0 diff --git a/packages/pluto_grid_export/example/web/favicon.png b/packages/pluto_grid_plus_export/example/web/favicon.png similarity index 100% rename from packages/pluto_grid_export/example/web/favicon.png rename to packages/pluto_grid_plus_export/example/web/favicon.png diff --git a/packages/pluto_grid_export/example/web/icons/Icon-192.png b/packages/pluto_grid_plus_export/example/web/icons/Icon-192.png similarity index 100% rename from packages/pluto_grid_export/example/web/icons/Icon-192.png rename to packages/pluto_grid_plus_export/example/web/icons/Icon-192.png diff --git a/packages/pluto_grid_export/example/web/icons/Icon-512.png b/packages/pluto_grid_plus_export/example/web/icons/Icon-512.png similarity index 100% rename from packages/pluto_grid_export/example/web/icons/Icon-512.png rename to packages/pluto_grid_plus_export/example/web/icons/Icon-512.png diff --git a/packages/pluto_grid_export/example/web/icons/Icon-maskable-192.png b/packages/pluto_grid_plus_export/example/web/icons/Icon-maskable-192.png similarity index 100% rename from packages/pluto_grid_export/example/web/icons/Icon-maskable-192.png rename to packages/pluto_grid_plus_export/example/web/icons/Icon-maskable-192.png diff --git a/packages/pluto_grid_export/example/web/icons/Icon-maskable-512.png b/packages/pluto_grid_plus_export/example/web/icons/Icon-maskable-512.png similarity index 100% rename from packages/pluto_grid_export/example/web/icons/Icon-maskable-512.png rename to packages/pluto_grid_plus_export/example/web/icons/Icon-maskable-512.png diff --git a/packages/pluto_grid_export/example/web/index.html b/packages/pluto_grid_plus_export/example/web/index.html similarity index 100% rename from packages/pluto_grid_export/example/web/index.html rename to packages/pluto_grid_plus_export/example/web/index.html diff --git a/packages/pluto_grid_export/example/web/manifest.json b/packages/pluto_grid_plus_export/example/web/manifest.json similarity index 100% rename from packages/pluto_grid_export/example/web/manifest.json rename to packages/pluto_grid_plus_export/example/web/manifest.json diff --git a/packages/pluto_grid_export/example/windows/.gitignore b/packages/pluto_grid_plus_export/example/windows/.gitignore similarity index 100% rename from packages/pluto_grid_export/example/windows/.gitignore rename to packages/pluto_grid_plus_export/example/windows/.gitignore diff --git a/packages/pluto_grid_export/example/windows/CMakeLists.txt b/packages/pluto_grid_plus_export/example/windows/CMakeLists.txt similarity index 100% rename from packages/pluto_grid_export/example/windows/CMakeLists.txt rename to packages/pluto_grid_plus_export/example/windows/CMakeLists.txt diff --git a/packages/pluto_grid_export/example/windows/flutter/CMakeLists.txt b/packages/pluto_grid_plus_export/example/windows/flutter/CMakeLists.txt similarity index 100% rename from packages/pluto_grid_export/example/windows/flutter/CMakeLists.txt rename to packages/pluto_grid_plus_export/example/windows/flutter/CMakeLists.txt diff --git a/packages/pluto_grid_export/example/windows/flutter/generated_plugin_registrant.cc b/packages/pluto_grid_plus_export/example/windows/flutter/generated_plugin_registrant.cc similarity index 100% rename from packages/pluto_grid_export/example/windows/flutter/generated_plugin_registrant.cc rename to packages/pluto_grid_plus_export/example/windows/flutter/generated_plugin_registrant.cc diff --git a/packages/pluto_grid_export/example/windows/flutter/generated_plugin_registrant.h b/packages/pluto_grid_plus_export/example/windows/flutter/generated_plugin_registrant.h similarity index 100% rename from packages/pluto_grid_export/example/windows/flutter/generated_plugin_registrant.h rename to packages/pluto_grid_plus_export/example/windows/flutter/generated_plugin_registrant.h diff --git a/packages/pluto_grid_export/example/windows/flutter/generated_plugins.cmake b/packages/pluto_grid_plus_export/example/windows/flutter/generated_plugins.cmake similarity index 100% rename from packages/pluto_grid_export/example/windows/flutter/generated_plugins.cmake rename to packages/pluto_grid_plus_export/example/windows/flutter/generated_plugins.cmake diff --git a/packages/pluto_grid_export/example/windows/runner/CMakeLists.txt b/packages/pluto_grid_plus_export/example/windows/runner/CMakeLists.txt similarity index 100% rename from packages/pluto_grid_export/example/windows/runner/CMakeLists.txt rename to packages/pluto_grid_plus_export/example/windows/runner/CMakeLists.txt diff --git a/packages/pluto_grid_export/example/windows/runner/Runner.rc b/packages/pluto_grid_plus_export/example/windows/runner/Runner.rc similarity index 100% rename from packages/pluto_grid_export/example/windows/runner/Runner.rc rename to packages/pluto_grid_plus_export/example/windows/runner/Runner.rc diff --git a/packages/pluto_grid_export/example/windows/runner/flutter_window.cpp b/packages/pluto_grid_plus_export/example/windows/runner/flutter_window.cpp similarity index 100% rename from packages/pluto_grid_export/example/windows/runner/flutter_window.cpp rename to packages/pluto_grid_plus_export/example/windows/runner/flutter_window.cpp diff --git a/packages/pluto_grid_export/example/windows/runner/flutter_window.h b/packages/pluto_grid_plus_export/example/windows/runner/flutter_window.h similarity index 100% rename from packages/pluto_grid_export/example/windows/runner/flutter_window.h rename to packages/pluto_grid_plus_export/example/windows/runner/flutter_window.h diff --git a/packages/pluto_grid_export/example/windows/runner/main.cpp b/packages/pluto_grid_plus_export/example/windows/runner/main.cpp similarity index 100% rename from packages/pluto_grid_export/example/windows/runner/main.cpp rename to packages/pluto_grid_plus_export/example/windows/runner/main.cpp diff --git a/packages/pluto_grid_export/example/windows/runner/resource.h b/packages/pluto_grid_plus_export/example/windows/runner/resource.h similarity index 100% rename from packages/pluto_grid_export/example/windows/runner/resource.h rename to packages/pluto_grid_plus_export/example/windows/runner/resource.h diff --git a/packages/pluto_grid_export/example/windows/runner/resources/app_icon.ico b/packages/pluto_grid_plus_export/example/windows/runner/resources/app_icon.ico similarity index 100% rename from packages/pluto_grid_export/example/windows/runner/resources/app_icon.ico rename to packages/pluto_grid_plus_export/example/windows/runner/resources/app_icon.ico diff --git a/packages/pluto_grid_export/example/windows/runner/runner.exe.manifest b/packages/pluto_grid_plus_export/example/windows/runner/runner.exe.manifest similarity index 100% rename from packages/pluto_grid_export/example/windows/runner/runner.exe.manifest rename to packages/pluto_grid_plus_export/example/windows/runner/runner.exe.manifest diff --git a/packages/pluto_grid_export/example/windows/runner/utils.cpp b/packages/pluto_grid_plus_export/example/windows/runner/utils.cpp similarity index 100% rename from packages/pluto_grid_export/example/windows/runner/utils.cpp rename to packages/pluto_grid_plus_export/example/windows/runner/utils.cpp diff --git a/packages/pluto_grid_export/example/windows/runner/utils.h b/packages/pluto_grid_plus_export/example/windows/runner/utils.h similarity index 100% rename from packages/pluto_grid_export/example/windows/runner/utils.h rename to packages/pluto_grid_plus_export/example/windows/runner/utils.h diff --git a/packages/pluto_grid_export/example/windows/runner/win32_window.cpp b/packages/pluto_grid_plus_export/example/windows/runner/win32_window.cpp similarity index 100% rename from packages/pluto_grid_export/example/windows/runner/win32_window.cpp rename to packages/pluto_grid_plus_export/example/windows/runner/win32_window.cpp diff --git a/packages/pluto_grid_export/example/windows/runner/win32_window.h b/packages/pluto_grid_plus_export/example/windows/runner/win32_window.h similarity index 100% rename from packages/pluto_grid_export/example/windows/runner/win32_window.h rename to packages/pluto_grid_plus_export/example/windows/runner/win32_window.h diff --git a/packages/pluto_grid_export/lib/pluto_grid_export.dart b/packages/pluto_grid_plus_export/lib/pluto_grid_plus_export.dart similarity index 81% rename from packages/pluto_grid_export/lib/pluto_grid_export.dart rename to packages/pluto_grid_plus_export/lib/pluto_grid_plus_export.dart index 00cfe258b..80897c954 100644 --- a/packages/pluto_grid_export/lib/pluto_grid_export.dart +++ b/packages/pluto_grid_plus_export/lib/pluto_grid_plus_export.dart @@ -1,4 +1,4 @@ -library pluto_grid_export; +library pluto_grid_plus_export; export 'package:pdf/pdf.dart'; export 'package:pdf/widgets.dart'; @@ -9,4 +9,4 @@ export './src/csv/pluto_grid_csv_export.dart'; export './src/pdf/generic_pdf_controller.dart'; export './src/pdf/pdf_controller.dart'; export './src/pdf/pluto_grid_pdf_export.dart'; -export './src/pluto_grid_export.dart'; +export './src/pluto_grid_plus_export.dart'; diff --git a/packages/pluto_grid_export/lib/src/abstract_text_export.dart b/packages/pluto_grid_plus_export/lib/src/abstract_text_export.dart similarity index 100% rename from packages/pluto_grid_export/lib/src/abstract_text_export.dart rename to packages/pluto_grid_plus_export/lib/src/abstract_text_export.dart diff --git a/packages/pluto_grid_export/lib/src/csv/pluto_grid_csv_export.dart b/packages/pluto_grid_plus_export/lib/src/csv/pluto_grid_csv_export.dart similarity index 100% rename from packages/pluto_grid_export/lib/src/csv/pluto_grid_csv_export.dart rename to packages/pluto_grid_plus_export/lib/src/csv/pluto_grid_csv_export.dart diff --git a/packages/pluto_grid_export/lib/src/pdf/generic_pdf_controller.dart b/packages/pluto_grid_plus_export/lib/src/pdf/generic_pdf_controller.dart similarity index 100% rename from packages/pluto_grid_export/lib/src/pdf/generic_pdf_controller.dart rename to packages/pluto_grid_plus_export/lib/src/pdf/generic_pdf_controller.dart diff --git a/packages/pluto_grid_export/lib/src/pdf/pdf_controller.dart b/packages/pluto_grid_plus_export/lib/src/pdf/pdf_controller.dart similarity index 100% rename from packages/pluto_grid_export/lib/src/pdf/pdf_controller.dart rename to packages/pluto_grid_plus_export/lib/src/pdf/pdf_controller.dart diff --git a/packages/pluto_grid_export/lib/src/pdf/pluto_grid_pdf_export.dart b/packages/pluto_grid_plus_export/lib/src/pdf/pluto_grid_pdf_export.dart similarity index 100% rename from packages/pluto_grid_export/lib/src/pdf/pluto_grid_pdf_export.dart rename to packages/pluto_grid_plus_export/lib/src/pdf/pluto_grid_pdf_export.dart diff --git a/packages/pluto_grid_export/lib/src/pluto_grid_export.dart b/packages/pluto_grid_plus_export/lib/src/pluto_grid_plus_export.dart similarity index 100% rename from packages/pluto_grid_export/lib/src/pluto_grid_export.dart rename to packages/pluto_grid_plus_export/lib/src/pluto_grid_plus_export.dart diff --git a/packages/pluto_grid_export/pubspec.yaml b/packages/pluto_grid_plus_export/pubspec.yaml similarity index 90% rename from packages/pluto_grid_export/pubspec.yaml rename to packages/pluto_grid_plus_export/pubspec.yaml index f6f528d51..fdd9318bf 100644 --- a/packages/pluto_grid_export/pubspec.yaml +++ b/packages/pluto_grid_plus_export/pubspec.yaml @@ -1,8 +1,8 @@ -name: pluto_grid_export +name: pluto_grid_plus_export description: PlutoGridExport converts PlutoGrid's metadata to CSV or PDF. Used with PlutoGrid. version: 1.0.2 homepage: https://bosskmk.github.io -repository: https://github.com/bosskmk/pluto_grid/tree/master/packages/pluto_grid_export +repository: https://github.com/bosskmk/pluto_grid/tree/master/packages/pluto_grid_plus_export publish_to: none environment: diff --git a/pubspec.yaml b/pubspec.yaml index 3266789f5..7aad5a14d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pluto_grid_plus description: PlutoGrid plus is a maintained version of PlutoGrid, PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS. (DataGrid, DataTable, Data Grid, Data Table, Sticky) -version: 8.2.0 +version: 8.3.0 homepage: https://pluto.weblaze.dev repository: https://github.com/doonfrs/pluto_grid_plus From 2fe491182430a9d5a77787a695a10034276c9628 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Sun, 18 Feb 2024 14:37:36 +0300 Subject: [PATCH 17/80] make pluto_grid_plus_export publishable --- packages/pluto_grid_plus_export/pubspec.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/pluto_grid_plus_export/pubspec.yaml b/packages/pluto_grid_plus_export/pubspec.yaml index fdd9318bf..67a32d097 100644 --- a/packages/pluto_grid_plus_export/pubspec.yaml +++ b/packages/pluto_grid_plus_export/pubspec.yaml @@ -3,7 +3,6 @@ description: PlutoGridExport converts PlutoGrid's metadata to CSV or PDF. Used w version: 1.0.2 homepage: https://bosskmk.github.io repository: https://github.com/bosskmk/pluto_grid/tree/master/packages/pluto_grid_plus_export -publish_to: none environment: sdk: ">=2.17.0 <4.0.0" @@ -12,8 +11,7 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: - path: ../.. + pluto_grid_plus: ^8.3.0 csv: ^5.1.1 pdf: ^3.10.7 printing: ^5.11.1 From f4e61427a8c62cb035489dc5f663cd21d90e4493 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Sun, 18 Feb 2024 14:43:42 +0300 Subject: [PATCH 18/80] change repo path in readme --- packages/pluto_grid_plus_export/CHANGELOG.md | 3 +++ packages/pluto_grid_plus_export/pubspec.yaml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/pluto_grid_plus_export/CHANGELOG.md b/packages/pluto_grid_plus_export/CHANGELOG.md index 29f86e551..26286e66d 100644 --- a/packages/pluto_grid_plus_export/CHANGELOG.md +++ b/packages/pluto_grid_plus_export/CHANGELOG.md @@ -1,3 +1,6 @@ +## [1.0.3] - 2024. 2. 18 +* Change repo path in readme + ## [1.0.2] - 2022. 6. 8 * Export of required classes. diff --git a/packages/pluto_grid_plus_export/pubspec.yaml b/packages/pluto_grid_plus_export/pubspec.yaml index 67a32d097..f67ccbec4 100644 --- a/packages/pluto_grid_plus_export/pubspec.yaml +++ b/packages/pluto_grid_plus_export/pubspec.yaml @@ -1,8 +1,8 @@ name: pluto_grid_plus_export description: PlutoGridExport converts PlutoGrid's metadata to CSV or PDF. Used with PlutoGrid. -version: 1.0.2 +version: 1.0.3 homepage: https://bosskmk.github.io -repository: https://github.com/bosskmk/pluto_grid/tree/master/packages/pluto_grid_plus_export +repository: https://github.com/doonfrs/pluto_grid_plus/tree/master/packages/pluto_grid_plus_export environment: sdk: ">=2.17.0 <4.0.0" From 0444e4fd86f07f79e746392c837280c5ac5be5d5 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Sun, 18 Feb 2024 14:49:26 +0300 Subject: [PATCH 19/80] change class name / package name in the readme file --- packages/pluto_grid_plus_export/README.md | 6 +++--- packages/pluto_grid_plus_export/pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/pluto_grid_plus_export/README.md b/packages/pluto_grid_plus_export/README.md index 98b6f7e21..28f2a705e 100644 --- a/packages/pluto_grid_plus_export/README.md +++ b/packages/pluto_grid_plus_export/README.md @@ -1,4 +1,4 @@ -## PlutoGridExport for PlutoGrid - v1.0.2 +## PlutoGridExport for PlutoGrid - v1.0.4 [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) @@ -9,7 +9,7 @@ https://github.com/bosskmk/pluto_grid/blob/master/demo/lib/screen/feature/export
-### [Pub.Dev](https://pub.dev/packages/pluto_grid_export_plus) +### [Pub.Dev](https://pub.dev/packages/pluto_grid_plus_export) > Check out how to install from the official distribution site.
@@ -28,7 +28,7 @@ import 'package:file_saver/file_saver.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:pluto_grid_plus/pluto_grid_plus.dart'; -import 'package:pluto_grid_plus_export/pluto_grid_plus_export.dart' as pluto_grid_plus_export; +import 'package:pluto_grid_plus_export/pluto_grid_plus_export.dart' as pluto_grid_export; void main() { runApp(const MyApp()); diff --git a/packages/pluto_grid_plus_export/pubspec.yaml b/packages/pluto_grid_plus_export/pubspec.yaml index f67ccbec4..e808b53d5 100644 --- a/packages/pluto_grid_plus_export/pubspec.yaml +++ b/packages/pluto_grid_plus_export/pubspec.yaml @@ -1,6 +1,6 @@ name: pluto_grid_plus_export description: PlutoGridExport converts PlutoGrid's metadata to CSV or PDF. Used with PlutoGrid. -version: 1.0.3 +version: 1.0.4 homepage: https://bosskmk.github.io repository: https://github.com/doonfrs/pluto_grid_plus/tree/master/packages/pluto_grid_plus_export From 517c0f97cda9db6d6e51d919587f98c3ea2277ec Mon Sep 17 00:00:00 2001 From: doonfrs Date: Sun, 18 Feb 2024 14:50:09 +0300 Subject: [PATCH 20/80] change class name / package name in the readme file --- packages/pluto_grid_plus_export/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/pluto_grid_plus_export/CHANGELOG.md b/packages/pluto_grid_plus_export/CHANGELOG.md index 26286e66d..386970593 100644 --- a/packages/pluto_grid_plus_export/CHANGELOG.md +++ b/packages/pluto_grid_plus_export/CHANGELOG.md @@ -1,3 +1,6 @@ +## [1.0.4] - 2024. 2. 18 +* Change repo path & class name in readme + ## [1.0.3] - 2024. 2. 18 * Change repo path in readme From abde35ccb53dbe089ce44ea68fa4e859ee9a8b75 Mon Sep 17 00:00:00 2001 From: Gianluca Bettega Date: Mon, 19 Feb 2024 19:11:58 -0300 Subject: [PATCH 21/80] remove unnecessary or --- lib/src/helper/pluto_key_manager_event.dart | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/src/helper/pluto_key_manager_event.dart b/lib/src/helper/pluto_key_manager_event.dart index 3e31a927f..13294fcce 100644 --- a/lib/src/helper/pluto_key_manager_event.dart +++ b/lib/src/helper/pluto_key_manager_event.dart @@ -67,14 +67,10 @@ class PlutoKeyManagerEvent { event.logicalKey.keyId == LogicalKeyboardKey.backspace.keyId; bool get isShift => - event.logicalKey.keyId == LogicalKeyboardKey.shift.keyId || - event.logicalKey.keyId == LogicalKeyboardKey.shiftLeft.keyId || - event.logicalKey.keyId == LogicalKeyboardKey.shiftRight.keyId; + event.logicalKey.keyId == LogicalKeyboardKey.shift.keyId; bool get isControl => - event.logicalKey.keyId == LogicalKeyboardKey.control.keyId || - event.logicalKey.keyId == LogicalKeyboardKey.controlLeft.keyId || - event.logicalKey.keyId == LogicalKeyboardKey.controlRight.keyId; + event.logicalKey.keyId == LogicalKeyboardKey.control.keyId; bool get isCharacter => _characters.contains(event.logicalKey.keyId); From 103382b2a6c6ed699dc5235067d20727078c25b5 Mon Sep 17 00:00:00 2001 From: Gianluca Bettega Date: Mon, 19 Feb 2024 19:26:41 -0300 Subject: [PATCH 22/80] original value and getter --- lib/src/model/pluto_cell.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/src/model/pluto_cell.dart b/lib/src/model/pluto_cell.dart index 1854cb040..85d7896d8 100644 --- a/lib/src/model/pluto_cell.dart +++ b/lib/src/model/pluto_cell.dart @@ -6,12 +6,15 @@ class PlutoCell { dynamic value, Key? key, }) : _key = key ?? UniqueKey(), - _value = value; + _value = value, + _originalValue = value; final Key _key; dynamic _value; + final dynamic _originalValue; + dynamic _valueForSorting; /// Set initial value according to [PlutoColumn] setting. @@ -52,6 +55,10 @@ class PlutoCell { return _value; } + dynamic get originalValue { + return _originalValue; + } + set value(dynamic changed) { if (_value == changed) { return; From 65965290675b97ce691d9f68000cb5084d314840 Mon Sep 17 00:00:00 2001 From: Gianluca Bettega Date: Mon, 19 Feb 2024 20:39:54 -0300 Subject: [PATCH 23/80] added more personalization options --- lib/src/pluto_grid_configuration.dart | 191 ++++++++++++++------- lib/src/ui/cells/pluto_default_cell.dart | 6 +- lib/src/ui/columns/pluto_column_title.dart | 6 +- lib/src/ui/pluto_base_row.dart | 2 +- 4 files changed, 133 insertions(+), 72 deletions(-) diff --git a/lib/src/pluto_grid_configuration.dart b/lib/src/pluto_grid_configuration.dart index a569697af..08f39403a 100644 --- a/lib/src/pluto_grid_configuration.dart +++ b/lib/src/pluto_grid_configuration.dart @@ -203,7 +203,9 @@ class PlutoGridStyleConfig { this.oddRowColor, this.evenRowColor, this.activatedColor = const Color(0xFFDCF5FF), - this.checkedColor = const Color(0x11757575), + Color? columnCheckedColor, + Color? cellCheckedColor, + this.rowCheckedColor = const Color(0x11757575), this.cellColorInEditState = Colors.white, this.cellColorInReadOnlyState = const Color(0xFFDBDBDC), this.cellColorGroupedRow, @@ -228,6 +230,10 @@ class PlutoGridStyleConfig { fontSize: 14, fontWeight: FontWeight.w600, ), + Color? columnUnselectedColor, + Color? columnActiveColor, + Color? cellUnselectedColor, + Color? cellActiveColor, this.cellTextStyle = const TextStyle( color: Colors.black, fontSize: 14, @@ -247,64 +253,81 @@ class PlutoGridStyleConfig { this.gridPopupBorderRadius = BorderRadius.zero, this.filterHeaderColor, this.filterHeaderIconColor, - }); - - const PlutoGridStyleConfig.dark( - {this.enableGridBorderShadow = false, - this.enableColumnBorderVertical = true, - this.enableColumnBorderHorizontal = true, - this.enableCellBorderVertical = true, - this.enableCellBorderHorizontal = true, - this.enableRowColorAnimation = false, - this.gridBackgroundColor = const Color(0xFF111111), - this.rowColor = const Color(0xFF111111), - this.oddRowColor, - this.evenRowColor, - this.activatedColor = const Color(0xFF313131), - this.checkedColor = const Color(0x11202020), - this.cellColorInEditState = const Color(0xFF666666), - this.cellColorInReadOnlyState = const Color(0xFF222222), - this.cellColorGroupedRow, - this.dragTargetColumnColor = const Color(0xFF313131), - this.iconColor = Colors.white38, - this.disabledIconColor = Colors.white12, - this.menuBackgroundColor = const Color(0xFF414141), - this.gridBorderColor = const Color(0xFF666666), - this.borderColor = const Color(0xFF222222), - this.activatedBorderColor = const Color(0xFFFFFFFF), - this.inactivatedBorderColor = const Color(0xFF666666), - this.iconSize = 18, - this.rowHeight = PlutoGridSettings.rowHeight, - this.columnHeight = PlutoGridSettings.rowHeight, - this.columnFilterHeight = PlutoGridSettings.rowHeight, - this.defaultColumnTitlePadding = PlutoGridSettings.columnTitlePadding, - this.defaultColumnFilterPadding = PlutoGridSettings.columnFilterPadding, - this.defaultCellPadding = PlutoGridSettings.cellPadding, - this.columnTextStyle = const TextStyle( - color: Colors.white, - decoration: TextDecoration.none, - fontSize: 14, - fontWeight: FontWeight.w600, - ), - this.cellTextStyle = const TextStyle( - color: Colors.white, - fontSize: 14, - ), - this.columnContextIcon = Icons.dehaze, - this.columnResizeIcon = Icons.code_sharp, - this.columnAscendingIcon, - this.columnDescendingIcon, - this.rowGroupExpandedIcon = Icons.keyboard_arrow_down, - this.rowGroupCollapsedIcon = const IconData( - 0xe355, - matchTextDirection: true, - fontFamily: 'MaterialIcons', - ), - this.rowGroupEmptyIcon = Icons.noise_control_off, - this.gridBorderRadius = BorderRadius.zero, - this.gridPopupBorderRadius = BorderRadius.zero, - this.filterHeaderColor, - this.filterHeaderIconColor}); + }) : columnCheckedColor = (columnCheckedColor ?? activatedColor), + cellCheckedColor = (cellCheckedColor ?? activatedColor), + columnUnselectedColor = (columnUnselectedColor ?? iconColor), + columnActiveColor = (columnActiveColor ?? activatedBorderColor), + cellUnselectedColor = (cellUnselectedColor ?? iconColor), + cellActiveColor = (cellActiveColor ?? activatedBorderColor); + + const PlutoGridStyleConfig.dark({ + this.enableGridBorderShadow = false, + this.enableColumnBorderVertical = true, + this.enableColumnBorderHorizontal = true, + this.enableCellBorderVertical = true, + this.enableCellBorderHorizontal = true, + this.enableRowColorAnimation = false, + this.gridBackgroundColor = const Color(0xFF111111), + this.rowColor = const Color(0xFF111111), + this.oddRowColor, + this.evenRowColor, + this.activatedColor = const Color(0xFF313131), + Color? columnCheckedColor, + Color? cellCheckedColor, + this.rowCheckedColor = const Color(0x11202020), + this.cellColorInEditState = const Color(0xFF666666), + this.cellColorInReadOnlyState = const Color(0xFF222222), + this.cellColorGroupedRow, + this.dragTargetColumnColor = const Color(0xFF313131), + this.iconColor = Colors.white38, + this.disabledIconColor = Colors.white12, + this.menuBackgroundColor = const Color(0xFF414141), + this.gridBorderColor = const Color(0xFF666666), + this.borderColor = const Color(0xFF222222), + this.activatedBorderColor = const Color(0xFFFFFFFF), + this.inactivatedBorderColor = const Color(0xFF666666), + this.iconSize = 18, + this.rowHeight = PlutoGridSettings.rowHeight, + this.columnHeight = PlutoGridSettings.rowHeight, + this.columnFilterHeight = PlutoGridSettings.rowHeight, + this.defaultColumnTitlePadding = PlutoGridSettings.columnTitlePadding, + this.defaultColumnFilterPadding = PlutoGridSettings.columnFilterPadding, + this.defaultCellPadding = PlutoGridSettings.cellPadding, + this.columnTextStyle = const TextStyle( + color: Colors.white, + decoration: TextDecoration.none, + fontSize: 14, + fontWeight: FontWeight.w600, + ), + Color? columnUnselectedColor, + Color? columnActiveColor, + Color? cellUnselectedColor, + Color? cellActiveColor, + this.cellTextStyle = const TextStyle( + color: Colors.white, + fontSize: 14, + ), + this.columnContextIcon = Icons.dehaze, + this.columnResizeIcon = Icons.code_sharp, + this.columnAscendingIcon, + this.columnDescendingIcon, + this.rowGroupExpandedIcon = Icons.keyboard_arrow_down, + this.rowGroupCollapsedIcon = const IconData( + 0xe355, + matchTextDirection: true, + fontFamily: 'MaterialIcons', + ), + this.rowGroupEmptyIcon = Icons.noise_control_off, + this.gridBorderRadius = BorderRadius.zero, + this.gridPopupBorderRadius = BorderRadius.zero, + this.filterHeaderColor, + this.filterHeaderIconColor, + }) : columnCheckedColor = (columnCheckedColor ?? activatedColor), + cellCheckedColor = (cellCheckedColor ?? activatedColor), + columnUnselectedColor = (columnUnselectedColor ?? iconColor), + columnActiveColor = (columnActiveColor ?? activatedBorderColor), + cellUnselectedColor = (cellUnselectedColor ?? iconColor), + cellActiveColor = (cellActiveColor ?? activatedBorderColor); /// Enable borderShadow in [PlutoGrid]. final bool enableGridBorderShadow; @@ -347,8 +370,14 @@ class PlutoGridStyleConfig { /// Activated Color. (Current or Selected row, cell) final Color activatedColor; - /// Checked Color. (Checked rows) - final Color checkedColor; + /// Checked Color for the column title. (Checked rows) + final Color columnCheckedColor; + + /// Checked Color for the cell. (Checked rows) + final Color cellCheckedColor; + + /// Checked Color for the row. (Checked rows) + final Color rowCheckedColor; /// Cell color in edit state. (only current cell) final Color cellColorInEditState; @@ -415,6 +444,18 @@ class PlutoGridStyleConfig { /// Column - text style final TextStyle columnTextStyle; + /// Unselected color of the column. + final Color columnUnselectedColor; + + /// Active color of the column. + final Color columnActiveColor; + + /// Unselected color of the default cell. + final Color cellUnselectedColor; + + /// Active color of the default cell. + final Color cellActiveColor; + /// Cell - text style final TextStyle cellTextStyle; @@ -469,7 +510,8 @@ class PlutoGridStyleConfig { PlutoOptional? oddRowColor, PlutoOptional? evenRowColor, Color? activatedColor, - Color? checkedColor, + Color? columnCheckedColor, + Color? cellCheckedColor, Color? cellColorInEditState, Color? cellColorInReadOnlyState, PlutoOptional? cellColorGroupedRow, @@ -489,6 +531,10 @@ class PlutoGridStyleConfig { EdgeInsets? defaultColumnFilterPadding, EdgeInsets? defaultCellPadding, TextStyle? columnTextStyle, + Color? columnUnselectedColor, + Color? columnActiveColor, + Color? cellUnselectedColor, + Color? cellActiveColor, TextStyle? cellTextStyle, IconData? columnContextIcon, IconData? columnResizeIcon, @@ -519,7 +565,8 @@ class PlutoGridStyleConfig { evenRowColor: evenRowColor == null ? this.evenRowColor : evenRowColor.value, activatedColor: activatedColor ?? this.activatedColor, - checkedColor: checkedColor ?? this.checkedColor, + columnCheckedColor: columnCheckedColor ?? this.columnCheckedColor, + cellCheckedColor: cellCheckedColor ?? this.cellCheckedColor, cellColorInEditState: cellColorInEditState ?? this.cellColorInEditState, cellColorInReadOnlyState: cellColorInReadOnlyState ?? this.cellColorInReadOnlyState, @@ -546,6 +593,10 @@ class PlutoGridStyleConfig { defaultColumnFilterPadding ?? this.defaultColumnFilterPadding, defaultCellPadding: defaultCellPadding ?? this.defaultCellPadding, columnTextStyle: columnTextStyle ?? this.columnTextStyle, + columnUnselectedColor: columnUnselectedColor ?? this.columnUnselectedColor, + columnActiveColor: columnActiveColor ?? this.columnActiveColor, + cellUnselectedColor: cellUnselectedColor ?? this.cellUnselectedColor, + cellActiveColor: cellActiveColor ?? this.cellActiveColor, cellTextStyle: cellTextStyle ?? this.cellTextStyle, columnContextIcon: columnContextIcon ?? this.columnContextIcon, columnResizeIcon: columnResizeIcon ?? this.columnResizeIcon, @@ -583,7 +634,8 @@ class PlutoGridStyleConfig { oddRowColor == other.oddRowColor && evenRowColor == other.evenRowColor && activatedColor == other.activatedColor && - checkedColor == other.checkedColor && + columnCheckedColor == other.columnCheckedColor && + cellCheckedColor == other.cellCheckedColor && cellColorInEditState == other.cellColorInEditState && cellColorInReadOnlyState == other.cellColorInReadOnlyState && cellColorGroupedRow == other.cellColorGroupedRow && @@ -603,6 +655,10 @@ class PlutoGridStyleConfig { defaultColumnFilterPadding == other.defaultColumnFilterPadding && defaultCellPadding == other.defaultCellPadding && columnTextStyle == other.columnTextStyle && + columnUnselectedColor == other.columnUnselectedColor && + columnActiveColor == other.columnActiveColor && + cellUnselectedColor == other.cellUnselectedColor && + cellActiveColor == other.cellActiveColor && cellTextStyle == other.cellTextStyle && columnContextIcon == other.columnContextIcon && columnResizeIcon == other.columnResizeIcon && @@ -628,7 +684,8 @@ class PlutoGridStyleConfig { oddRowColor, evenRowColor, activatedColor, - checkedColor, + columnCheckedColor, + cellCheckedColor, cellColorInEditState, cellColorInReadOnlyState, cellColorGroupedRow, @@ -648,6 +705,10 @@ class PlutoGridStyleConfig { defaultColumnFilterPadding, defaultCellPadding, columnTextStyle, + columnUnselectedColor, + columnActiveColor, + cellUnselectedColor, + cellActiveColor, cellTextStyle, columnContextIcon, columnResizeIcon, diff --git a/lib/src/ui/cells/pluto_default_cell.dart b/lib/src/ui/cells/pluto_default_cell.dart index 00386629e..515568351 100644 --- a/lib/src/ui/cells/pluto_default_cell.dart +++ b/lib/src/ui/cells/pluto_default_cell.dart @@ -407,9 +407,9 @@ class CheckboxSelectionWidgetState handleOnChanged: _handleOnChanged, tristate: _tristate, scale: 0.86, - unselectedColor: stateManager.configuration.style.iconColor, - activeColor: stateManager.configuration.style.activatedBorderColor, - checkColor: stateManager.configuration.style.activatedColor, + unselectedColor: stateManager.configuration.style.cellUnselectedColor, + activeColor: stateManager.configuration.style.cellActiveColor, + checkColor: stateManager.configuration.style.cellCheckedColor, ); } } diff --git a/lib/src/ui/columns/pluto_column_title.dart b/lib/src/ui/columns/pluto_column_title.dart index 578a8bb20..a8b5d9a78 100644 --- a/lib/src/ui/columns/pluto_column_title.dart +++ b/lib/src/ui/columns/pluto_column_title.dart @@ -474,9 +474,9 @@ class CheckboxAllSelectionWidgetState handleOnChanged: _handleOnChanged, tristate: true, scale: 0.86, - unselectedColor: stateManager.configuration.style.iconColor, - activeColor: stateManager.configuration.style.activatedBorderColor, - checkColor: stateManager.configuration.style.activatedColor, + unselectedColor: stateManager.configuration.style.columnUnselectedColor, + activeColor: stateManager.configuration.style.columnActiveColor, + checkColor: stateManager.configuration.style.columnCheckedColor, ); } } diff --git a/lib/src/ui/pluto_base_row.dart b/lib/src/ui/pluto_base_row.dart index a957702ee..5bca68ac4 100644 --- a/lib/src/ui/pluto_base_row.dart +++ b/lib/src/ui/pluto_base_row.dart @@ -274,7 +274,7 @@ class _RowContainerWidgetState extends PlutoStateWithChange<_RowContainerWidget> } return isCheckedRow - ? Color.alphaBlend(stateManager.configuration.style.checkedColor, color) + ? Color.alphaBlend(stateManager.configuration.style.rowCheckedColor, color) : color; } From a01117ddf5f048f8bdd26f3fbd856b197dff124b Mon Sep 17 00:00:00 2001 From: Gianluca Bettega Date: Tue, 20 Feb 2024 20:02:00 -0300 Subject: [PATCH 24/80] improve files organization --- lib/pluto_grid_plus.dart | 3 + lib/src/pluto_grid.dart | 395 ------------------------------- lib/src/pluto_grid_enums.dart | 123 ++++++++++ lib/src/pluto_grid_events.dart | 216 +++++++++++++++++ lib/src/pluto_grid_settings.dart | 58 +++++ 5 files changed, 400 insertions(+), 395 deletions(-) create mode 100644 lib/src/pluto_grid_enums.dart create mode 100644 lib/src/pluto_grid_events.dart create mode 100644 lib/src/pluto_grid_settings.dart diff --git a/lib/pluto_grid_plus.dart b/lib/pluto_grid_plus.dart index 2f96cf79d..813c20eaf 100644 --- a/lib/pluto_grid_plus.dart +++ b/lib/pluto_grid_plus.dart @@ -43,6 +43,9 @@ export './src/pluto_grid.dart'; export './src/pluto_grid_configuration.dart'; export './src/pluto_grid_date_picker.dart'; export './src/pluto_grid_popup.dart'; +export './src/pluto_grid_settings.dart'; +export './src/pluto_grid_enums.dart'; +export './src/pluto_grid_events.dart'; export './src/widgets/pluto_linked_scroll_controller.dart'; export './src/widgets/pluto_loading.dart'; export './src/widgets/pluto_scaled_checkbox.dart'; diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index 89e4178f0..23c816bef 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -1240,220 +1240,6 @@ class _GridContainer extends StatelessWidget { } } -/// [PlutoGrid.onLoaded] Argument received by registering callback. -class PlutoGridOnLoadedEvent { - final PlutoGridStateManager stateManager; - - const PlutoGridOnLoadedEvent({ - required this.stateManager, - }); -} - -/// Event called when the value of [PlutoCell] is changed. -/// -/// Notice. -/// [columnIdx], [rowIdx] are the values in the current screen state. -/// Values in their current state, not actual data values -/// with filtering, sorting, or pagination applied. -/// This value is from -/// [PlutoGridStateManager.columns] and [PlutoGridStateManager.rows]. -/// -/// All data is in -/// [PlutoGridStateManager.refColumns.originalList] -/// [PlutoGridStateManager.refRows.originalList] -class PlutoGridOnChangedEvent { - final int columnIdx; - final PlutoColumn column; - final int rowIdx; - final PlutoRow row; - final dynamic value; - final dynamic oldValue; - - const PlutoGridOnChangedEvent({ - required this.columnIdx, - required this.column, - required this.rowIdx, - required this.row, - this.value, - this.oldValue, - }); - - @override - String toString() { - String out = '[PlutoOnChangedEvent] '; - out += 'ColumnIndex : $columnIdx, RowIndex : $rowIdx\n'; - out += '::: oldValue : $oldValue\n'; - out += '::: newValue : $value'; - return out; - } -} - -/// This is the argument value of the [PlutoGrid.onSelected] callback -/// that is called when the [PlutoGrid.mode] value is in select mode. -/// -/// If [row], [rowIdx], [cell] is [PlutoGridMode.select] or [PlutoGridMode.selectWithOneTap], -/// Information of the row selected with the tab or enter key. -/// If the Escape key is pressed, these values are null. -/// -/// [selectedRows] is valid only in case of [PlutoGridMode.multiSelect]. -/// If rows are selected by tab or keyboard, the selected rows are included. -/// If the Escape key is pressed, this value is null. -class PlutoGridOnSelectedEvent { - final PlutoRow? row; - final int? rowIdx; - final PlutoCell? cell; - final List? selectedRows; - - const PlutoGridOnSelectedEvent({ - this.row, - this.rowIdx, - this.cell, - this.selectedRows, - }); - - @override - String toString() { - return '[PlutoGridOnSelectedEvent] rowIdx: $rowIdx, selectedRows: ${selectedRows?.length}'; - } -} - -/// Argument of [PlutoGrid.onSorted] callback for receiving column sort change event. -class PlutoGridOnSortedEvent { - final PlutoColumn column; - - final PlutoColumnSort oldSort; - - const PlutoGridOnSortedEvent({ - required this.column, - required this.oldSort, - }); - - @override - String toString() { - return '[PlutoGridOnSortedEvent] ${column.title} (changed: ${column.sort}, old: $oldSort)'; - } -} - -/// Argument of [PlutoGrid.onRowChecked] callback to receive row checkbox event. -/// -/// [runtimeType] is [PlutoGridOnRowCheckedAllEvent] if [isAll] is true. -/// When [isAll] is true, it means the entire check button event of the column. -/// -/// [runtimeType] is [PlutoGridOnRowCheckedOneEvent] if [isRow] is true. -/// If [isRow] is true, it means the check button event of a specific row. -abstract class PlutoGridOnRowCheckedEvent { - bool get isAll => runtimeType == PlutoGridOnRowCheckedAllEvent; - - bool get isRow => runtimeType == PlutoGridOnRowCheckedOneEvent; - - final PlutoRow? row; - final int? rowIdx; - final bool? isChecked; - - const PlutoGridOnRowCheckedEvent({ - this.row, - this.rowIdx, - this.isChecked, - }); - - @override - String toString() { - String checkMessage = isAll ? 'All rows ' : 'RowIdx $rowIdx '; - checkMessage += isChecked == true ? 'checked' : 'unchecked'; - return '[PlutoGridOnRowCheckedEvent] $checkMessage'; - } -} - -/// Argument of [PlutoGrid.onRowChecked] callback when the checkbox of the row is tapped. -class PlutoGridOnRowCheckedOneEvent extends PlutoGridOnRowCheckedEvent { - const PlutoGridOnRowCheckedOneEvent({ - required PlutoRow super.row, - required int super.rowIdx, - required super.isChecked, - }); -} - -/// Argument of [PlutoGrid.onRowChecked] callback when all checkboxes of the column are tapped. -class PlutoGridOnRowCheckedAllEvent extends PlutoGridOnRowCheckedEvent { - const PlutoGridOnRowCheckedAllEvent({ - super.isChecked, - }) : super(row: null, rowIdx: null); -} - -/// The argument of the [PlutoGrid.onRowDoubleTap] callback -/// to receive the event of double-tapping the row. -class PlutoGridOnRowDoubleTapEvent { - final PlutoRow row; - final int rowIdx; - final PlutoCell cell; - - const PlutoGridOnRowDoubleTapEvent({ - required this.row, - required this.rowIdx, - required this.cell, - }); -} - -/// Argument of the [PlutoGrid.onRowSecondaryTap] callback -/// to receive the event of tapping the row with the right mouse button. -class PlutoGridOnRowSecondaryTapEvent { - final PlutoRow row; - final int rowIdx; - final PlutoCell cell; - final Offset offset; - - const PlutoGridOnRowSecondaryTapEvent({ - required this.row, - required this.rowIdx, - required this.cell, - required this.offset, - }); -} - -/// Argument of [PlutoGrid.onRowsMoved] callback -/// to receive the event of moving the row by dragging it. -class PlutoGridOnRowsMovedEvent { - final int idx; - final List rows; - - const PlutoGridOnRowsMovedEvent({ - required this.idx, - required this.rows, - }); -} - -/// Argument of [PlutoGrid.onColumnsMoved] callback -/// to move columns by dragging or receive left or right fixed events. -/// -/// [idx] means the actual index of -/// [PlutoGridStateManager.columns] or [PlutoGridStateManager.refColumns]. -/// -/// [visualIdx] means the order displayed on the screen, not the actual index. -/// For example, if there are 5 columns of [0, 1, 2, 3, 4] -/// If 1 column is frozen to the right, [visualIndex] becomes 4. -/// But the actual index is preserved. -class PlutoGridOnColumnsMovedEvent { - final int idx; - final int visualIdx; - final List columns; - - const PlutoGridOnColumnsMovedEvent({ - required this.idx, - required this.visualIdx, - required this.columns, - }); - - @override - String toString() { - String text = - '[PlutoGridOnColumnsMovedEvent] idx: $idx, visualIdx: $visualIdx\n'; - - text += columns.map((e) => e.title).join(','); - - return text; - } -} - /// Argument of [PlutoGrid.rowColumnCallback] callback /// to dynamically change the background color of a row. class PlutoRowColorContext { @@ -1516,187 +1302,6 @@ class PlutoOptional { final T? value; } -abstract class PlutoGridSettings { - /// If there is a frozen column, the minimum width of the body - /// (if it is less than the value, the frozen column is released) - static const double bodyMinWidth = 200.0; - - /// Default column width - static const double columnWidth = 200.0; - - /// Column width - static const double minColumnWidth = 80.0; - - /// Frozen column division line (ShadowLine) size - static const double shadowLineSize = 3.0; - - /// Sum of frozen column division line width - static const double totalShadowLineWidth = - PlutoGridSettings.shadowLineSize * 2; - - /// Grid - padding - static const double gridPadding = 2.0; - - /// Grid - border width - static const double gridBorderWidth = 1.0; - - static const double gridInnerSpacing = - (gridPadding * 2) + (gridBorderWidth * 2); - - /// Row - Default row height - static const double rowHeight = 45.0; - - /// Row - border width - static const double rowBorderWidth = 1.0; - - /// Row - total height - static const double rowTotalHeight = rowHeight + rowBorderWidth; - - /// Cell - padding - static const EdgeInsets cellPadding = EdgeInsets.symmetric(horizontal: 10); - - /// Column title - padding - static const EdgeInsets columnTitlePadding = - EdgeInsets.symmetric(horizontal: 10); - - static const EdgeInsets columnFilterPadding = EdgeInsets.all(5); - - /// Cell - fontSize - static const double cellFontSize = 14; - - /// Scroll when multi-selection is as close as that value from the edge - static const double offsetScrollingFromEdge = 10.0; - - /// Size that scrolls from the edge at once when selecting multiple - static const double offsetScrollingFromEdgeAtOnce = 200.0; - - static const int debounceMillisecondsForColumnFilter = 300; -} - -enum PlutoGridMode { - /// {@template pluto_grid_mode_normal} - /// Basic mode with most functions not limited, such as editing and selection. - /// {@endtemplate} - normal, - - /// {@template pluto_grid_mode_readOnly} - /// Cell cannot be edited. - /// To try to edit by force, it is possible as follows. - /// - /// ```dart - /// stateManager.changeCellValue( - /// stateManager.currentCell!, - /// 'test', - /// force: true, - /// ); - /// ``` - /// {@endtemplate} - readOnly, - - /// {@template pluto_grid_mode_select} - /// Mode for selecting one list from a specific list. - /// Tap a row or press Enter to select the current row. - /// - /// [select] - /// Call the [PlutoGrid.onSelected] callback when the selected row is tapped. - /// To select an unselected row, select the row and then tap once more. - /// [selectWithOneTap] - /// Same as [select], but calls [PlutoGrid.onSelected] with one tap. - /// - /// This mode is non-editable, but programmatically possible. - /// ```dart - /// stateManager.changeCellValue( - /// stateManager.currentRow!.cells['column_1']!, - /// value, - /// force: true, - /// ); - /// ``` - /// {@endtemplate} - select, - - /// {@macro pluto_grid_mode_select} - selectWithOneTap, - - /// {@template pluto_grid_mode_multiSelect} - /// Mode to select multiple rows. - /// When a row is tapped, it is selected or deselected and the [PlutoGrid.onSelected] callback is called. - /// [PlutoGridOnSelectedEvent.selectedRows] contains the selected rows. - /// When a row is selected with keyboard shift + arrowDown/Up keys, - /// the [PlutoGrid.onSelected] callback is called only when the Enter key is pressed. - /// When the Escape key is pressed, - /// the selected row is canceled and the [PlutoGrid.onSelected] callback is called - /// with a [PlutoGridOnSelectedEvent.selectedRows] value of null. - /// {@endtemplate} - multiSelect, - - /// {@template pluto_grid_mode_popup} - /// This is a mode for popup type. - /// It is used when calling a popup for filtering or column setting - /// inside [PlutoGrid], and it is not a mode for users. - /// - /// If the user wants to run [PlutoGrid] as a popup, - /// use [PlutoGridPopup] or [PlutoGridDualGridPopup]. - /// {@endtemplate} - popup; - - bool get isNormal => this == PlutoGridMode.normal; - - bool get isReadOnly => this == PlutoGridMode.readOnly; - - bool get isEditableMode => isNormal || isPopup; - - bool get isSelectMode => isSingleSelectMode || isMultiSelectMode; - - bool get isSingleSelectMode => isSelect || isSelectWithOneTap; - - bool get isMultiSelectMode => isMultiSelect; - - bool get isSelect => this == PlutoGridMode.select; - - bool get isSelectWithOneTap => this == PlutoGridMode.selectWithOneTap; - - bool get isMultiSelect => this == PlutoGridMode.multiSelect; - - bool get isPopup => this == PlutoGridMode.popup; -} - -/// When calling loading screen with [PlutoGridStateManager.setShowLoading] method -/// Determines the level of loading. -/// -/// {@template pluto_grid_loading_level_grid} -/// [grid] makes the entire grid opaque and puts the loading indicator in the center. -/// The user is in a state where no interaction is possible. -/// {@endtemplate} -/// -/// {@template pluto_grid_loading_level_rows} -/// [rows] represents the [LinearProgressIndicator] at the top of the widget area -/// that displays the rows. -/// User can interact. -/// {@endtemplate} -/// -/// {@template pluto_grid_loading_level_rowsBottomCircular} -/// [rowsBottomCircular] represents the [CircularProgressIndicator] at the bottom of the widget -/// that displays the rows. -/// User can interact. -/// {@endtemplate} -enum PlutoGridLoadingLevel { - /// {@macro pluto_grid_loading_level_grid} - grid, - - /// {@macro pluto_grid_loading_level_rows} - rows, - - /// {@macro pluto_grid_loading_level_rowsBottomCircular} - rowsBottomCircular; - - bool get isGrid => this == PlutoGridLoadingLevel.grid; - - bool get isRows => this == PlutoGridLoadingLevel.rows; - - bool get isRowsBottomCircular => - this == PlutoGridLoadingLevel.rowsBottomCircular; -} - enum _StackName { header, headerDivider, diff --git a/lib/src/pluto_grid_enums.dart b/lib/src/pluto_grid_enums.dart new file mode 100644 index 000000000..478cbbc0f --- /dev/null +++ b/lib/src/pluto_grid_enums.dart @@ -0,0 +1,123 @@ +enum PlutoGridMode { + /// {@template pluto_grid_mode_normal} + /// Basic mode with most functions not limited, such as editing and selection. + /// {@endtemplate} + normal, + + /// {@template pluto_grid_mode_readOnly} + /// Cell cannot be edited. + /// To try to edit by force, it is possible as follows. + /// + /// ```dart + /// stateManager.changeCellValue( + /// stateManager.currentCell!, + /// 'test', + /// force: true, + /// ); + /// ``` + /// {@endtemplate} + readOnly, + + /// {@template pluto_grid_mode_select} + /// Mode for selecting one list from a specific list. + /// Tap a row or press Enter to select the current row. + /// + /// [select] + /// Call the [PlutoGrid.onSelected] callback when the selected row is tapped. + /// To select an unselected row, select the row and then tap once more. + /// [selectWithOneTap] + /// Same as [select], but calls [PlutoGrid.onSelected] with one tap. + /// + /// This mode is non-editable, but programmatically possible. + /// ```dart + /// stateManager.changeCellValue( + /// stateManager.currentRow!.cells['column_1']!, + /// value, + /// force: true, + /// ); + /// ``` + /// {@endtemplate} + select, + + /// {@macro pluto_grid_mode_select} + selectWithOneTap, + + /// {@template pluto_grid_mode_multiSelect} + /// Mode to select multiple rows. + /// When a row is tapped, it is selected or deselected and the [PlutoGrid.onSelected] callback is called. + /// [PlutoGridOnSelectedEvent.selectedRows] contains the selected rows. + /// When a row is selected with keyboard shift + arrowDown/Up keys, + /// the [PlutoGrid.onSelected] callback is called only when the Enter key is pressed. + /// When the Escape key is pressed, + /// the selected row is canceled and the [PlutoGrid.onSelected] callback is called + /// with a [PlutoGridOnSelectedEvent.selectedRows] value of null. + /// {@endtemplate} + multiSelect, + + /// {@template pluto_grid_mode_popup} + /// This is a mode for popup type. + /// It is used when calling a popup for filtering or column setting + /// inside [PlutoGrid], and it is not a mode for users. + /// + /// If the user wants to run [PlutoGrid] as a popup, + /// use [PlutoGridPopup] or [PlutoGridDualGridPopup]. + /// {@endtemplate} + popup; + + bool get isNormal => this == PlutoGridMode.normal; + + bool get isReadOnly => this == PlutoGridMode.readOnly; + + bool get isEditableMode => isNormal || isPopup; + + bool get isSelectMode => isSingleSelectMode || isMultiSelectMode; + + bool get isSingleSelectMode => isSelect || isSelectWithOneTap; + + bool get isMultiSelectMode => isMultiSelect; + + bool get isSelect => this == PlutoGridMode.select; + + bool get isSelectWithOneTap => this == PlutoGridMode.selectWithOneTap; + + bool get isMultiSelect => this == PlutoGridMode.multiSelect; + + bool get isPopup => this == PlutoGridMode.popup; +} + +/// When calling loading screen with [PlutoGridStateManager.setShowLoading] method +/// Determines the level of loading. +/// +/// {@template pluto_grid_loading_level_grid} +/// [grid] makes the entire grid opaque and puts the loading indicator in the center. +/// The user is in a state where no interaction is possible. +/// {@endtemplate} +/// +/// {@template pluto_grid_loading_level_rows} +/// [rows] represents the [LinearProgressIndicator] at the top of the widget area +/// that displays the rows. +/// User can interact. +/// {@endtemplate} +/// +/// {@template pluto_grid_loading_level_rowsBottomCircular} +/// [rowsBottomCircular] represents the [CircularProgressIndicator] at the bottom of the widget +/// that displays the rows. +/// User can interact. +/// {@endtemplate} +enum PlutoGridLoadingLevel { + /// {@macro pluto_grid_loading_level_grid} + grid, + + /// {@macro pluto_grid_loading_level_rows} + rows, + + /// {@macro pluto_grid_loading_level_rowsBottomCircular} + rowsBottomCircular; + + bool get isGrid => this == PlutoGridLoadingLevel.grid; + + bool get isRows => this == PlutoGridLoadingLevel.rows; + + bool get isRowsBottomCircular => + this == PlutoGridLoadingLevel.rowsBottomCircular; +} diff --git a/lib/src/pluto_grid_events.dart b/lib/src/pluto_grid_events.dart new file mode 100644 index 000000000..530ac71fb --- /dev/null +++ b/lib/src/pluto_grid_events.dart @@ -0,0 +1,216 @@ +import 'package:flutter/material.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; + +/// [PlutoGrid.onLoaded] Argument received by registering callback. +class PlutoGridOnLoadedEvent { + final PlutoGridStateManager stateManager; + + const PlutoGridOnLoadedEvent({ + required this.stateManager, + }); +} + +/// Event called when the value of [PlutoCell] is changed. +/// +/// Notice. +/// [columnIdx], [rowIdx] are the values in the current screen state. +/// Values in their current state, not actual data values +/// with filtering, sorting, or pagination applied. +/// This value is from +/// [PlutoGridStateManager.columns] and [PlutoGridStateManager.rows]. +/// +/// All data is in +/// [PlutoGridStateManager.refColumns.originalList] +/// [PlutoGridStateManager.refRows.originalList] +class PlutoGridOnChangedEvent { + final int columnIdx; + final PlutoColumn column; + final int rowIdx; + final PlutoRow row; + final dynamic value; + final dynamic oldValue; + + const PlutoGridOnChangedEvent({ + required this.columnIdx, + required this.column, + required this.rowIdx, + required this.row, + this.value, + this.oldValue, + }); + + @override + String toString() { + String out = '[PlutoOnChangedEvent] '; + out += 'ColumnIndex : $columnIdx, RowIndex : $rowIdx\n'; + out += '::: oldValue : $oldValue\n'; + out += '::: newValue : $value'; + return out; + } +} + +/// This is the argument value of the [PlutoGrid.onSelected] callback +/// that is called when the [PlutoGrid.mode] value is in select mode. +/// +/// If [row], [rowIdx], [cell] is [PlutoGridMode.select] or [PlutoGridMode.selectWithOneTap], +/// Information of the row selected with the tab or enter key. +/// If the Escape key is pressed, these values are null. +/// +/// [selectedRows] is valid only in case of [PlutoGridMode.multiSelect]. +/// If rows are selected by tab or keyboard, the selected rows are included. +/// If the Escape key is pressed, this value is null. +class PlutoGridOnSelectedEvent { + final PlutoRow? row; + final int? rowIdx; + final PlutoCell? cell; + final List? selectedRows; + + const PlutoGridOnSelectedEvent({ + this.row, + this.rowIdx, + this.cell, + this.selectedRows, + }); + + @override + String toString() { + return '[PlutoGridOnSelectedEvent] rowIdx: $rowIdx, selectedRows: ${selectedRows?.length}'; + } +} + +/// Argument of [PlutoGrid.onSorted] callback for receiving column sort change event. +class PlutoGridOnSortedEvent { + final PlutoColumn column; + + final PlutoColumnSort oldSort; + + const PlutoGridOnSortedEvent({ + required this.column, + required this.oldSort, + }); + + @override + String toString() { + return '[PlutoGridOnSortedEvent] ${column.title} (changed: ${column.sort}, old: $oldSort)'; + } +} + +/// Argument of [PlutoGrid.onRowChecked] callback to receive row checkbox event. +/// +/// [runtimeType] is [PlutoGridOnRowCheckedAllEvent] if [isAll] is true. +/// When [isAll] is true, it means the entire check button event of the column. +/// +/// [runtimeType] is [PlutoGridOnRowCheckedOneEvent] if [isRow] is true. +/// If [isRow] is true, it means the check button event of a specific row. +abstract class PlutoGridOnRowCheckedEvent { + bool get isAll => runtimeType == PlutoGridOnRowCheckedAllEvent; + + bool get isRow => runtimeType == PlutoGridOnRowCheckedOneEvent; + + final PlutoRow? row; + final int? rowIdx; + final bool? isChecked; + + const PlutoGridOnRowCheckedEvent({ + this.row, + this.rowIdx, + this.isChecked, + }); + + @override + String toString() { + String checkMessage = isAll ? 'All rows ' : 'RowIdx $rowIdx '; + checkMessage += isChecked == true ? 'checked' : 'unchecked'; + return '[PlutoGridOnRowCheckedEvent] $checkMessage'; + } +} + +/// Argument of [PlutoGrid.onRowChecked] callback when the checkbox of the row is tapped. +class PlutoGridOnRowCheckedOneEvent extends PlutoGridOnRowCheckedEvent { + const PlutoGridOnRowCheckedOneEvent({ + required PlutoRow super.row, + required int super.rowIdx, + required super.isChecked, + }); +} + +/// Argument of [PlutoGrid.onRowChecked] callback when all checkboxes of the column are tapped. +class PlutoGridOnRowCheckedAllEvent extends PlutoGridOnRowCheckedEvent { + const PlutoGridOnRowCheckedAllEvent({ + super.isChecked, + }) : super(row: null, rowIdx: null); +} + +/// The argument of the [PlutoGrid.onRowDoubleTap] callback +/// to receive the event of double-tapping the row. +class PlutoGridOnRowDoubleTapEvent { + final PlutoRow row; + final int rowIdx; + final PlutoCell cell; + + const PlutoGridOnRowDoubleTapEvent({ + required this.row, + required this.rowIdx, + required this.cell, + }); +} + +/// Argument of the [PlutoGrid.onRowSecondaryTap] callback +/// to receive the event of tapping the row with the right mouse button. +class PlutoGridOnRowSecondaryTapEvent { + final PlutoRow row; + final int rowIdx; + final PlutoCell cell; + final Offset offset; + + const PlutoGridOnRowSecondaryTapEvent({ + required this.row, + required this.rowIdx, + required this.cell, + required this.offset, + }); +} + +/// Argument of [PlutoGrid.onRowsMoved] callback +/// to receive the event of moving the row by dragging it. +class PlutoGridOnRowsMovedEvent { + final int idx; + final List rows; + + const PlutoGridOnRowsMovedEvent({ + required this.idx, + required this.rows, + }); +} + +/// Argument of [PlutoGrid.onColumnsMoved] callback +/// to move columns by dragging or receive left or right fixed events. +/// +/// [idx] means the actual index of +/// [PlutoGridStateManager.columns] or [PlutoGridStateManager.refColumns]. +/// +/// [visualIdx] means the order displayed on the screen, not the actual index. +/// For example, if there are 5 columns of [0, 1, 2, 3, 4] +/// If 1 column is frozen to the right, [visualIndex] becomes 4. +/// But the actual index is preserved. +class PlutoGridOnColumnsMovedEvent { + final int idx; + final int visualIdx; + final List columns; + + const PlutoGridOnColumnsMovedEvent({ + required this.idx, + required this.visualIdx, + required this.columns, + }); + + @override + String toString() { + String text = + '[PlutoGridOnColumnsMovedEvent] idx: $idx, visualIdx: $visualIdx\n'; + + text += columns.map((e) => e.title).join(','); + + return text; + } +} diff --git a/lib/src/pluto_grid_settings.dart b/lib/src/pluto_grid_settings.dart new file mode 100644 index 000000000..9c9495399 --- /dev/null +++ b/lib/src/pluto_grid_settings.dart @@ -0,0 +1,58 @@ +import 'package:flutter/material.dart'; + +abstract class PlutoGridSettings { + /// If there is a frozen column, the minimum width of the body + /// (if it is less than the value, the frozen column is released) + static const double bodyMinWidth = 200.0; + + /// Default column width + static const double columnWidth = 200.0; + + /// Column width + static const double minColumnWidth = 80.0; + + /// Frozen column division line (ShadowLine) size + static const double shadowLineSize = 3.0; + + /// Sum of frozen column division line width + static const double totalShadowLineWidth = + PlutoGridSettings.shadowLineSize * 2; + + /// Grid - padding + static const double gridPadding = 2.0; + + /// Grid - border width + static const double gridBorderWidth = 1.0; + + static const double gridInnerSpacing = + (gridPadding * 2) + (gridBorderWidth * 2); + + /// Row - Default row height + static const double rowHeight = 45.0; + + /// Row - border width + static const double rowBorderWidth = 1.0; + + /// Row - total height + static const double rowTotalHeight = rowHeight + rowBorderWidth; + + /// Cell - padding + static const EdgeInsets cellPadding = EdgeInsets.symmetric(horizontal: 10); + + /// Column title - padding + static const EdgeInsets columnTitlePadding = + EdgeInsets.symmetric(horizontal: 10); + + static const EdgeInsets columnFilterPadding = EdgeInsets.all(5); + + /// Cell - fontSize + static const double cellFontSize = 14; + + /// Scroll when multi-selection is as close as that value from the edge + static const double offsetScrollingFromEdge = 10.0; + + /// Size that scrolls from the edge at once when selecting multiple + static const double offsetScrollingFromEdgeAtOnce = 200.0; + + static const int debounceMillisecondsForColumnFilter = 300; +} From 6be47e9141904993d74e5782fc33e8b1e7ca93d4 Mon Sep 17 00:00:00 2001 From: "ciocca@gmail.com" Date: Tue, 5 Mar 2024 19:13:17 -0300 Subject: [PATCH 25/80] 20240305 --- lib/src/model/pluto_column.dart | 7 +++++++ lib/src/pluto_grid_popup.dart | 4 ++++ lib/src/ui/cells/pluto_default_cell.dart | 10 +++++++++- lib/src/ui/columns/pluto_column_title.dart | 13 +++++++++---- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/lib/src/model/pluto_column.dart b/lib/src/model/pluto_column.dart index d8145c7f0..2f38833f6 100644 --- a/lib/src/model/pluto_column.dart +++ b/lib/src/model/pluto_column.dart @@ -147,6 +147,8 @@ class PlutoColumn { /// A checkbox appears in the cell of the column. bool enableRowChecked; + int rowCheckBoxGroupDepth; + bool enableTitleChecked; /// Sort rows by tapping on the column heading. bool enableSorting; @@ -204,6 +206,8 @@ class PlutoColumn { /// Hide the column. bool hide; + LinearGradient? backgroundGradient; + PlutoColumn({ required this.title, required this.field, @@ -229,6 +233,8 @@ class PlutoColumn { this.enableColumnDrag = true, this.enableRowDrag = false, this.enableRowChecked = false, + this.rowCheckBoxGroupDepth = 0, + this.enableTitleChecked = true, this.enableSorting = true, this.enableContextMenu = true, this.enableDropToResize = true, @@ -242,6 +248,7 @@ class PlutoColumn { this.enableAutoEditing = false, this.enableEditingMode = true, this.hide = false, + this.backgroundGradient, }) : _key = UniqueKey(), _checkReadOnly = checkReadOnly; diff --git a/lib/src/pluto_grid_popup.dart b/lib/src/pluto_grid_popup.dart index 2666e5687..b7c17064a 100644 --- a/lib/src/pluto_grid_popup.dart +++ b/lib/src/pluto_grid_popup.dart @@ -75,6 +75,8 @@ class PlutoGridPopup { final double? height; + final bool? barrierDismissible; + PlutoGridPopup({ required this.context, required this.columns, @@ -98,6 +100,7 @@ class PlutoGridPopup { this.mode = PlutoGridMode.normal, this.width, this.height, + this.barrierDismissible, }) { open(); } @@ -121,6 +124,7 @@ class PlutoGridPopup { PlutoGridOnSelectedEvent? selected = await showDialog( context: context, + barrierDismissible: barrierDismissible ?? true, builder: (BuildContext ctx) { return Dialog( shape: borderRadius == BorderRadius.zero diff --git a/lib/src/ui/cells/pluto_default_cell.dart b/lib/src/ui/cells/pluto_default_cell.dart index 515568351..9dc562d92 100644 --- a/lib/src/ui/cells/pluto_default_cell.dart +++ b/lib/src/ui/cells/pluto_default_cell.dart @@ -129,6 +129,12 @@ class _PlutoDefaultCellState extends PlutoStateWithChange { @override Widget build(BuildContext context) { + int depth = 0; + PlutoRow? row = widget.row; + while (row?.parent != null) { + depth++; + row = row?.parent; + } final cellWidget = _DefaultCellWidget( stateManager: stateManager, rowIdx: widget.rowIdx, @@ -153,6 +159,7 @@ class _PlutoDefaultCellState extends PlutoStateWithChange { if (PlutoDefaultCell.canExpand( stateManager.rowGroupDelegate, widget.cell)) { expandIcon = IconButton( + padding: const EdgeInsets.only(bottom: 0.0), onPressed: _isEmptyGroup ? null : _handleToggleExpandedRowGroup, icon: _isEmptyGroup ? Icon( @@ -188,7 +195,8 @@ class _PlutoDefaultCellState extends PlutoStateWithChange { color: style.iconColor, ), ), - if (widget.column.enableRowChecked) + if (widget.column.enableRowChecked && + depth >= widget.column.rowCheckBoxGroupDepth) CheckboxSelectionWidget( column: widget.column, row: widget.row, diff --git a/lib/src/ui/columns/pluto_column_title.dart b/lib/src/ui/columns/pluto_column_title.dart index a8b5d9a78..0f9e1bf10 100644 --- a/lib/src/ui/columns/pluto_column_title.dart +++ b/lib/src/ui/columns/pluto_column_title.dart @@ -377,9 +377,12 @@ class _ColumnWidget extends StatelessWidget { height: height, child: DecoratedBox( decoration: BoxDecoration( - color: noDragTarget - ? column.backgroundColor - : style.dragTargetColumnColor, + gradient: column.backgroundGradient, + color: column.backgroundGradient == null + ? (noDragTarget + ? column.backgroundColor + : style.dragTargetColumnColor) + : null, border: BorderDirectional( end: style.enableColumnBorderVertical ? BorderSide(color: style.borderColor, width: 1.0) @@ -392,7 +395,9 @@ class _ColumnWidget extends StatelessWidget { alignment: Alignment.centerLeft, child: Row( children: [ - if (column.enableRowChecked) + if (column.enableRowChecked && + column.rowCheckBoxGroupDepth == 0 && + column.enableTitleChecked) CheckboxAllSelectionWidget(stateManager: stateManager), Expanded( child: _ColumnTextWidget( From 8aee2f581444342d145e15bd9c991f39e9d351ef Mon Sep 17 00:00:00 2001 From: doonfrs Date: Tue, 19 Mar 2024 00:16:09 +0300 Subject: [PATCH 26/80] upgrade to latest packages --- CHANGELOG.md | 3 +++ demo/pubspec.yaml | 6 ++---- packages/pluto_grid_plus_export/example/lib/main.dart | 3 ++- packages/pluto_grid_plus_export/example/pubspec.yaml | 7 +++---- packages/pluto_grid_plus_export/pubspec.yaml | 2 +- pubspec.yaml | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3c93ca43..b02d8e3f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [8.3.1] - 2024. 03. 19 +* upgrade packages to latest major version + ## [8.3.0] - 2024. 02. 18 * Change pluto_grid_export to pluto_grid_plus_export as the old version is not maintained. * fix & enhance the example for csv export. diff --git a/demo/pubspec.yaml b/demo/pubspec.yaml index b43887cd5..482aafb28 100644 --- a/demo/pubspec.yaml +++ b/demo/pubspec.yaml @@ -23,16 +23,14 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: - path: ../ + pluto_grid_plus: 8.3.1 faker: ^2.1.0 url_launcher: ^6.2.1 font_awesome_flutter: ^10.6.0 rainbow_color: ^2.0.1 pluto_menu_bar: ^3.0.1 file_saver: ^0.2.10 - pluto_grid_plus_export: - path: ../packages/pluto_grid_plus_export + pluto_grid_plus_export: 1.0.4 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.6 diff --git a/packages/pluto_grid_plus_export/example/lib/main.dart b/packages/pluto_grid_plus_export/example/lib/main.dart index 4be09a222..a4806fe6d 100644 --- a/packages/pluto_grid_plus_export/example/lib/main.dart +++ b/packages/pluto_grid_plus_export/example/lib/main.dart @@ -110,7 +110,8 @@ class _MyHomePageState extends State { .convert(pluto_grid_export.PlutoGridExport.exportCSV(stateManager)); // use file_saver from pub.dev - await FileSaver.instance.saveFile("$title.csv", exported, ".csv"); + await FileSaver.instance + .saveFile(name: "$title.csv", bytes: exported, ext: ".csv"); } @override diff --git a/packages/pluto_grid_plus_export/example/pubspec.yaml b/packages/pluto_grid_plus_export/example/pubspec.yaml index 695196581..4a3dfc9ba 100644 --- a/packages/pluto_grid_plus_export/example/pubspec.yaml +++ b/packages/pluto_grid_plus_export/example/pubspec.yaml @@ -29,11 +29,10 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: - path: ../../../ + pluto_grid_plus: 8.3.1 pluto_grid_plus_export: path: ../ - file_saver: ^0.1.0 + file_saver: ^0.2.12 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. @@ -48,7 +47,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^2.0.0 + flutter_lints: ^3.0.1 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/pluto_grid_plus_export/pubspec.yaml b/packages/pluto_grid_plus_export/pubspec.yaml index e808b53d5..4e3450575 100644 --- a/packages/pluto_grid_plus_export/pubspec.yaml +++ b/packages/pluto_grid_plus_export/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter pluto_grid_plus: ^8.3.0 - csv: ^5.1.1 + csv: ^6.0.0 pdf: ^3.10.7 printing: ^5.11.1 diff --git a/pubspec.yaml b/pubspec.yaml index 7aad5a14d..d07b3e98f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: sdk: flutter # Follows the intl version included in Flutter. # https://github.com/flutter/flutter/blob/84a1e904f44f9b0e9c4510138010edcc653163f8/packages/flutter_localizations/pubspec.yaml#L11 - intl: ^0.18.0 + intl: ^0.19.0 rxdart: ^0.27.7 collection: ^1.18.0 From 73335e8efd2729c5093395501e02f0490f1bf115 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Tue, 19 Mar 2024 00:30:37 +0300 Subject: [PATCH 27/80] rollback intl to 18 as 19 still not supported by flutter stable --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index d07b3e98f..85b4fadd0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: sdk: flutter # Follows the intl version included in Flutter. # https://github.com/flutter/flutter/blob/84a1e904f44f9b0e9c4510138010edcc653163f8/packages/flutter_localizations/pubspec.yaml#L11 - intl: ^0.19.0 + intl: ^0.18.1 rxdart: ^0.27.7 collection: ^1.18.0 From a13b1cf785b92260e8e232dc800ceea057fbcac3 Mon Sep 17 00:00:00 2001 From: Macacoazul01 Date: Sat, 23 Mar 2024 12:19:21 -0300 Subject: [PATCH 28/80] added gridPadding and gridBorderWidth to configs --- lib/src/manager/state/layout_state.dart | 26 +++++++++----- lib/src/manager/state/selecting_state.dart | 2 +- .../state/visibility_layout_state.dart | 4 +-- lib/src/pluto_grid.dart | 34 ++++++++++--------- lib/src/pluto_grid_configuration.dart | 20 ++++++++++- lib/src/ui/cells/pluto_select_cell.dart | 2 +- test/src/manager/state/layout_state_test.dart | 8 ++--- 7 files changed, 63 insertions(+), 33 deletions(-) diff --git a/lib/src/manager/state/layout_state.dart b/lib/src/manager/state/layout_state.dart index 9ac870daa..339dd710a 100644 --- a/lib/src/manager/state/layout_state.dart +++ b/lib/src/manager/state/layout_state.dart @@ -95,6 +95,10 @@ abstract class ILayoutState { bool get isRTL; + double get gridPadding; + + double get gridBorderWidth; + /// Update screen size information when LayoutBuilder builds. void setLayout(BoxConstraints size); @@ -299,12 +303,18 @@ mixin LayoutState implements IPlutoGridState { @override double get rowTotalHeight => rowHeight + PlutoGridSettings.rowBorderWidth; + @override + double get gridPadding => configuration.style.gridPadding; + + @override + double get gridBorderWidth => configuration.style.gridBorderWidth; + @override double get bodyTopOffset => gridGlobalOffset!.dy + - PlutoGridSettings.gridPadding + + gridPadding + headerHeight + - PlutoGridSettings.gridBorderWidth + + gridBorderWidth + columnGroupHeight + columnHeight + columnFilterHeight; @@ -312,22 +322,22 @@ mixin LayoutState implements IPlutoGridState { @override double get bodyLeftOffset { return (showFrozenColumn && leftFrozenColumnsWidth > 0) - ? leftFrozenColumnsWidth + PlutoGridSettings.gridBorderWidth + ? leftFrozenColumnsWidth + gridBorderWidth : 0; } @override double get bodyRightOffset { return (showFrozenColumn && rightFrozenColumnsWidth > 0) - ? rightFrozenColumnsWidth + PlutoGridSettings.gridBorderWidth + ? rightFrozenColumnsWidth + gridBorderWidth : 0; } @override double get bodyLeftScrollOffset { return gridGlobalOffset!.dx + - PlutoGridSettings.gridPadding + - PlutoGridSettings.gridBorderWidth + + gridPadding + + gridBorderWidth + PlutoGridSettings.offsetScrollingFromEdge; } @@ -377,9 +387,9 @@ mixin LayoutState implements IPlutoGridState { if (showFrozenColumn) { offset += - leftFrozenColumnsWidth > 0 ? PlutoGridSettings.gridBorderWidth : 0; + leftFrozenColumnsWidth > 0 ? gridBorderWidth: 0; offset += - rightFrozenColumnsWidth > 0 ? PlutoGridSettings.gridBorderWidth : 0; + rightFrozenColumnsWidth > 0 ? gridBorderWidth : 0; } return offset; diff --git a/lib/src/manager/state/selecting_state.dart b/lib/src/manager/state/selecting_state.dart index 1bd7de409..dfcd95971 100644 --- a/lib/src/manager/state/selecting_state.dart +++ b/lib/src/manager/state/selecting_state.dart @@ -289,7 +289,7 @@ mixin SelectingState implements IPlutoGridState { } final double gridBodyOffsetDy = gridGlobalOffset!.dy + - PlutoGridSettings.gridBorderWidth + + gridBorderWidth + headerHeight + columnGroupHeight + columnHeight + diff --git a/lib/src/manager/state/visibility_layout_state.dart b/lib/src/manager/state/visibility_layout_state.dart index 1738f6c66..3c132957c 100644 --- a/lib/src/manager/state/visibility_layout_state.dart +++ b/lib/src/manager/state/visibility_layout_state.dart @@ -36,11 +36,11 @@ mixin VisibilityLayoutState implements IPlutoGridState { if (showFrozenColumn) { if (hasLeftFrozenColumns) { - offset += PlutoGridSettings.gridBorderWidth; + offset += gridBorderWidth; } if (hasRightFrozenColumns) { - offset += PlutoGridSettings.gridBorderWidth; + offset += gridBorderWidth; } } diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index 23c816bef..266cd6d83 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -822,11 +822,13 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { columnsTopOffset += s.height; } + final gridBorderWidth = _stateManager.configuration.style.gridBorderWidth; + if (hasChild(_StackName.headerDivider)) { layoutChild( _StackName.headerDivider, BoxConstraints.tight( - Size(size.width, PlutoGridSettings.gridBorderWidth), + Size(size.width, gridBorderWidth), ), ); @@ -857,7 +859,7 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { layoutChild( _StackName.footerDivider, BoxConstraints.tight( - Size(size.width, PlutoGridSettings.gridBorderWidth), + Size(size.width, gridBorderWidth), ), ); @@ -893,7 +895,7 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { _StackName.leftFrozenDivider, BoxConstraints.tight( Size( - PlutoGridSettings.gridBorderWidth, + gridBorderWidth, _safe(size.height - columnsTopOffset - bodyRowsBottomOffset), ), ), @@ -901,7 +903,7 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { final double posX = isLTR ? bodyLeftOffset - : size.width - bodyRightOffset - PlutoGridSettings.gridBorderWidth; + : size.width - bodyRightOffset - gridBorderWidth; positionChild( _StackName.leftFrozenDivider, @@ -922,7 +924,7 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { ); final double posX = - isLTR ? size.width - s.width + PlutoGridSettings.gridBorderWidth : 0; + isLTR ? size.width - s.width + gridBorderWidth : 0; positionChild( _StackName.rightFrozenColumns, @@ -941,14 +943,14 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { _StackName.rightFrozenDivider, BoxConstraints.tight( Size( - PlutoGridSettings.gridBorderWidth, + gridBorderWidth, _safe(size.height - columnsTopOffset - bodyRowsBottomOffset), ), ), ); final double posX = isLTR - ? size.width - bodyRightOffset - PlutoGridSettings.gridBorderWidth + ? size.width - bodyRightOffset - gridBorderWidth : bodyLeftOffset; positionChild( @@ -1013,7 +1015,7 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { var s = layoutChild( _StackName.columnFooterDivider, BoxConstraints.tight( - Size(size.width, PlutoGridSettings.gridBorderWidth), + Size(size.width, gridBorderWidth), ), ); @@ -1028,7 +1030,7 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { var s = layoutChild( _StackName.columnRowDivider, BoxConstraints.tight( - Size(size.width, PlutoGridSettings.gridBorderWidth), + Size(size.width, gridBorderWidth), ), ); @@ -1039,14 +1041,14 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { bodyRowsTopOffset += s.height; } else { - bodyRowsTopOffset += PlutoGridSettings.gridBorderWidth; + bodyRowsTopOffset += gridBorderWidth; } if (hasChild(_StackName.leftFrozenRows)) { final double offset = isLTR ? bodyLeftOffset : bodyRightOffset; final double posX = isLTR ? 0 - : size.width - bodyRightOffset + PlutoGridSettings.gridBorderWidth; + : size.width - bodyRightOffset + gridBorderWidth; layoutChild( _StackName.leftFrozenRows, @@ -1068,7 +1070,7 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { final double offset = isLTR ? bodyLeftOffset : bodyRightOffset; final double posX = isLTR ? 0 - : size.width - bodyRightOffset + PlutoGridSettings.gridBorderWidth; + : size.width - bodyRightOffset + gridBorderWidth; layoutChild( _StackName.leftFrozenColumnFooters, @@ -1086,7 +1088,7 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { if (hasChild(_StackName.rightFrozenRows)) { final double offset = isLTR ? bodyRightOffset : bodyLeftOffset; final double posX = isLTR - ? size.width - bodyRightOffset + PlutoGridSettings.gridBorderWidth + ? size.width - bodyRightOffset + gridBorderWidth : 0; layoutChild( @@ -1113,7 +1115,7 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { ); final double posX = - isLTR ? size.width - s.width + PlutoGridSettings.gridBorderWidth : 0; + isLTR ? size.width - s.width + gridBorderWidth : 0; positionChild( _StackName.rightFrozenColumnFooters, @@ -1225,11 +1227,11 @@ class _GridContainer extends StatelessWidget { borderRadius: style.gridBorderRadius, border: Border.all( color: style.gridBorderColor, - width: PlutoGridSettings.gridBorderWidth, + width: style.gridBorderWidth, ), ), child: Padding( - padding: const EdgeInsets.all(PlutoGridSettings.gridPadding), + padding: EdgeInsets.all(style.gridPadding), child: borderRadius == BorderRadius.zero ? child : ClipRRect(borderRadius: borderRadius, child: child), diff --git a/lib/src/pluto_grid_configuration.dart b/lib/src/pluto_grid_configuration.dart index 08f39403a..2fdead0ea 100644 --- a/lib/src/pluto_grid_configuration.dart +++ b/lib/src/pluto_grid_configuration.dart @@ -251,6 +251,8 @@ class PlutoGridStyleConfig { this.rowGroupEmptyIcon = Icons.noise_control_off, this.gridBorderRadius = BorderRadius.zero, this.gridPopupBorderRadius = BorderRadius.zero, + this.gridPadding = PlutoGridSettings.gridPadding, + this.gridBorderWidth = PlutoGridSettings.gridBorderWidth, this.filterHeaderColor, this.filterHeaderIconColor, }) : columnCheckedColor = (columnCheckedColor ?? activatedColor), @@ -320,6 +322,8 @@ class PlutoGridStyleConfig { this.rowGroupEmptyIcon = Icons.noise_control_off, this.gridBorderRadius = BorderRadius.zero, this.gridPopupBorderRadius = BorderRadius.zero, + this.gridPadding = PlutoGridSettings.gridPadding, + this.gridBorderWidth = PlutoGridSettings.gridBorderWidth, this.filterHeaderColor, this.filterHeaderIconColor, }) : columnCheckedColor = (columnCheckedColor ?? activatedColor), @@ -492,6 +496,12 @@ class PlutoGridStyleConfig { /// Apply border radius to popup opened inside [PlutoGrid]. final BorderRadiusGeometry gridPopupBorderRadius; + /// Defaults to [PlutoGridSettings.gridPadding] + final double gridPadding; + + /// Defaults to [PlutoGridSettings.gridBorderWidth] + final double gridBorderWidth; + /// Set color of filter popup header final Color? filterHeaderColor; @@ -545,6 +555,8 @@ class PlutoGridStyleConfig { IconData? rowGroupEmptyIcon, BorderRadiusGeometry? gridBorderRadius, BorderRadiusGeometry? gridPopupBorderRadius, + double? gridPadding, + double? gridBorderWidth, }) { return PlutoGridStyleConfig( enableGridBorderShadow: @@ -613,6 +625,8 @@ class PlutoGridStyleConfig { gridBorderRadius: gridBorderRadius ?? this.gridBorderRadius, gridPopupBorderRadius: gridPopupBorderRadius ?? this.gridPopupBorderRadius, + gridPadding: gridPadding ?? this.gridPadding, + gridBorderWidth: gridBorderWidth ?? this.gridBorderWidth, filterHeaderColor: filterHeaderColor ?? filterHeaderColor, filterHeaderIconColor: filterHeaderIconColor ?? filterHeaderIconColor); } @@ -668,7 +682,9 @@ class PlutoGridStyleConfig { rowGroupCollapsedIcon == other.rowGroupCollapsedIcon && rowGroupEmptyIcon == other.rowGroupEmptyIcon && gridBorderRadius == other.gridBorderRadius && - gridPopupBorderRadius == other.gridPopupBorderRadius; + gridPopupBorderRadius == other.gridPopupBorderRadius && + gridPadding == other.gridPadding && + gridBorderWidth == other.gridBorderWidth; } @override @@ -719,6 +735,8 @@ class PlutoGridStyleConfig { rowGroupEmptyIcon, gridBorderRadius, gridPopupBorderRadius, + gridPadding, + gridBorderWidth, ]); } diff --git a/lib/src/ui/cells/pluto_select_cell.dart b/lib/src/ui/cells/pluto_select_cell.dart index d13c2acbf..c31e454ac 100644 --- a/lib/src/ui/cells/pluto_select_cell.dart +++ b/lib/src/ui/cells/pluto_select_cell.dart @@ -58,7 +58,7 @@ class PlutoSelectCellState extends State columnFilterHeight + rowsHeight + PlutoGridSettings.gridInnerSpacing + - PlutoGridSettings.gridBorderWidth; + widget.stateManager.configuration.style.gridBorderWidth; fieldOnSelected = widget.column.title; diff --git a/test/src/manager/state/layout_state_test.dart b/test/src/manager/state/layout_state_test.dart index da3da3f31..8f27b3e26 100644 --- a/test/src/manager/state/layout_state_test.dart +++ b/test/src/manager/state/layout_state_test.dart @@ -91,8 +91,8 @@ void main() { expect( stateManager.bodyLeftScrollOffset, stateManager.gridGlobalOffset!.dx + - PlutoGridSettings.gridPadding + - PlutoGridSettings.gridBorderWidth + + stateManager.configuration.style.gridPadding + + stateManager.configuration.style.gridBorderWidth + PlutoGridSettings.offsetScrollingFromEdge, ); }, @@ -140,8 +140,8 @@ void main() { expect( stateManager.bodyLeftScrollOffset, stateManager.gridGlobalOffset!.dx + - PlutoGridSettings.gridPadding + - PlutoGridSettings.gridBorderWidth + + stateManager.configuration.style.gridPadding + + stateManager.configuration.style.gridBorderWidth + PlutoGridSettings.offsetScrollingFromEdge, ); }, From 9648238355bbd24a29859c4d087179827f9d8e01 Mon Sep 17 00:00:00 2001 From: Macacoazul01 Date: Sat, 23 Mar 2024 12:22:55 -0300 Subject: [PATCH 29/80] 8.3.1 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 85b4fadd0..547eb617d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pluto_grid_plus description: PlutoGrid plus is a maintained version of PlutoGrid, PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS. (DataGrid, DataTable, Data Grid, Data Table, Sticky) -version: 8.3.0 +version: 8.3.1 homepage: https://pluto.weblaze.dev repository: https://github.com/doonfrs/pluto_grid_plus From 6ad30a99e8e5772f1307ac10c41dd06985c7b6c1 Mon Sep 17 00:00:00 2001 From: coruscant187 Date: Mon, 1 Apr 2024 17:18:47 +0200 Subject: [PATCH 30/80] feat(doonfrs/pluto_grid_plus#29): Support for hovering rows added: - added MouseRegion to pluto_base_cell.dart to achieve hovering logic - added onRowEnter, onRowExit callback methods for PlutoGrid - added isHovered variable to _getRowColor in pluto_base_row.dart to change background color based on configuration - added rowHoveredColor to configuration --- demo/lib/screen/development_screen.dart | 8 ++ .../event/pluto_grid_cell_gesture_event.dart | 34 ++++++- .../manager/pluto_change_notifier_filter.dart | 5 ++ lib/src/manager/pluto_grid_state_manager.dart | 17 +++- lib/src/manager/state/grid_state.dart | 4 + lib/src/manager/state/hovering_state.dart | 69 ++++++++++++++ lib/src/pluto_grid.dart | 20 +++++ lib/src/pluto_grid_configuration.dart | 5 ++ lib/src/pluto_grid_events.dart | 28 ++++++ lib/src/ui/pluto_base_cell.dart | 90 ++++++++++++++----- lib/src/ui/pluto_base_row.dart | 8 ++ 11 files changed, 263 insertions(+), 25 deletions(-) create mode 100644 lib/src/manager/state/hovering_state.dart diff --git a/demo/lib/screen/development_screen.dart b/demo/lib/screen/development_screen.dart index a2e1782fb..fa2ed7ae0 100644 --- a/demo/lib/screen/development_screen.dart +++ b/demo/lib/screen/development_screen.dart @@ -312,6 +312,14 @@ class _DevelopmentScreenState extends State { // print('Secondary click A Row.(${e.offset})'); // print(e.row?.cells['column1']?.value); // }, + // onRowEnter: (e) { + // print('Enter A Row.'); + // print(e.row?.cells['column1']?.value); + // }, + // onRowExit: (e) { + // print('Exit A Row.'); + // print(e.row?.cells['column1']?.value); + // }, createHeader: (PlutoGridStateManager stateManager) { // stateManager.headerHeight = 200; return _Header( diff --git a/lib/src/manager/event/pluto_grid_cell_gesture_event.dart b/lib/src/manager/event/pluto_grid_cell_gesture_event.dart index 10b23f1f1..7fc3fe305 100644 --- a/lib/src/manager/event/pluto_grid_cell_gesture_event.dart +++ b/lib/src/manager/event/pluto_grid_cell_gesture_event.dart @@ -38,6 +38,12 @@ class PlutoGridCellGestureEvent extends PlutoGridEvent { case PlutoGridGestureType.onSecondaryTap: _onSecondaryTap(stateManager); break; + case PlutoGridGestureType.onEnter: + _onEnter(stateManager); + break; + case PlutoGridGestureType.onExit: + _onExit(stateManager); + break; default: } } @@ -116,6 +122,26 @@ class PlutoGridCellGestureEvent extends PlutoGridEvent { ); } + void _onEnter(PlutoGridStateManager stateManager) { + stateManager.onRowEnter!( + PlutoGridOnRowEnterEvent( + row: stateManager.getRowByIdx(rowIdx), + rowIdx: rowIdx, + cell: cell, + ), + ); + } + + void _onExit(PlutoGridStateManager stateManager) { + stateManager.onRowExit!( + PlutoGridOnRowExitEvent( + row: stateManager.getRowByIdx(rowIdx), + rowIdx: rowIdx, + cell: cell, + ), + ); + } + bool _setKeepFocusAndCurrentCell(PlutoGridStateManager stateManager) { if (stateManager.hasFocus) { return false; @@ -190,7 +216,9 @@ enum PlutoGridGestureType { onLongPressMoveUpdate, onLongPressEnd, onDoubleTap, - onSecondaryTap; + onSecondaryTap, + onEnter, + onExit; bool get isOnTapUp => this == PlutoGridGestureType.onTapUp; @@ -204,4 +232,8 @@ enum PlutoGridGestureType { bool get isOnDoubleTap => this == PlutoGridGestureType.onDoubleTap; bool get isOnSecondaryTap => this == PlutoGridGestureType.onSecondaryTap; + + bool get isOnEnter => this == PlutoGridGestureType.onEnter; + + bool get isOnExit => this == PlutoGridGestureType.onExit; } diff --git a/lib/src/manager/pluto_change_notifier_filter.dart b/lib/src/manager/pluto_change_notifier_filter.dart index 81bb50c06..4c6dbb192 100644 --- a/lib/src/manager/pluto_change_notifier_filter.dart +++ b/lib/src/manager/pluto_change_notifier_filter.dart @@ -145,6 +145,11 @@ abstract class PlutoChangeNotifierFilterResolver { stateManager.clearCurrentSelecting.hashCode: 'clearCurrentSelecting', stateManager.toggleSelectingRow.hashCode: 'toggleSelectingRow', stateManager.handleAfterSelectingRow.hashCode: 'handleAfterSelectingRow', + + /// hovering_state + stateManager.setIsHoveringRow.hashCode: 'setIsHoveringRow', + stateManager.setHoveredRowIdx.hashCode: 'setHoveredRowIdx', + stateManager.isRowIdxHovered.hashCode: 'isRowIdxHovered', }; } } diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index 20df94c7c..22ced5859 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -23,6 +23,7 @@ import 'state/row_state.dart'; import 'state/scroll_state.dart'; import 'state/selecting_state.dart'; import 'state/visibility_layout_state.dart'; +import 'state/hovering_state.dart'; abstract class IPlutoGridState implements @@ -43,7 +44,8 @@ abstract class IPlutoGridState IRowState, IScrollState, ISelectingState, - IVisibilityLayoutState {} + IVisibilityLayoutState, + IHoveringState {} class PlutoGridStateChangeNotifier extends PlutoChangeNotifier with @@ -63,7 +65,8 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier RowState, ScrollState, SelectingState, - VisibilityLayoutState { + VisibilityLayoutState, + HoveringState { PlutoGridStateChangeNotifier({ required List columns, required List rows, @@ -76,6 +79,8 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier this.onRowChecked, this.onRowDoubleTap, this.onRowSecondaryTap, + this.onRowEnter, + this.onRowExit, this.onRowsMoved, this.onColumnsMoved, this.rowColorCallback, @@ -133,6 +138,12 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier @override final PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap; + @override + final PlutoOnRowEnterEventCallback? onRowEnter; + + @override + final PlutoOnRowExitEventCallback? onRowExit; + @override final PlutoOnRowsMovedEventCallback? onRowsMoved; @@ -220,6 +231,8 @@ class PlutoGridStateManager extends PlutoGridStateChangeNotifier { super.onRowChecked, super.onRowDoubleTap, super.onRowSecondaryTap, + super.onRowEnter, + super.onRowExit, super.onRowsMoved, super.onColumnsMoved, super.rowColorCallback, diff --git a/lib/src/manager/state/grid_state.dart b/lib/src/manager/state/grid_state.dart index fb32e145b..8e7ae75dc 100644 --- a/lib/src/manager/state/grid_state.dart +++ b/lib/src/manager/state/grid_state.dart @@ -24,6 +24,10 @@ abstract class IGridState { PlutoOnRowSecondaryTapEventCallback? get onRowSecondaryTap; + PlutoOnRowEnterEventCallback? get onRowEnter; + + PlutoOnRowExitEventCallback? get onRowExit; + PlutoOnRowsMovedEventCallback? get onRowsMoved; PlutoOnColumnsMovedEventCallback? get onColumnsMoved; diff --git a/lib/src/manager/state/hovering_state.dart b/lib/src/manager/state/hovering_state.dart new file mode 100644 index 000000000..59c5478c4 --- /dev/null +++ b/lib/src/manager/state/hovering_state.dart @@ -0,0 +1,69 @@ +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; + +abstract class IHoveringState { + + bool get isHoveringRow; + + int? get hoveredRowIdx; + + void setIsHoveringRow( + bool flag, + {bool notify = true} + ); + + void setHoveredRowIdx( + int rowIdx, + {bool notify = true} + ); + + bool isRowIdxHovered(int rowIdx); +} + +class _State { + bool _isHoveringRow = false; + + int? _hoverRowIdx; +} + +mixin HoveringState implements IPlutoGridState { + final _State _state = _State(); + + @override + bool get isHoveringRow => _state._isHoveringRow; + + @override + int? get hoveredRowIdx => _state._hoverRowIdx; + + @override + void setIsHoveringRow( + bool flag, + {bool notify = true,} + ) { + if (isHoveringRow == flag) { + return; + } + + _state._isHoveringRow = flag; + + notifyListeners(notify, setIsHoveringRow.hashCode); + } + + @override + void setHoveredRowIdx( + int? rowIdx, + {bool notify = true,} + ) { + if (hoveredRowIdx == rowIdx) { + return; + } + + _state._hoverRowIdx = rowIdx; + + notifyListeners(notify, setHoveredRowIdx.hashCode); + } + + @override + bool isRowIdxHovered(int? rowIdx) { + return rowIdx != null && hoveredRowIdx != null; + } +} diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index 266cd6d83..7dad6223a 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -30,6 +30,12 @@ typedef PlutoOnRowDoubleTapEventCallback = void Function( typedef PlutoOnRowSecondaryTapEventCallback = void Function( PlutoGridOnRowSecondaryTapEvent event); +typedef PlutoOnRowEnterEventCallback = void Function( + PlutoGridOnRowEnterEvent event); + +typedef PlutoOnRowExitEventCallback = void Function( + PlutoGridOnRowExitEvent event); + typedef PlutoOnRowsMovedEventCallback = void Function( PlutoGridOnRowsMovedEvent event); @@ -66,6 +72,8 @@ class PlutoGrid extends PlutoStatefulWidget { this.onRowChecked, this.onRowDoubleTap, this.onRowSecondaryTap, + this.onRowEnter, + this.onRowExit, this.onRowsMoved, this.onColumnsMoved, this.createHeader, @@ -186,6 +194,16 @@ class PlutoGrid extends PlutoStatefulWidget { /// {@endtemplate} final PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap; + /// {@template pluto_grid_property_onRowEnter} + /// [onRowEnter] is called when the mouse enters the row. + /// {@endtemplate} + final PlutoOnRowEnterEventCallback? onRowEnter; + + /// {@template pluto_grid_property_onRowExit} + /// [onRowExit] is called when the mouse exits the row. + /// {@endtemplate} + final PlutoOnRowExitEventCallback? onRowExit; + /// {@template pluto_grid_property_onRowsMoved} /// [onRowsMoved] is called after the row is dragged and moved /// if [PlutoColumn.enableRowDrag] is enabled. @@ -512,6 +530,8 @@ class PlutoGridState extends PlutoStateWithChange { onRowChecked: widget.onRowChecked, onRowDoubleTap: widget.onRowDoubleTap, onRowSecondaryTap: widget.onRowSecondaryTap, + onRowEnter: widget.onRowEnter, + onRowExit: widget.onRowExit, onRowsMoved: widget.onRowsMoved, onColumnsMoved: widget.onColumnsMoved, rowColorCallback: widget.rowColorCallback, diff --git a/lib/src/pluto_grid_configuration.dart b/lib/src/pluto_grid_configuration.dart index 2fdead0ea..b4e2ce8a0 100644 --- a/lib/src/pluto_grid_configuration.dart +++ b/lib/src/pluto_grid_configuration.dart @@ -206,6 +206,7 @@ class PlutoGridStyleConfig { Color? columnCheckedColor, Color? cellCheckedColor, this.rowCheckedColor = const Color(0x11757575), + this.rowHoveredColor = const Color(0xFFB1B3B7), this.cellColorInEditState = Colors.white, this.cellColorInReadOnlyState = const Color(0xFFDBDBDC), this.cellColorGroupedRow, @@ -277,6 +278,7 @@ class PlutoGridStyleConfig { Color? columnCheckedColor, Color? cellCheckedColor, this.rowCheckedColor = const Color(0x11202020), + this.rowHoveredColor = const Color(0xFF3D3D3D), this.cellColorInEditState = const Color(0xFF666666), this.cellColorInReadOnlyState = const Color(0xFF222222), this.cellColorGroupedRow, @@ -383,6 +385,9 @@ class PlutoGridStyleConfig { /// Checked Color for the row. (Checked rows) final Color rowCheckedColor; + /// Hovered Color. (Currently hovered row) + final Color rowHoveredColor; + /// Cell color in edit state. (only current cell) final Color cellColorInEditState; diff --git a/lib/src/pluto_grid_events.dart b/lib/src/pluto_grid_events.dart index 530ac71fb..1418b0ef7 100644 --- a/lib/src/pluto_grid_events.dart +++ b/lib/src/pluto_grid_events.dart @@ -171,6 +171,34 @@ class PlutoGridOnRowSecondaryTapEvent { }); } +/// Argument of [PlutoGrid.onRowEnter] callback +/// to receive the event of entering the row with the mouse. +class PlutoGridOnRowEnterEvent { + final PlutoRow? row; + final int? rowIdx; + final PlutoCell cell; + + const PlutoGridOnRowEnterEvent({ + this.row, + this.rowIdx, + required this.cell, + }); +} + +/// Argument of [PlutoGrid.onRowExit] callback +/// to receive the event of exiting the row with the mouse. +class PlutoGridOnRowExitEvent { + final PlutoRow? row; + final int? rowIdx; + final PlutoCell cell; + + const PlutoGridOnRowExitEvent({ + this.row, + this.rowIdx, + required this.cell, + }); +} + /// Argument of [PlutoGrid.onRowsMoved] callback /// to receive the event of moving the row by dragging it. class PlutoGridOnRowsMovedEvent { diff --git a/lib/src/ui/pluto_base_cell.dart b/lib/src/ui/pluto_base_cell.dart index 106c14c34..0550b841a 100644 --- a/lib/src/ui/pluto_base_cell.dart +++ b/lib/src/ui/pluto_base_cell.dart @@ -1,3 +1,4 @@ +import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid_plus/pluto_grid_plus.dart'; @@ -93,6 +94,30 @@ class PlutoBaseCell extends StatelessWidget ); } + void _handleOnEnter(PointerEnterEvent event) { + _addGestureEvent( + PlutoGridGestureType.onEnter, + Offset.zero, + ); + // set hovering row to true + stateManager.setIsHoveringRow(true, notify: true); + + // set hovered row index + stateManager.setHoveredRowIdx(rowIdx, notify: true); + } + + void _handleOnExit(PointerExitEvent event) { + _addGestureEvent( + PlutoGridGestureType.onExit, + Offset.zero, + ); + // set hovering row to false + stateManager.setIsHoveringRow(false, notify: true); + + // set hovered row index to null + stateManager.setHoveredRowIdx(null, notify: true); + } + void Function()? _onDoubleTapOrNull() { return stateManager.onRowDoubleTap == null ? null : _handleOnDoubleTap; } @@ -103,32 +128,53 @@ class PlutoBaseCell extends StatelessWidget : _handleOnSecondaryTap; } + void Function(PointerEnterEvent event)? _onEnterOrNull() { + return stateManager.onRowEnter == null + ? null + : _handleOnEnter; + } + + void Function(PointerExitEvent event)? _onExitOrNull() { + return stateManager.onRowExit == null + ? null + : _handleOnExit; + } + @override Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.translucent, - // Essential gestures. - onTapUp: _handleOnTapUp, - onLongPressStart: _handleOnLongPressStart, - onLongPressMoveUpdate: _handleOnLongPressMoveUpdate, - onLongPressEnd: _handleOnLongPressEnd, - // Optional gestures. - onDoubleTap: _onDoubleTapOrNull(), - onSecondaryTapDown: _onSecondaryTapOrNull(), - child: _CellContainer( - cell: cell, - rowIdx: rowIdx, - row: row, - column: column, - cellPadding: column.cellPadding ?? - stateManager.configuration.style.defaultCellPadding, - stateManager: stateManager, - child: _Cell( - stateManager: stateManager, + return MouseRegion( + // Event is triggered when mouse enters the cell, + // which is used for hover logic + onEnter: _onEnterOrNull(), + // Event is triggered when mouse leaves the cell, + // which is used for hover logic + onExit: _onExitOrNull(), + + child: GestureDetector( + behavior: HitTestBehavior.translucent, + // Essential gestures. + onTapUp: _handleOnTapUp, + onLongPressStart: _handleOnLongPressStart, + onLongPressMoveUpdate: _handleOnLongPressMoveUpdate, + onLongPressEnd: _handleOnLongPressEnd, + // Optional gestures. + onDoubleTap: _onDoubleTapOrNull(), + onSecondaryTapDown: _onSecondaryTapOrNull(), + child: _CellContainer( + cell: cell, rowIdx: rowIdx, - column: column, row: row, - cell: cell, + column: column, + cellPadding: column.cellPadding ?? + stateManager.configuration.style.defaultCellPadding, + stateManager: stateManager, + child: _Cell( + stateManager: stateManager, + rowIdx: rowIdx, + column: column, + row: row, + cell: cell, + ), ), ), ); diff --git a/lib/src/ui/pluto_base_row.dart b/lib/src/ui/pluto_base_row.dart index 5bca68ac4..f0796f1a2 100644 --- a/lib/src/ui/pluto_base_row.dart +++ b/lib/src/ui/pluto_base_row.dart @@ -255,6 +255,7 @@ class _RowContainerWidgetState extends PlutoStateWithChange<_RowContainerWidget> required bool isSelecting, required bool hasCurrentSelectingPosition, required bool isCheckedRow, + required bool isHovered, }) { Color color = _getDefaultRowColor(); @@ -270,6 +271,10 @@ class _RowContainerWidgetState extends PlutoStateWithChange<_RowContainerWidget> if (checkCurrentRow || checkSelectedRow) { color = stateManager.configuration.style.activatedColor; + } else { + if (isHovered) { + color = stateManager.configuration.style.rowHoveredColor; + } } } @@ -306,12 +311,15 @@ class _RowContainerWidgetState extends PlutoStateWithChange<_RowContainerWidget> final bool isFocusedCurrentRow = isCurrentRow && stateManager.hasFocus; + final bool isHovered = stateManager.isRowIdxHovered(widget.rowIdx); + final Color rowColor = _getRowColor( isDragTarget: isDragTarget, isFocusedCurrentRow: isFocusedCurrentRow, isSelecting: isSelecting, hasCurrentSelectingPosition: hasCurrentSelectingPosition, isCheckedRow: isCheckedRow, + isHovered: isHovered, ); return BoxDecoration( From 8037bf9c57816ffba8433df2cc014b414ae262d3 Mon Sep 17 00:00:00 2001 From: coruscant187 Date: Mon, 1 Apr 2024 18:49:53 +0200 Subject: [PATCH 31/80] Tests for hovering rows feature --- test/mock/shared_mocks.mocks.dart | 639 +++++++++++++++++- .../state/hovering_row_state_test.dart | 163 +++++ 2 files changed, 765 insertions(+), 37 deletions(-) create mode 100644 test/src/manager/state/hovering_row_state_test.dart diff --git a/test/mock/shared_mocks.mocks.dart b/test/mock/shared_mocks.mocks.dart index 58b4f81cf..887d237cd 100644 --- a/test/mock/shared_mocks.mocks.dart +++ b/test/mock/shared_mocks.mocks.dart @@ -1,5 +1,5 @@ -// Mocks generated by Mockito 5.4.0 from annotations -// in pluto_grid/test/mock/shared_mocks.dart. +// Mocks generated by Mockito 5.4.4 from annotations +// in pluto_grid_plus/test/mock/shared_mocks.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes @@ -8,11 +8,12 @@ import 'dart:ui' as _i5; import 'package:flutter/gestures.dart' as _i7; import 'package:flutter/material.dart' as _i3; -import 'package:flutter/rendering.dart' as _i9; -import 'package:flutter/services.dart' as _i10; -import 'package:flutter/src/foundation/assertions.dart' as _i11; +import 'package:flutter/rendering.dart' as _i10; +import 'package:flutter/services.dart' as _i11; +import 'package:flutter/src/foundation/assertions.dart' as _i12; import 'package:flutter/src/foundation/diagnostics.dart' as _i8; import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i9; import 'package:pluto_grid_plus/pluto_grid_plus.dart' as _i2; import 'package:rxdart/rxdart.dart' as _i4; @@ -20,6 +21,8 @@ import 'package:rxdart/rxdart.dart' as _i4; // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors @@ -183,8 +186,8 @@ class _FakeOffset_13 extends _i1.SmartFake implements _i5.Offset { ); } -class _FakePlutoChangeNotifierFilter_14 extends _i1.SmartFake - implements _i2.PlutoChangeNotifierFilter { +class _FakePlutoChangeNotifierFilter_14 extends _i1.SmartFake + implements _i2.PlutoChangeNotifierFilter { _FakePlutoChangeNotifierFilter_14( Object parent, Invocation parentInvocation, @@ -343,7 +346,7 @@ class _FakeScrollMetrics_28 extends _i1.SmartFake implements _i3.ScrollMetrics { ); } -class _FakeFuture_29 extends _i1.SmartFake implements _i6.Future { +class _FakeFuture_29 extends _i1.SmartFake implements _i6.Future { _FakeFuture_29( Object parent, Invocation parentInvocation, @@ -419,6 +422,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#refColumns), ), ) as _i2.FilteredList<_i2.PlutoColumn>); + @override _i2.FilteredList<_i2.PlutoColumnGroup> get refColumnGroups => (super.noSuchMethod( @@ -432,6 +436,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#refColumnGroups), ), ) as _i2.FilteredList<_i2.PlutoColumnGroup>); + @override _i2.FilteredList<_i2.PlutoRow> get refRows => (super.noSuchMethod( Invocation.getter(#refRows), @@ -444,6 +449,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#refRows), ), ) as _i2.FilteredList<_i2.PlutoRow>); + @override _i3.FocusNode get gridFocusNode => (super.noSuchMethod( Invocation.getter(#gridFocusNode), @@ -456,6 +462,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#gridFocusNode), ), ) as _i3.FocusNode); + @override _i2.PlutoGridScrollController get scroll => (super.noSuchMethod( Invocation.getter(#scroll), @@ -468,6 +475,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#scroll), ), ) as _i2.PlutoGridScrollController); + @override _i2.PlutoColumnMenuDelegate get columnMenuDelegate => (super.noSuchMethod( @@ -481,6 +489,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#columnMenuDelegate), ), ) as _i2.PlutoColumnMenuDelegate); + @override _i2.PlutoChangeNotifierFilterResolver get notifierFilterResolver => (super.noSuchMethod( @@ -494,6 +503,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#notifierFilterResolver), ), ) as _i2.PlutoChangeNotifierFilterResolver); + @override _i3.GlobalKey<_i3.State<_i3.StatefulWidget>> get gridKey => (super.noSuchMethod( @@ -508,6 +518,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#gridKey), ), ) as _i3.GlobalKey<_i3.State<_i3.StatefulWidget>>); + @override _i4.PublishSubject<_i2.PlutoNotifierEvent> get streamNotifier => (super.noSuchMethod( @@ -522,30 +533,35 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#streamNotifier), ), ) as _i4.PublishSubject<_i2.PlutoNotifierEvent>); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override List<_i2.PlutoColumnGroup> get columnGroups => (super.noSuchMethod( Invocation.getter(#columnGroups), returnValue: <_i2.PlutoColumnGroup>[], returnValueForMissingStub: <_i2.PlutoColumnGroup>[], ) as List<_i2.PlutoColumnGroup>); + @override bool get hasColumnGroups => (super.noSuchMethod( Invocation.getter(#hasColumnGroups), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get showColumnGroups => (super.noSuchMethod( Invocation.getter(#showColumnGroups), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i2.PlutoGridColumnSizeConfig get columnSizeConfig => (super.noSuchMethod( Invocation.getter(#columnSizeConfig), @@ -558,174 +574,203 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#columnSizeConfig), ), ) as _i2.PlutoGridColumnSizeConfig); + @override _i2.PlutoAutoSizeMode get columnsAutoSizeMode => (super.noSuchMethod( Invocation.getter(#columnsAutoSizeMode), returnValue: _i2.PlutoAutoSizeMode.none, returnValueForMissingStub: _i2.PlutoAutoSizeMode.none, ) as _i2.PlutoAutoSizeMode); + @override _i2.PlutoResizeMode get columnsResizeMode => (super.noSuchMethod( Invocation.getter(#columnsResizeMode), returnValue: _i2.PlutoResizeMode.none, returnValueForMissingStub: _i2.PlutoResizeMode.none, ) as _i2.PlutoResizeMode); + @override bool get enableColumnsAutoSize => (super.noSuchMethod( Invocation.getter(#enableColumnsAutoSize), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get activatedColumnsAutoSize => (super.noSuchMethod( Invocation.getter(#activatedColumnsAutoSize), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override List<_i2.PlutoColumn> get columns => (super.noSuchMethod( Invocation.getter(#columns), returnValue: <_i2.PlutoColumn>[], returnValueForMissingStub: <_i2.PlutoColumn>[], ) as List<_i2.PlutoColumn>); + @override List get columnIndexes => (super.noSuchMethod( Invocation.getter(#columnIndexes), returnValue: [], returnValueForMissingStub: [], ) as List); + @override List get columnIndexesForShowFrozen => (super.noSuchMethod( Invocation.getter(#columnIndexesForShowFrozen), returnValue: [], returnValueForMissingStub: [], ) as List); + @override double get columnsWidth => (super.noSuchMethod( Invocation.getter(#columnsWidth), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override List<_i2.PlutoColumn> get leftFrozenColumns => (super.noSuchMethod( Invocation.getter(#leftFrozenColumns), returnValue: <_i2.PlutoColumn>[], returnValueForMissingStub: <_i2.PlutoColumn>[], ) as List<_i2.PlutoColumn>); + @override List get leftFrozenColumnIndexes => (super.noSuchMethod( Invocation.getter(#leftFrozenColumnIndexes), returnValue: [], returnValueForMissingStub: [], ) as List); + @override double get leftFrozenColumnsWidth => (super.noSuchMethod( Invocation.getter(#leftFrozenColumnsWidth), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override List<_i2.PlutoColumn> get rightFrozenColumns => (super.noSuchMethod( Invocation.getter(#rightFrozenColumns), returnValue: <_i2.PlutoColumn>[], returnValueForMissingStub: <_i2.PlutoColumn>[], ) as List<_i2.PlutoColumn>); + @override List get rightFrozenColumnIndexes => (super.noSuchMethod( Invocation.getter(#rightFrozenColumnIndexes), returnValue: [], returnValueForMissingStub: [], ) as List); + @override double get rightFrozenColumnsWidth => (super.noSuchMethod( Invocation.getter(#rightFrozenColumnsWidth), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override List<_i2.PlutoColumn> get bodyColumns => (super.noSuchMethod( Invocation.getter(#bodyColumns), returnValue: <_i2.PlutoColumn>[], returnValueForMissingStub: <_i2.PlutoColumn>[], ) as List<_i2.PlutoColumn>); + @override List get bodyColumnIndexes => (super.noSuchMethod( Invocation.getter(#bodyColumnIndexes), returnValue: [], returnValueForMissingStub: [], ) as List); + @override double get bodyColumnsWidth => (super.noSuchMethod( Invocation.getter(#bodyColumnsWidth), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override bool get hasSortedColumn => (super.noSuchMethod( Invocation.getter(#hasSortedColumn), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override List get columnIndexesByShowFrozen => (super.noSuchMethod( Invocation.getter(#columnIndexesByShowFrozen), returnValue: [], returnValueForMissingStub: [], ) as List); + @override bool get isDraggingRow => (super.noSuchMethod( Invocation.getter(#isDraggingRow), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override List<_i2.PlutoRow> get dragRows => (super.noSuchMethod( Invocation.getter(#dragRows), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as List<_i2.PlutoRow>); + @override bool get canRowDrag => (super.noSuchMethod( Invocation.getter(#canRowDrag), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get isEditing => (super.noSuchMethod( Invocation.getter(#isEditing), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get autoEditing => (super.noSuchMethod( Invocation.getter(#autoEditing), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override List<_i2.PlutoRow> get filterRows => (super.noSuchMethod( Invocation.getter(#filterRows), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as List<_i2.PlutoRow>); + @override bool get hasFilter => (super.noSuchMethod( Invocation.getter(#hasFilter), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get keepFocus => (super.noSuchMethod( Invocation.getter(#keepFocus), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get hasFocus => (super.noSuchMethod( Invocation.getter(#hasFocus), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i2.PlutoGridConfiguration get configuration => (super.noSuchMethod( Invocation.getter(#configuration), @@ -738,12 +783,14 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#configuration), ), ) as _i2.PlutoGridConfiguration); + @override _i2.PlutoGridMode get mode => (super.noSuchMethod( Invocation.getter(#mode), returnValue: _i2.PlutoGridMode.normal, returnValueForMissingStub: _i2.PlutoGridMode.normal, ) as _i2.PlutoGridMode); + @override _i2.PlutoGridLocaleText get localeText => (super.noSuchMethod( Invocation.getter(#localeText), @@ -756,6 +803,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#localeText), ), ) as _i2.PlutoGridLocaleText); + @override _i2.PlutoGridStyleConfig get style => (super.noSuchMethod( Invocation.getter(#style), @@ -768,18 +816,21 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#style), ), ) as _i2.PlutoGridStyleConfig); + @override bool get sortOnlyEvent => (super.noSuchMethod( Invocation.getter(#sortOnlyEvent), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get filterOnlyEvent => (super.noSuchMethod( Invocation.getter(#filterOnlyEvent), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i2.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( Invocation.getter(#keyPressed), @@ -792,6 +843,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#keyPressed), ), ) as _i2.PlutoGridKeyPressed); + @override _i3.ChangeNotifier get resizingChangeNotifier => (super.noSuchMethod( Invocation.getter(#resizingChangeNotifier), @@ -804,378 +856,455 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#resizingChangeNotifier), ), ) as _i3.ChangeNotifier); + @override double get headerHeight => (super.noSuchMethod( Invocation.getter(#headerHeight), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get footerHeight => (super.noSuchMethod( Invocation.getter(#footerHeight), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get columnRowContainerHeight => (super.noSuchMethod( Invocation.getter(#columnRowContainerHeight), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get rowContainerHeight => (super.noSuchMethod( Invocation.getter(#rowContainerHeight), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override bool get showFrozenColumn => (super.noSuchMethod( Invocation.getter(#showFrozenColumn), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get showColumnTitle => (super.noSuchMethod( Invocation.getter(#showColumnTitle), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get showColumnFooter => (super.noSuchMethod( Invocation.getter(#showColumnFooter), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get showColumnFilter => (super.noSuchMethod( Invocation.getter(#showColumnFilter), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get showHeader => (super.noSuchMethod( Invocation.getter(#showHeader), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get showFooter => (super.noSuchMethod( Invocation.getter(#showFooter), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get showLoading => (super.noSuchMethod( Invocation.getter(#showLoading), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i2.PlutoGridLoadingLevel get loadingLevel => (super.noSuchMethod( Invocation.getter(#loadingLevel), returnValue: _i2.PlutoGridLoadingLevel.grid, returnValueForMissingStub: _i2.PlutoGridLoadingLevel.grid, ) as _i2.PlutoGridLoadingLevel); + @override bool get hasLeftFrozenColumns => (super.noSuchMethod( Invocation.getter(#hasLeftFrozenColumns), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get hasRightFrozenColumns => (super.noSuchMethod( Invocation.getter(#hasRightFrozenColumns), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override double get headerBottomOffset => (super.noSuchMethod( Invocation.getter(#headerBottomOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get footerTopOffset => (super.noSuchMethod( Invocation.getter(#footerTopOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get columnHeight => (super.noSuchMethod( Invocation.getter(#columnHeight), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get columnFooterHeight => (super.noSuchMethod( Invocation.getter(#columnFooterHeight), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get columnGroupHeight => (super.noSuchMethod( Invocation.getter(#columnGroupHeight), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get columnFilterHeight => (super.noSuchMethod( Invocation.getter(#columnFilterHeight), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get columnBottomOffset => (super.noSuchMethod( Invocation.getter(#columnBottomOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get rowsTopOffset => (super.noSuchMethod( Invocation.getter(#rowsTopOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get rowHeight => (super.noSuchMethod( Invocation.getter(#rowHeight), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get rowTotalHeight => (super.noSuchMethod( Invocation.getter(#rowTotalHeight), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get bodyTopOffset => (super.noSuchMethod( Invocation.getter(#bodyTopOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get bodyLeftOffset => (super.noSuchMethod( Invocation.getter(#bodyLeftOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get bodyRightOffset => (super.noSuchMethod( Invocation.getter(#bodyRightOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get bodyLeftScrollOffset => (super.noSuchMethod( Invocation.getter(#bodyLeftScrollOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get bodyRightScrollOffset => (super.noSuchMethod( Invocation.getter(#bodyRightScrollOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get bodyUpScrollOffset => (super.noSuchMethod( Invocation.getter(#bodyUpScrollOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get bodyDownScrollOffset => (super.noSuchMethod( Invocation.getter(#bodyDownScrollOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get leftFrozenRightOffset => (super.noSuchMethod( Invocation.getter(#leftFrozenRightOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get rightFrozenLeftOffset => (super.noSuchMethod( Invocation.getter(#rightFrozenLeftOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get rightBlankOffset => (super.noSuchMethod( Invocation.getter(#rightBlankOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get scrollOffsetByFrozenColumn => (super.noSuchMethod( Invocation.getter(#scrollOffsetByFrozenColumn), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override _i5.TextDirection get textDirection => (super.noSuchMethod( Invocation.getter(#textDirection), returnValue: _i5.TextDirection.rtl, returnValueForMissingStub: _i5.TextDirection.rtl, ) as _i5.TextDirection); + @override bool get isLTR => (super.noSuchMethod( Invocation.getter(#isLTR), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get isRTL => (super.noSuchMethod( Invocation.getter(#isRTL), returnValue: false, returnValueForMissingStub: false, ) as bool); + + @override + double get gridPadding => (super.noSuchMethod( + Invocation.getter(#gridPadding), + returnValue: 0.0, + returnValueForMissingStub: 0.0, + ) as double); + + @override + double get gridBorderWidth => (super.noSuchMethod( + Invocation.getter(#gridBorderWidth), + returnValue: 0.0, + returnValueForMissingStub: 0.0, + ) as double); + @override int get page => (super.noSuchMethod( Invocation.getter(#page), returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override int get pageSize => (super.noSuchMethod( Invocation.getter(#pageSize), returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override int get pageRangeFrom => (super.noSuchMethod( Invocation.getter(#pageRangeFrom), returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override int get pageRangeTo => (super.noSuchMethod( Invocation.getter(#pageRangeTo), returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override int get totalPage => (super.noSuchMethod( Invocation.getter(#totalPage), returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override bool get isPaginated => (super.noSuchMethod( Invocation.getter(#isPaginated), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get hasRowGroups => (super.noSuchMethod( Invocation.getter(#hasRowGroups), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get enabledRowGroups => (super.noSuchMethod( Invocation.getter(#enabledRowGroups), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override Iterable<_i2.PlutoRow> get iterateAllMainRowGroup => (super.noSuchMethod( Invocation.getter(#iterateAllMainRowGroup), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as Iterable<_i2.PlutoRow>); + @override Iterable<_i2.PlutoRow> get iterateAllRowGroup => (super.noSuchMethod( Invocation.getter(#iterateAllRowGroup), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as Iterable<_i2.PlutoRow>); + @override Iterable<_i2.PlutoRow> get iterateAllRowAndGroup => (super.noSuchMethod( Invocation.getter(#iterateAllRowAndGroup), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as Iterable<_i2.PlutoRow>); + @override Iterable<_i2.PlutoRow> get iterateAllRow => (super.noSuchMethod( Invocation.getter(#iterateAllRow), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as Iterable<_i2.PlutoRow>); + @override Iterable<_i2.PlutoRow> get iterateFilteredMainRowGroup => (super.noSuchMethod( Invocation.getter(#iterateFilteredMainRowGroup), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as Iterable<_i2.PlutoRow>); + @override Iterable<_i2.PlutoRow> get iterateMainRowGroup => (super.noSuchMethod( Invocation.getter(#iterateMainRowGroup), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as Iterable<_i2.PlutoRow>); + @override Iterable<_i2.PlutoRow> get iterateRowGroup => (super.noSuchMethod( Invocation.getter(#iterateRowGroup), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as Iterable<_i2.PlutoRow>); + @override Iterable<_i2.PlutoRow> get iterateRowAndGroup => (super.noSuchMethod( Invocation.getter(#iterateRowAndGroup), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as Iterable<_i2.PlutoRow>); + @override Iterable<_i2.PlutoRow> get iterateRow => (super.noSuchMethod( Invocation.getter(#iterateRow), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as Iterable<_i2.PlutoRow>); + @override List<_i2.PlutoRow> get rows => (super.noSuchMethod( Invocation.getter(#rows), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as List<_i2.PlutoRow>); + @override List<_i2.PlutoRow> get checkedRows => (super.noSuchMethod( Invocation.getter(#checkedRows), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as List<_i2.PlutoRow>); + @override List<_i2.PlutoRow> get unCheckedRows => (super.noSuchMethod( Invocation.getter(#unCheckedRows), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as List<_i2.PlutoRow>); + @override bool get hasCheckedRow => (super.noSuchMethod( Invocation.getter(#hasCheckedRow), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get hasUnCheckedRow => (super.noSuchMethod( Invocation.getter(#hasUnCheckedRow), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get isHorizontalOverScrolled => (super.noSuchMethod( Invocation.getter(#isHorizontalOverScrolled), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override double get correctHorizontalOffset => (super.noSuchMethod( Invocation.getter(#correctHorizontalOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override _i5.Offset get directionalScrollEdgeOffset => (super.noSuchMethod( Invocation.getter(#directionalScrollEdgeOffset), @@ -1188,18 +1317,21 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#directionalScrollEdgeOffset), ), ) as _i5.Offset); + @override bool get isSelecting => (super.noSuchMethod( Invocation.getter(#isSelecting), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i2.PlutoGridSelectingMode get selectingMode => (super.noSuchMethod( Invocation.getter(#selectingMode), returnValue: _i2.PlutoGridSelectingMode.cell, returnValueForMissingStub: _i2.PlutoGridSelectingMode.cell, ) as _i2.PlutoGridSelectingMode); + @override List<_i2.PlutoGridSelectingCellPosition> get currentSelectingPositionList => (super.noSuchMethod( @@ -1207,24 +1339,41 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: <_i2.PlutoGridSelectingCellPosition>[], returnValueForMissingStub: <_i2.PlutoGridSelectingCellPosition>[], ) as List<_i2.PlutoGridSelectingCellPosition>); + @override bool get hasCurrentSelectingPosition => (super.noSuchMethod( Invocation.getter(#hasCurrentSelectingPosition), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override List<_i2.PlutoRow> get currentSelectingRows => (super.noSuchMethod( Invocation.getter(#currentSelectingRows), returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as List<_i2.PlutoRow>); + @override String get currentSelectingText => (super.noSuchMethod( Invocation.getter(#currentSelectingText), - returnValue: '', - returnValueForMissingStub: '', + returnValue: _i9.dummyValue( + this, + Invocation.getter(#currentSelectingText), + ), + returnValueForMissingStub: _i9.dummyValue( + this, + Invocation.getter(#currentSelectingText), + ), ) as String); + + @override + bool get isHoveringRow => (super.noSuchMethod( + Invocation.getter(#isHoveringRow), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override set headerHeight(double? value) => super.noSuchMethod( Invocation.setter( @@ -1233,6 +1382,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override set footerHeight(double? value) => super.noSuchMethod( Invocation.setter( @@ -1241,6 +1391,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override set columnFooterHeight(double? value) => super.noSuchMethod( Invocation.setter( @@ -1249,6 +1400,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i2.PlutoChangeNotifierFilter resolveNotifierFilter() => (super.noSuchMethod( @@ -1271,6 +1423,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), ), ) as _i2.PlutoChangeNotifierFilter); + @override void dispose() => super.noSuchMethod( Invocation.method( @@ -1279,6 +1432,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void notifyListeners([ bool? notify = true, @@ -1294,6 +1448,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void notifyListenersOnPostFrame([ bool? notify = true, @@ -1309,6 +1464,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void addNotifier(int? hash) => super.noSuchMethod( Invocation.method( @@ -1317,6 +1473,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -1325,6 +1482,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -1333,6 +1491,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setCurrentCellPosition( _i2.PlutoGridCellPosition? cellPosition, { @@ -1346,6 +1505,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( Invocation.method( @@ -1355,6 +1515,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override int? columnIdxByCellKeyAndRowIdx( _i3.Key? cellKey, @@ -1370,6 +1531,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ) as int?); + @override void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( Invocation.method( @@ -1379,6 +1541,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setCurrentCell( _i2.PlutoCell? cell, @@ -1396,6 +1559,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool canMoveCell( _i2.PlutoGridCellPosition? cellPosition, @@ -1412,6 +1576,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool canNotMoveCell( _i2.PlutoGridCellPosition? cellPosition, @@ -1428,6 +1593,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool canChangeCellValue({ required _i2.PlutoCell? cell, @@ -1447,6 +1613,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool canNotChangeCellValue({ required _i2.PlutoCell? cell, @@ -1466,6 +1633,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override dynamic filteredCellValue({ required _i2.PlutoColumn? column, @@ -1484,6 +1652,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool isCurrentCell(_i2.PlutoCell? cell) => (super.noSuchMethod( Invocation.method( @@ -1493,6 +1662,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isInvalidCellPosition(_i2.PlutoGridCellPosition? cellPosition) => (super.noSuchMethod( @@ -1503,6 +1673,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void setShowColumnGroups( bool? flag, { @@ -1516,6 +1687,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override List<_i2.PlutoColumnGroupPair> separateLinkedGroup({ required List<_i2.PlutoColumnGroup>? columnGroupList, @@ -1533,6 +1705,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: <_i2.PlutoColumnGroupPair>[], returnValueForMissingStub: <_i2.PlutoColumnGroupPair>[], ) as List<_i2.PlutoColumnGroupPair>); + @override int columnGroupDepth(List<_i2.PlutoColumnGroup>? columnGroupList) => (super.noSuchMethod( @@ -1543,6 +1716,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override void removeColumnsInColumnGroup( List<_i2.PlutoColumn>? columns, { @@ -1556,6 +1730,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setGroupToColumn() => super.noSuchMethod( Invocation.method( @@ -1564,6 +1739,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void activateColumnsAutoSize() => super.noSuchMethod( Invocation.method( @@ -1572,6 +1748,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void deactivateColumnsAutoSize() => super.noSuchMethod( Invocation.method( @@ -1580,6 +1757,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i2.PlutoAutoSize getColumnsAutoSizeHelper({ required Iterable<_i2.PlutoColumn>? columns, @@ -1617,6 +1795,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), ), ) as _i2.PlutoAutoSize); + @override _i2.PlutoResize getColumnsResizeHelper({ required List<_i2.PlutoColumn>? columns, @@ -1658,6 +1837,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), ), ) as _i2.PlutoResize); + @override void setColumnSizeConfig(_i2.PlutoGridColumnSizeConfig? config) => super.noSuchMethod( @@ -1667,6 +1847,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void toggleFrozenColumn( _i2.PlutoColumn? column, @@ -1682,6 +1863,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void toggleSortColumn(_i2.PlutoColumn? column) => super.noSuchMethod( Invocation.method( @@ -1690,6 +1872,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override int? columnIndex(_i2.PlutoColumn? column) => (super.noSuchMethod( Invocation.method( @@ -1698,6 +1881,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ) as int?); + @override void insertColumns( int? columnIdx, @@ -1713,6 +1897,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeColumns(List<_i2.PlutoColumn>? columns) => super.noSuchMethod( Invocation.method( @@ -1721,6 +1906,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveColumn({ required _i2.PlutoColumn? column, @@ -1737,6 +1923,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resizeColumn( _i2.PlutoColumn? column, @@ -1752,6 +1939,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void autoFitColumn( _i3.BuildContext? context, @@ -1767,6 +1955,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void hideColumn( _i2.PlutoColumn? column, @@ -1784,6 +1973,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void hideColumns( List<_i2.PlutoColumn>? columns, @@ -1801,6 +1991,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void sortAscending( _i2.PlutoColumn? column, { @@ -1814,6 +2005,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void sortDescending( _i2.PlutoColumn? column, { @@ -1827,6 +2019,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void sortBySortIdx( _i2.PlutoColumn? column, { @@ -1840,6 +2033,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void showSetColumnsPopup(_i3.BuildContext? context) => super.noSuchMethod( Invocation.method( @@ -1848,6 +2042,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool limitResizeColumn( _i2.PlutoColumn? column, @@ -1864,6 +2059,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool limitMoveColumn({ required _i2.PlutoColumn? column, @@ -1881,6 +2077,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool limitToggleFrozenColumn( _i2.PlutoColumn? column, @@ -1897,6 +2094,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool limitHideColumn( _i2.PlutoColumn? column, @@ -1915,6 +2113,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void setIsDraggingRow( bool? flag, { @@ -1928,6 +2127,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setDragRows( List<_i2.PlutoRow>? rows, { @@ -1941,6 +2141,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setDragTargetRowIdx( int? rowIdx, { @@ -1954,6 +2155,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool isRowIdxDragTarget(int? rowIdx) => (super.noSuchMethod( Invocation.method( @@ -1963,6 +2165,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isRowIdxTopDragTarget(int? rowIdx) => (super.noSuchMethod( Invocation.method( @@ -1972,6 +2175,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( Invocation.method( @@ -1981,6 +2185,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isRowBeingDragged(_i3.Key? rowKey) => (super.noSuchMethod( Invocation.method( @@ -1990,6 +2195,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isEditableCell(_i2.PlutoCell? cell) => (super.noSuchMethod( Invocation.method( @@ -1999,6 +2205,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void setEditing( bool? flag, { @@ -2012,6 +2219,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setAutoEditing( bool? flag, { @@ -2025,6 +2233,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setTextEditingController( _i3.TextEditingController? textEditingController) => @@ -2035,6 +2244,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void toggleEditing({bool? notify = true}) => super.noSuchMethod( Invocation.method( @@ -2044,6 +2254,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void pasteCellValue(List>? textList) => super.noSuchMethod( Invocation.method( @@ -2052,6 +2263,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override dynamic castValueByColumnType( dynamic value, @@ -2067,6 +2279,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void changeCellValue( _i2.PlutoCell? cell, @@ -2090,6 +2303,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setFilter( _i2.FilteredListFilter<_i2.PlutoRow>? filter, { @@ -2103,6 +2317,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setFilterWithFilterRows( List<_i2.PlutoRow>? rows, { @@ -2116,6 +2331,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setFilterRows(List<_i2.PlutoRow>? rows) => super.noSuchMethod( Invocation.method( @@ -2124,6 +2340,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override List<_i2.PlutoRow> filterRowsByField(String? columnField) => (super.noSuchMethod( @@ -2134,6 +2351,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as List<_i2.PlutoRow>); + @override bool isFilteredColumn(_i2.PlutoColumn? column) => (super.noSuchMethod( Invocation.method( @@ -2143,6 +2361,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void removeColumnsInFilterRows( List<_i2.PlutoColumn>? columns, { @@ -2156,6 +2375,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void showFilterPopup( _i3.BuildContext? context, { @@ -2173,6 +2393,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setKeepFocus( bool? flag, { @@ -2186,6 +2407,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void nextFocusOfColumnFilter( _i2.PlutoColumn? column, { @@ -2199,6 +2421,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setKeyManager(_i2.PlutoGridKeyManager? keyManager) => super.noSuchMethod( Invocation.method( @@ -2207,6 +2430,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setEventManager(_i2.PlutoGridEventManager? eventManager) => super.noSuchMethod( @@ -2216,6 +2440,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setConfiguration( _i2.PlutoGridConfiguration? configuration, { @@ -2233,6 +2458,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setGridMode(_i2.PlutoGridMode? mode) => super.noSuchMethod( Invocation.method( @@ -2241,6 +2467,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resetCurrentState({bool? notify = true}) => super.noSuchMethod( Invocation.method( @@ -2250,6 +2477,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void handleOnSelected() => super.noSuchMethod( Invocation.method( @@ -2258,6 +2486,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setSortOnlyEvent(bool? flag) => super.noSuchMethod( Invocation.method( @@ -2266,6 +2495,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setFilterOnlyEvent(bool? flag) => super.noSuchMethod( Invocation.method( @@ -2274,6 +2504,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i2.PlutoGridCellPosition cellPositionToMove( _i2.PlutoGridCellPosition? cellPosition, @@ -2308,6 +2539,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), ), ) as _i2.PlutoGridCellPosition); + @override void moveCurrentCell( _i2.PlutoMoveDirection? direction, { @@ -2325,6 +2557,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveCurrentCellToEdgeOfColumns( _i2.PlutoMoveDirection? direction, { @@ -2342,6 +2575,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveCurrentCellToEdgeOfRows( _i2.PlutoMoveDirection? direction, { @@ -2359,6 +2593,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveCurrentCellByRowIdx( int? rowIdx, @@ -2376,6 +2611,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveSelectingCell(_i2.PlutoMoveDirection? direction) => super.noSuchMethod( @@ -2385,6 +2621,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveSelectingCellToEdgeOfColumns( _i2.PlutoMoveDirection? direction, { @@ -2402,6 +2639,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveSelectingCellToEdgeOfRows( _i2.PlutoMoveDirection? direction, { @@ -2419,6 +2657,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveSelectingCellByRowIdx( int? rowIdx, @@ -2436,6 +2675,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setLayout(_i3.BoxConstraints? size) => super.noSuchMethod( Invocation.method( @@ -2444,6 +2684,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setShowColumnTitle( bool? flag, { @@ -2457,6 +2698,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setShowColumnFooter( bool? flag, { @@ -2470,6 +2712,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setShowColumnFilter( bool? flag, { @@ -2483,6 +2726,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setShowLoading( bool? flag, { @@ -2500,6 +2744,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resetShowFrozenColumn() => super.noSuchMethod( Invocation.method( @@ -2508,6 +2753,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool shouldShowFrozenColumns(double? width) => (super.noSuchMethod( Invocation.method( @@ -2517,6 +2763,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool enoughFrozenColumnsWidth(double? width) => (super.noSuchMethod( Invocation.method( @@ -2526,6 +2773,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void notifyResizingListeners() => super.noSuchMethod( Invocation.method( @@ -2534,6 +2782,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void notifyChangedShowFrozenColumn() => super.noSuchMethod( Invocation.method( @@ -2542,6 +2791,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setTextDirection(_i5.TextDirection? textDirection) => super.noSuchMethod( Invocation.method( @@ -2550,6 +2800,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setGridGlobalOffset(_i5.Offset? offset) => super.noSuchMethod( Invocation.method( @@ -2558,6 +2809,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setPageSize( int? pageSize, { @@ -2571,6 +2823,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setPage( int? page, { @@ -2588,6 +2841,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resetPage({ bool? resetCurrentState = true, @@ -2604,6 +2858,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool isMainRow(_i2.PlutoRow? row) => (super.noSuchMethod( Invocation.method( @@ -2613,6 +2868,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isNotMainGroupedRow(_i2.PlutoRow? row) => (super.noSuchMethod( Invocation.method( @@ -2622,6 +2878,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isExpandedGroupedRow(_i2.PlutoRow? row) => (super.noSuchMethod( Invocation.method( @@ -2631,6 +2888,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void setRowGroup( _i2.PlutoRowGroupDelegate? delegate, { @@ -2644,6 +2902,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void toggleExpandedRowGroup({ required _i2.PlutoRow? rowGroup, @@ -2660,6 +2919,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setRowGroupFilter(_i2.FilteredListFilter<_i2.PlutoRow>? filter) => super.noSuchMethod( @@ -2669,6 +2929,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void sortRowGroup({ required _i2.PlutoColumn? column, @@ -2688,6 +2949,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void insertRowGroup( int? index, @@ -2703,6 +2965,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeRowAndGroupByKey(Iterable<_i3.Key>? keys) => super.noSuchMethod( Invocation.method( @@ -2711,6 +2974,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeColumnsInRowGroupByColumn( List<_i2.PlutoColumn>? columns, { @@ -2724,6 +2988,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updateRowGroupByHideColumn(List<_i2.PlutoColumn>? columns) => super.noSuchMethod( @@ -2733,6 +2998,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override int? getRowIdxByOffset(double? offset) => (super.noSuchMethod( Invocation.method( @@ -2741,6 +3007,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ) as int?); + @override _i2.PlutoRow getNewRow() => (super.noSuchMethod( Invocation.method( @@ -2762,6 +3029,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), ), ) as _i2.PlutoRow); + @override List<_i2.PlutoRow> getNewRows({int? count = 1}) => (super.noSuchMethod( Invocation.method( @@ -2772,6 +3040,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as List<_i2.PlutoRow>); + @override void setRowChecked( _i2.PlutoRow? row, @@ -2789,6 +3058,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void insertRows( int? rowIdx, @@ -2806,6 +3076,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void prependNewRows({int? count = 1}) => super.noSuchMethod( Invocation.method( @@ -2815,6 +3086,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void prependRows(List<_i2.PlutoRow>? rows) => super.noSuchMethod( Invocation.method( @@ -2823,6 +3095,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void appendNewRows({int? count = 1}) => super.noSuchMethod( Invocation.method( @@ -2832,6 +3105,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void appendRows(List<_i2.PlutoRow>? rows) => super.noSuchMethod( Invocation.method( @@ -2840,6 +3114,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeCurrentRow() => super.noSuchMethod( Invocation.method( @@ -2848,6 +3123,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeRows( List<_i2.PlutoRow>? rows, { @@ -2861,6 +3137,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeAllRows({bool? notify = true}) => super.noSuchMethod( Invocation.method( @@ -2870,6 +3147,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveRowsByOffset( List<_i2.PlutoRow>? rows, @@ -2887,6 +3165,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveRowsByIndex( List<_i2.PlutoRow>? rows, @@ -2904,6 +3183,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void toggleAllRowChecked( bool? flag, { @@ -2917,6 +3197,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i5.Offset toDirectionalOffset(_i5.Offset? offset) => (super.noSuchMethod( Invocation.method( @@ -2938,6 +3219,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), ), ) as _i5.Offset); + @override void scrollByDirection( _i2.PlutoMoveDirection? direction, @@ -2953,6 +3235,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool canHorizontalCellScrollByDirection( _i2.PlutoMoveDirection? direction, @@ -2969,6 +3252,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void moveScrollByRow( _i2.PlutoMoveDirection? direction, @@ -2984,6 +3268,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveScrollByColumn( _i2.PlutoMoveDirection? direction, @@ -2999,6 +3284,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool needMovingScroll( _i5.Offset? offset, @@ -3015,6 +3301,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void updateCorrectScrollOffset() => super.noSuchMethod( Invocation.method( @@ -3023,6 +3310,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updateScrollViewport() => super.noSuchMethod( Invocation.method( @@ -3031,6 +3319,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resetScrollToZero() => super.noSuchMethod( Invocation.method( @@ -3039,6 +3328,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setSelecting( bool? flag, { @@ -3052,6 +3342,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setSelectingMode( _i2.PlutoGridSelectingMode? selectingMode, { @@ -3065,6 +3356,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setAllCurrentSelecting() => super.noSuchMethod( Invocation.method( @@ -3073,6 +3365,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setCurrentSelectingPosition({ _i2.PlutoGridCellPosition? cellPosition, @@ -3089,6 +3382,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setCurrentSelectingPositionByCellKey( _i3.Key? cellKey, { @@ -3102,6 +3396,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => super.noSuchMethod( @@ -3111,6 +3406,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setCurrentSelectingRowsByRange( int? from, @@ -3128,6 +3424,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( Invocation.method( @@ -3137,6 +3434,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void toggleSelectingRow( int? rowIdx, { @@ -3150,6 +3448,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool isSelectingInteraction() => (super.noSuchMethod( Invocation.method( @@ -3159,6 +3458,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isSelectedRow(_i3.Key? rowKey) => (super.noSuchMethod( Invocation.method( @@ -3168,6 +3468,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isSelectedCell( _i2.PlutoCell? cell, @@ -3186,6 +3487,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void handleAfterSelectingRow( _i2.PlutoCell? cell, @@ -3201,6 +3503,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( Invocation.method( @@ -3210,6 +3513,44 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + + @override + void setIsHoveringRow( + bool? flag, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setIsHoveringRow, + [flag], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + + @override + void setHoveredRowIdx( + int? rowIdx, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setHoveredRowIdx, + [rowIdx], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + + @override + bool isRowIdxHovered(int? rowIdx) => (super.noSuchMethod( + Invocation.method( + #isRowIdxHovered, + [rowIdx], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); } /// A class which mocks [PlutoGridEventManager]. @@ -3229,6 +3570,7 @@ class MockPlutoGridEventManager extends _i1.Mock Invocation.getter(#stateManager), ), ) as _i2.PlutoGridStateManager); + @override _i4.PublishSubject<_i2.PlutoGridEvent> get subject => (super.noSuchMethod( Invocation.getter(#subject), @@ -3241,6 +3583,7 @@ class MockPlutoGridEventManager extends _i1.Mock Invocation.getter(#subject), ), ) as _i4.PublishSubject<_i2.PlutoGridEvent>); + @override _i6.StreamSubscription get subscription => (super.noSuchMethod( Invocation.getter(#subscription), @@ -3253,6 +3596,7 @@ class MockPlutoGridEventManager extends _i1.Mock Invocation.getter(#subscription), ), ) as _i6.StreamSubscription); + @override void dispose() => super.noSuchMethod( Invocation.method( @@ -3261,6 +3605,7 @@ class MockPlutoGridEventManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void init() => super.noSuchMethod( Invocation.method( @@ -3269,6 +3614,7 @@ class MockPlutoGridEventManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void addEvent(_i2.PlutoGridEvent? event) => super.noSuchMethod( Invocation.method( @@ -3277,6 +3623,7 @@ class MockPlutoGridEventManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i6.StreamSubscription<_i2.PlutoGridEvent> listener( void Function(_i2.PlutoGridEvent)? onData) => @@ -3317,6 +3664,7 @@ class MockPlutoGridScrollController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override set horizontal(_i2.LinkedScrollControllerGroup? _horizontal) => super.noSuchMethod( @@ -3326,30 +3674,35 @@ class MockPlutoGridScrollController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override double get maxScrollHorizontal => (super.noSuchMethod( Invocation.getter(#maxScrollHorizontal), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get maxScrollVertical => (super.noSuchMethod( Invocation.getter(#maxScrollVertical), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get verticalOffset => (super.noSuchMethod( Invocation.getter(#verticalOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get horizontalOffset => (super.noSuchMethod( Invocation.getter(#horizontalOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override void setBodyRowsHorizontal(_i3.ScrollController? scrollController) => super.noSuchMethod( @@ -3359,6 +3712,7 @@ class MockPlutoGridScrollController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setBodyRowsVertical(_i3.ScrollController? scrollController) => super.noSuchMethod( @@ -3381,6 +3735,7 @@ class MockPlutoGridKeyPressed extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get ctrl => (super.noSuchMethod( Invocation.getter(#ctrl), @@ -3400,6 +3755,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override _i3.ScrollController addAndGet() => (super.noSuchMethod( Invocation.method( @@ -3421,6 +3777,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock ), ), ) as _i3.ScrollController); + @override void addOffsetChangedListener(_i5.VoidCallback? onChanged) => super.noSuchMethod( @@ -3430,6 +3787,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeOffsetChangedListener(_i5.VoidCallback? listener) => super.noSuchMethod( @@ -3439,6 +3797,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i6.Future animateTo( double? offset, { @@ -3457,6 +3816,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); + @override void jumpTo(double? value) => super.noSuchMethod( Invocation.method( @@ -3465,6 +3825,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resetScroll() => super.noSuchMethod( Invocation.method( @@ -3473,6 +3834,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void applyViewportDimension(double? value) => super.noSuchMethod( Invocation.method( @@ -3481,6 +3843,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void notifyListeners() => super.noSuchMethod( Invocation.method( @@ -3501,24 +3864,28 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override double get initialScrollOffset => (super.noSuchMethod( Invocation.getter(#initialScrollOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override Iterable<_i3.ScrollPosition> get positions => (super.noSuchMethod( Invocation.getter(#positions), returnValue: <_i3.ScrollPosition>[], returnValueForMissingStub: <_i3.ScrollPosition>[], ) as Iterable<_i3.ScrollPosition>); + @override bool get hasClients => (super.noSuchMethod( Invocation.getter(#hasClients), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i3.ScrollPosition get position => (super.noSuchMethod( Invocation.getter(#position), @@ -3531,18 +3898,21 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { Invocation.getter(#position), ), ) as _i3.ScrollPosition); + @override double get offset => (super.noSuchMethod( Invocation.getter(#offset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i6.Future animateTo( double? offset, { @@ -3561,6 +3931,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); + @override void jumpTo(double? value) => super.noSuchMethod( Invocation.method( @@ -3569,6 +3940,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override void attach(_i3.ScrollPosition? position) => super.noSuchMethod( Invocation.method( @@ -3577,6 +3949,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override void detach(_i3.ScrollPosition? position) => super.noSuchMethod( Invocation.method( @@ -3585,6 +3958,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override void dispose() => super.noSuchMethod( Invocation.method( @@ -3593,6 +3967,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override _i3.ScrollPosition createScrollPosition( _i3.ScrollPhysics? physics, @@ -3631,6 +4006,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), ), ) as _i3.ScrollPosition); + @override void debugFillDescription(List? description) => super.noSuchMethod( Invocation.method( @@ -3639,6 +4015,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -3647,6 +4024,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -3655,6 +4033,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override void notifyListeners() => super.noSuchMethod( Invocation.method( @@ -3681,6 +4060,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { Invocation.getter(#physics), ), ) as _i3.ScrollPhysics); + @override _i3.ScrollContext get context => (super.noSuchMethod( Invocation.getter(#context), @@ -3693,12 +4073,14 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { Invocation.getter(#context), ), ) as _i3.ScrollContext); + @override bool get keepScrollOffset => (super.noSuchMethod( Invocation.getter(#keepScrollOffset), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i3.ValueNotifier get isScrollingNotifier => (super.noSuchMethod( Invocation.getter(#isScrollingNotifier), @@ -3711,120 +4093,147 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { Invocation.getter(#isScrollingNotifier), ), ) as _i3.ValueNotifier); + @override double get minScrollExtent => (super.noSuchMethod( Invocation.getter(#minScrollExtent), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get maxScrollExtent => (super.noSuchMethod( Invocation.getter(#maxScrollExtent), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override bool get hasContentDimensions => (super.noSuchMethod( Invocation.getter(#hasContentDimensions), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override double get pixels => (super.noSuchMethod( Invocation.getter(#pixels), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override bool get hasPixels => (super.noSuchMethod( Invocation.getter(#hasPixels), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override double get viewportDimension => (super.noSuchMethod( Invocation.getter(#viewportDimension), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override bool get hasViewportDimension => (super.noSuchMethod( Invocation.getter(#hasViewportDimension), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get haveDimensions => (super.noSuchMethod( Invocation.getter(#haveDimensions), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override double get devicePixelRatio => (super.noSuchMethod( Invocation.getter(#devicePixelRatio), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override bool get allowImplicitScrolling => (super.noSuchMethod( Invocation.getter(#allowImplicitScrolling), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override - _i9.ScrollDirection get userScrollDirection => (super.noSuchMethod( + _i10.ScrollDirection get userScrollDirection => (super.noSuchMethod( Invocation.getter(#userScrollDirection), - returnValue: _i9.ScrollDirection.idle, - returnValueForMissingStub: _i9.ScrollDirection.idle, - ) as _i9.ScrollDirection); + returnValue: _i10.ScrollDirection.idle, + returnValueForMissingStub: _i10.ScrollDirection.idle, + ) as _i10.ScrollDirection); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i3.AxisDirection get axisDirection => (super.noSuchMethod( Invocation.getter(#axisDirection), returnValue: _i3.AxisDirection.up, returnValueForMissingStub: _i3.AxisDirection.up, ) as _i3.AxisDirection); + @override _i3.Axis get axis => (super.noSuchMethod( Invocation.getter(#axis), returnValue: _i3.Axis.horizontal, returnValueForMissingStub: _i3.Axis.horizontal, ) as _i3.Axis); + @override bool get outOfRange => (super.noSuchMethod( Invocation.getter(#outOfRange), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get atEdge => (super.noSuchMethod( Invocation.getter(#atEdge), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override double get extentBefore => (super.noSuchMethod( Invocation.getter(#extentBefore), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get extentInside => (super.noSuchMethod( Invocation.getter(#extentInside), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override double get extentAfter => (super.noSuchMethod( Invocation.getter(#extentAfter), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + + @override + double get extentTotal => (super.noSuchMethod( + Invocation.getter(#extentTotal), + returnValue: 0.0, + returnValueForMissingStub: 0.0, + ) as double); + @override void absorb(_i3.ScrollPosition? other) => super.noSuchMethod( Invocation.method( @@ -3833,6 +4242,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override double setPixels(double? newPixels) => (super.noSuchMethod( Invocation.method( @@ -3842,6 +4252,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override void correctPixels(double? value) => super.noSuchMethod( Invocation.method( @@ -3850,6 +4261,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void correctBy(double? correction) => super.noSuchMethod( Invocation.method( @@ -3858,6 +4270,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void forcePixels(double? value) => super.noSuchMethod( Invocation.method( @@ -3866,6 +4279,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void saveScrollOffset() => super.noSuchMethod( Invocation.method( @@ -3874,6 +4288,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void restoreScrollOffset() => super.noSuchMethod( Invocation.method( @@ -3882,6 +4297,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void restoreOffset( double? offset, { @@ -3895,6 +4311,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void saveOffset() => super.noSuchMethod( Invocation.method( @@ -3903,6 +4320,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override double applyBoundaryConditions(double? value) => (super.noSuchMethod( Invocation.method( @@ -3912,6 +4330,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override bool applyViewportDimension(double? viewportDimension) => (super.noSuchMethod( Invocation.method( @@ -3921,6 +4340,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool applyContentDimensions( double? minScrollExtent, @@ -3937,6 +4357,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool correctForNewDimensions( _i3.ScrollMetrics? oldPosition, @@ -3953,6 +4374,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void applyNewDimensions() => super.noSuchMethod( Invocation.method( @@ -3961,6 +4383,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override _i6.Future ensureVisible( _i3.RenderObject? object, { @@ -3986,6 +4409,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); + @override _i6.Future animateTo( double? to, { @@ -4004,6 +4428,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); + @override void jumpTo(double? value) => super.noSuchMethod( Invocation.method( @@ -4012,6 +4437,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void pointerScroll(double? delta) => super.noSuchMethod( Invocation.method( @@ -4020,6 +4446,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override _i6.Future moveTo( double? to, { @@ -4040,6 +4467,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); + @override void jumpToWithoutSettling(double? value) => super.noSuchMethod( Invocation.method( @@ -4048,6 +4476,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override _i3.ScrollHoldController hold(_i5.VoidCallback? holdCancelCallback) => (super.noSuchMethod( @@ -4070,6 +4499,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), ), ) as _i3.ScrollHoldController); + @override _i7.Drag drag( _i3.DragStartDetails? details, @@ -4104,6 +4534,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), ), ) as _i7.Drag); + @override void beginActivity(_i3.ScrollActivity? newActivity) => super.noSuchMethod( Invocation.method( @@ -4112,6 +4543,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void didStartScroll() => super.noSuchMethod( Invocation.method( @@ -4120,6 +4552,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void didUpdateScrollPositionBy(double? delta) => super.noSuchMethod( Invocation.method( @@ -4128,6 +4561,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void didEndScroll() => super.noSuchMethod( Invocation.method( @@ -4136,6 +4570,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void didOverscrollBy(double? value) => super.noSuchMethod( Invocation.method( @@ -4144,8 +4579,9 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override - void didUpdateScrollDirection(_i9.ScrollDirection? direction) => + void didUpdateScrollDirection(_i10.ScrollDirection? direction) => super.noSuchMethod( Invocation.method( #didUpdateScrollDirection, @@ -4153,6 +4589,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void didUpdateScrollMetrics() => super.noSuchMethod( Invocation.method( @@ -4161,6 +4598,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override bool recommendDeferredLoading(_i3.BuildContext? context) => (super.noSuchMethod( @@ -4171,6 +4609,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void dispose() => super.noSuchMethod( Invocation.method( @@ -4179,6 +4618,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void notifyListeners() => super.noSuchMethod( Invocation.method( @@ -4187,6 +4627,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void debugFillDescription(List? description) => super.noSuchMethod( Invocation.method( @@ -4195,6 +4636,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -4203,6 +4645,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -4211,6 +4654,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override _i3.ScrollMetrics copyWith({ double? minScrollExtent, @@ -4277,6 +4721,7 @@ class MockStreamSubscription extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i6.Future cancel() => (super.noSuchMethod( Invocation.method( @@ -4286,6 +4731,7 @@ class MockStreamSubscription extends _i1.Mock returnValue: _i6.Future.value(), returnValueForMissingStub: _i6.Future.value(), ) as _i6.Future); + @override void onData(void Function(T)? handleData) => super.noSuchMethod( Invocation.method( @@ -4294,6 +4740,7 @@ class MockStreamSubscription extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void onError(Function? handleError) => super.noSuchMethod( Invocation.method( @@ -4302,6 +4749,7 @@ class MockStreamSubscription extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void onDone(void Function()? handleDone) => super.noSuchMethod( Invocation.method( @@ -4310,6 +4758,7 @@ class MockStreamSubscription extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void pause([_i6.Future? resumeSignal]) => super.noSuchMethod( Invocation.method( @@ -4318,6 +4767,7 @@ class MockStreamSubscription extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resume() => super.noSuchMethod( Invocation.method( @@ -4326,26 +4776,47 @@ class MockStreamSubscription extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i6.Future asFuture([E? futureValue]) => (super.noSuchMethod( Invocation.method( #asFuture, [futureValue], ), - returnValue: _FakeFuture_29( - this, - Invocation.method( - #asFuture, - [futureValue], - ), - ), - returnValueForMissingStub: _FakeFuture_29( - this, - Invocation.method( - #asFuture, - [futureValue], - ), - ), + returnValue: _i9.ifNotNull( + _i9.dummyValueOrNull( + this, + Invocation.method( + #asFuture, + [futureValue], + ), + ), + (E v) => _i6.Future.value(v), + ) ?? + _FakeFuture_29( + this, + Invocation.method( + #asFuture, + [futureValue], + ), + ), + returnValueForMissingStub: _i9.ifNotNull( + _i9.dummyValueOrNull( + this, + Invocation.method( + #asFuture, + [futureValue], + ), + ), + (E v) => _i6.Future.value(v), + ) ?? + _FakeFuture_29( + this, + Invocation.method( + #asFuture, + [futureValue], + ), + ), ) as _i6.Future); } @@ -4361,6 +4832,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override set onKeyEvent(_i3.FocusOnKeyEventCallback? _onKeyEvent) => super.noSuchMethod( @@ -4370,12 +4842,14 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override bool get skipTraversal => (super.noSuchMethod( Invocation.getter(#skipTraversal), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override set skipTraversal(bool? value) => super.noSuchMethod( Invocation.setter( @@ -4384,12 +4858,14 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override bool get canRequestFocus => (super.noSuchMethod( Invocation.getter(#canRequestFocus), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override set canRequestFocus(bool? value) => super.noSuchMethod( Invocation.setter( @@ -4398,12 +4874,14 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override bool get descendantsAreFocusable => (super.noSuchMethod( Invocation.getter(#descendantsAreFocusable), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override set descendantsAreFocusable(bool? value) => super.noSuchMethod( Invocation.setter( @@ -4412,12 +4890,14 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override bool get descendantsAreTraversable => (super.noSuchMethod( Invocation.getter(#descendantsAreTraversable), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override set descendantsAreTraversable(bool? value) => super.noSuchMethod( Invocation.setter( @@ -4426,18 +4906,21 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override Iterable<_i3.FocusNode> get children => (super.noSuchMethod( Invocation.getter(#children), returnValue: <_i3.FocusNode>[], returnValueForMissingStub: <_i3.FocusNode>[], ) as Iterable<_i3.FocusNode>); + @override Iterable<_i3.FocusNode> get traversalChildren => (super.noSuchMethod( Invocation.getter(#traversalChildren), returnValue: <_i3.FocusNode>[], returnValueForMissingStub: <_i3.FocusNode>[], ) as Iterable<_i3.FocusNode>); + @override set debugLabel(String? value) => super.noSuchMethod( Invocation.setter( @@ -4446,42 +4929,49 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override Iterable<_i3.FocusNode> get descendants => (super.noSuchMethod( Invocation.getter(#descendants), returnValue: <_i3.FocusNode>[], returnValueForMissingStub: <_i3.FocusNode>[], ) as Iterable<_i3.FocusNode>); + @override Iterable<_i3.FocusNode> get traversalDescendants => (super.noSuchMethod( Invocation.getter(#traversalDescendants), returnValue: <_i3.FocusNode>[], returnValueForMissingStub: <_i3.FocusNode>[], ) as Iterable<_i3.FocusNode>); + @override Iterable<_i3.FocusNode> get ancestors => (super.noSuchMethod( Invocation.getter(#ancestors), returnValue: <_i3.FocusNode>[], returnValueForMissingStub: <_i3.FocusNode>[], ) as Iterable<_i3.FocusNode>); + @override bool get hasFocus => (super.noSuchMethod( Invocation.getter(#hasFocus), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get hasPrimaryFocus => (super.noSuchMethod( Invocation.getter(#hasPrimaryFocus), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i3.FocusHighlightMode get highlightMode => (super.noSuchMethod( Invocation.getter(#highlightMode), returnValue: _i3.FocusHighlightMode.touch, returnValueForMissingStub: _i3.FocusHighlightMode.touch, ) as _i3.FocusHighlightMode); + @override _i5.Size get size => (super.noSuchMethod( Invocation.getter(#size), @@ -4494,6 +4984,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { Invocation.getter(#size), ), ) as _i5.Size); + @override _i5.Offset get offset => (super.noSuchMethod( Invocation.getter(#offset), @@ -4506,6 +4997,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { Invocation.getter(#offset), ), ) as _i5.Offset); + @override _i5.Rect get rect => (super.noSuchMethod( Invocation.getter(#rect), @@ -4518,12 +5010,14 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { Invocation.getter(#rect), ), ) as _i5.Rect); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void unfocus( {_i3.UnfocusDisposition? disposition = @@ -4536,6 +5030,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override bool consumeKeyboardToken() => (super.noSuchMethod( Invocation.method( @@ -4545,6 +5040,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i3.FocusAttachment attach( _i3.BuildContext? context, { @@ -4583,6 +5079,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), ), ) as _i3.FocusAttachment); + @override void dispose() => super.noSuchMethod( Invocation.method( @@ -4591,6 +5088,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override void requestFocus([_i3.FocusNode? node]) => super.noSuchMethod( Invocation.method( @@ -4599,6 +5097,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override bool nextFocus() => (super.noSuchMethod( Invocation.method( @@ -4608,6 +5107,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool previousFocus() => (super.noSuchMethod( Invocation.method( @@ -4617,6 +5117,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool focusInDirection(_i3.TraversalDirection? direction) => (super.noSuchMethod( @@ -4627,8 +5128,9 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override - void debugFillProperties(_i10.DiagnosticPropertiesBuilder? properties) => + void debugFillProperties(_i11.DiagnosticPropertiesBuilder? properties) => super.noSuchMethod( Invocation.method( #debugFillProperties, @@ -4636,6 +5138,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override List<_i3.DiagnosticsNode> debugDescribeChildren() => (super.noSuchMethod( Invocation.method( @@ -4645,18 +5148,33 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { returnValue: <_i3.DiagnosticsNode>[], returnValueForMissingStub: <_i3.DiagnosticsNode>[], ) as List<_i3.DiagnosticsNode>); + @override String toStringShort() => (super.noSuchMethod( Invocation.method( #toStringShort, [], ), - returnValue: '', - returnValueForMissingStub: '', + returnValue: _i9.dummyValue( + this, + Invocation.method( + #toStringShort, + [], + ), + ), + returnValueForMissingStub: _i9.dummyValue( + this, + Invocation.method( + #toStringShort, + [], + ), + ), ) as String); + @override String toString({_i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.info}) => super.toString(); + @override String toStringShallow({ String? joiner = r', ', @@ -4671,9 +5189,30 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { #minLevel: minLevel, }, ), - returnValue: '', - returnValueForMissingStub: '', + returnValue: _i9.dummyValue( + this, + Invocation.method( + #toStringShallow, + [], + { + #joiner: joiner, + #minLevel: minLevel, + }, + ), + ), + returnValueForMissingStub: _i9.dummyValue( + this, + Invocation.method( + #toStringShallow, + [], + { + #joiner: joiner, + #minLevel: minLevel, + }, + ), + ), ) as String); + @override String toStringDeep({ String? prefixLineOne = r'', @@ -4690,13 +5229,36 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { #minLevel: minLevel, }, ), - returnValue: '', - returnValueForMissingStub: '', + returnValue: _i9.dummyValue( + this, + Invocation.method( + #toStringDeep, + [], + { + #prefixLineOne: prefixLineOne, + #prefixOtherLines: prefixOtherLines, + #minLevel: minLevel, + }, + ), + ), + returnValueForMissingStub: _i9.dummyValue( + this, + Invocation.method( + #toStringDeep, + [], + { + #prefixLineOne: prefixLineOne, + #prefixOtherLines: prefixOtherLines, + #minLevel: minLevel, + }, + ), + ), ) as String); + @override _i3.DiagnosticsNode toDiagnosticsNode({ String? name, - _i11.DiagnosticsTreeStyle? style, + _i12.DiagnosticsTreeStyle? style, }) => (super.noSuchMethod( Invocation.method( @@ -4730,6 +5292,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), ), ) as _i3.DiagnosticsNode); + @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -4738,6 +5301,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -4746,6 +5310,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override void notifyListeners() => super.noSuchMethod( Invocation.method( diff --git a/test/src/manager/state/hovering_row_state_test.dart b/test/src/manager/state/hovering_row_state_test.dart new file mode 100644 index 000000000..6c2ee6f1e --- /dev/null +++ b/test/src/manager/state/hovering_row_state_test.dart @@ -0,0 +1,163 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/mockito.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; + +import '../../../helper/column_helper.dart'; +import '../../../helper/row_helper.dart'; +import '../../../mock/mock_methods.dart'; +import '../../../mock/shared_mocks.mocks.dart'; + +void main() { + late List columns; + + late List rows; + + late PlutoGridStateManager stateManager; + + MockMethods? listener; + + setUp(() { + columns = [ + ...ColumnHelper.textColumn('column', count: 1, width: 150), + ]; + + rows = RowHelper.count(10, columns); + + stateManager = PlutoGridStateManager( + columns: columns, + rows: rows, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), + ); + + listener = MockMethods(); + + stateManager.addListener(listener!.noParamReturnVoid); + }); + + group('setIsHoveringRow', () { + test( + 'If the existing isHovering value is identical' + 'to the value to be changed, notifyListeners should not be called.', + () { + // given + expect(stateManager.isHoveringRow, isFalse); + + // when + stateManager.setIsHoveringRow(false); + + // then + verifyNever(listener!.noParamReturnVoid()); + }, + ); + + test( + 'If the existing isHovering value is different from' + 'the value you want to change, notifyListeners should be called.', + () { + // given + expect(stateManager.isHoveringRow, isFalse); + + // when + stateManager.setIsHoveringRow(true); + + // then + expect(stateManager.isHoveringRow, isTrue); + verify(listener!.noParamReturnVoid()).called(1); + }, + ); + + test( + 'If the existing isHovering value is different from' + 'the value you want to change, but notify is false, ' + 'then notifyListeners should not be called.', + () { + // given + expect(stateManager.isHoveringRow, isFalse); + + // when + stateManager.setIsHoveringRow(true, notify: false); + + // then + expect(stateManager.isHoveringRow, isTrue); + verifyNever(listener!.noParamReturnVoid()); + }, + ); + }); + + group('setHoveredRowIdx', () { + test( + 'If the rowIdx passed as an argument is the same as' + 'hoveredRowIdx, then notifyListeners should not be called.', + () { + // given + stateManager.setHoveredRowIdx(1); + expect(stateManager.hoveredRowIdx, 1); + + // when + clearInteractions(listener); + stateManager.setHoveredRowIdx(1); + + // then + verifyNever(listener!.noParamReturnVoid()); + }, + ); + + test( + 'If the rowIdx passed as an argument is different from ' + 'hoveredRowIdx, notifyListeners should be called.', + () { + // given + stateManager.setHoveredRowIdx(1); + expect(stateManager.hoveredRowIdx, 1); + + // when + clearInteractions(listener); + stateManager.setHoveredRowIdx(2); + + // then + expect(stateManager.hoveredRowIdx, 2); + verify(listener!.noParamReturnVoid()).called(1); + }, + ); + + test( + 'If the rowIdx passed as an argument is different from ' + 'hoveredRowIdx, but notify is false,' + 'notifyListeners should not be called.', + () { + // given + stateManager.setHoveredRowIdx(1); + expect(stateManager.hoveredRowIdx, 1); + + // when + clearInteractions(listener); + stateManager.setHoveredRowIdx(2, notify: false); + + // then + expect(stateManager.hoveredRowIdx, 2); + verifyNever(listener!.noParamReturnVoid()); + }, + ); + }); + + group('isRowIdxHovered', () { + const int givenHoveredRowIdx = 3; + + setUp(() { + stateManager.setHoveredRowIdx(givenHoveredRowIdx); + }); + + test('If rowIdx is null, false should be returned.', () { + expect(stateManager.isRowIdxHovered(null), isFalse); + }); + + + test('should return true if rowIdx is equal to the given rowIdx.', () { + expect( + stateManager.isRowIdxHovered(givenHoveredRowIdx), + isTrue, + ); + }); + }); +} From 8ca1d0d78ade9ae1b16b5f32715edefc2c8f283a Mon Sep 17 00:00:00 2001 From: coruscant187 Date: Mon, 1 Apr 2024 21:03:44 +0200 Subject: [PATCH 32/80] moved hover logic: added: - added enableRowHoverColor option to configuration changed: - modified tests for hovering rows feature - simplified IHoveringState and HoveringState - moved MouseRegion from pluto_base_cell.dart to pluto_base_row.dart because it was not working before and is the more appropriate place --- .../event/pluto_grid_cell_gesture_event.dart | 34 +------ .../event/pluto_grid_row_hover_event.dart | 48 ++++++++++ .../manager/pluto_change_notifier_filter.dart | 1 - lib/src/manager/state/hovering_state.dart | 39 +++----- lib/src/pluto_grid_configuration.dart | 10 +++ lib/src/pluto_grid_events.dart | 4 - lib/src/ui/pluto_base_cell.dart | 90 +++++-------------- lib/src/ui/pluto_base_row.dart | 41 +++++++-- .../state/hovering_row_state_test.dart | 62 ++----------- 9 files changed, 135 insertions(+), 194 deletions(-) create mode 100644 lib/src/manager/event/pluto_grid_row_hover_event.dart diff --git a/lib/src/manager/event/pluto_grid_cell_gesture_event.dart b/lib/src/manager/event/pluto_grid_cell_gesture_event.dart index 7fc3fe305..10b23f1f1 100644 --- a/lib/src/manager/event/pluto_grid_cell_gesture_event.dart +++ b/lib/src/manager/event/pluto_grid_cell_gesture_event.dart @@ -38,12 +38,6 @@ class PlutoGridCellGestureEvent extends PlutoGridEvent { case PlutoGridGestureType.onSecondaryTap: _onSecondaryTap(stateManager); break; - case PlutoGridGestureType.onEnter: - _onEnter(stateManager); - break; - case PlutoGridGestureType.onExit: - _onExit(stateManager); - break; default: } } @@ -122,26 +116,6 @@ class PlutoGridCellGestureEvent extends PlutoGridEvent { ); } - void _onEnter(PlutoGridStateManager stateManager) { - stateManager.onRowEnter!( - PlutoGridOnRowEnterEvent( - row: stateManager.getRowByIdx(rowIdx), - rowIdx: rowIdx, - cell: cell, - ), - ); - } - - void _onExit(PlutoGridStateManager stateManager) { - stateManager.onRowExit!( - PlutoGridOnRowExitEvent( - row: stateManager.getRowByIdx(rowIdx), - rowIdx: rowIdx, - cell: cell, - ), - ); - } - bool _setKeepFocusAndCurrentCell(PlutoGridStateManager stateManager) { if (stateManager.hasFocus) { return false; @@ -216,9 +190,7 @@ enum PlutoGridGestureType { onLongPressMoveUpdate, onLongPressEnd, onDoubleTap, - onSecondaryTap, - onEnter, - onExit; + onSecondaryTap; bool get isOnTapUp => this == PlutoGridGestureType.onTapUp; @@ -232,8 +204,4 @@ enum PlutoGridGestureType { bool get isOnDoubleTap => this == PlutoGridGestureType.onDoubleTap; bool get isOnSecondaryTap => this == PlutoGridGestureType.onSecondaryTap; - - bool get isOnEnter => this == PlutoGridGestureType.onEnter; - - bool get isOnExit => this == PlutoGridGestureType.onExit; } diff --git a/lib/src/manager/event/pluto_grid_row_hover_event.dart b/lib/src/manager/event/pluto_grid_row_hover_event.dart new file mode 100644 index 000000000..4987d459f --- /dev/null +++ b/lib/src/manager/event/pluto_grid_row_hover_event.dart @@ -0,0 +1,48 @@ +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; + +/// [PlutoRow] This event handles the hover status of the widget. +class PlutoGridRowHoverEvent extends PlutoGridEvent { + final int rowIdx; + bool isHovered; + + PlutoGridRowHoverEvent({ + required this.rowIdx, + required this.isHovered, + }); + + @override + void handler(PlutoGridStateManager stateManager) { + bool enableRowHoverColor = stateManager.configuration.style.enableRowHoverColor; + + // only change current hovered row index + // if row hover color effect is enabled + if (enableRowHoverColor) { + // set the hovered row index to either the row index or null + if (isHovered == true) { + stateManager.setHoveredRowIdx(rowIdx, notify: true); + } else { + stateManager.setHoveredRowIdx(null, notify: true); + } + } + + // call the onRowEnter callback if it is not null + if (stateManager.onRowEnter != null && isHovered == true) { + stateManager.onRowEnter!( + PlutoGridOnRowEnterEvent( + row: stateManager.getRowByIdx(rowIdx), + rowIdx: rowIdx, + ), + ); + } + + // call the onRowExit callback if it is not null + if (stateManager.onRowExit != null && isHovered == false) { + stateManager.onRowExit!( + PlutoGridOnRowExitEvent( + row: stateManager.getRowByIdx(rowIdx), + rowIdx: rowIdx, + ), + ); + } + } +} diff --git a/lib/src/manager/pluto_change_notifier_filter.dart b/lib/src/manager/pluto_change_notifier_filter.dart index 4c6dbb192..53bf45528 100644 --- a/lib/src/manager/pluto_change_notifier_filter.dart +++ b/lib/src/manager/pluto_change_notifier_filter.dart @@ -147,7 +147,6 @@ abstract class PlutoChangeNotifierFilterResolver { stateManager.handleAfterSelectingRow.hashCode: 'handleAfterSelectingRow', /// hovering_state - stateManager.setIsHoveringRow.hashCode: 'setIsHoveringRow', stateManager.setHoveredRowIdx.hashCode: 'setHoveredRowIdx', stateManager.isRowIdxHovered.hashCode: 'isRowIdxHovered', }; diff --git a/lib/src/manager/state/hovering_state.dart b/lib/src/manager/state/hovering_state.dart index 59c5478c4..59b30b646 100644 --- a/lib/src/manager/state/hovering_state.dart +++ b/lib/src/manager/state/hovering_state.dart @@ -2,17 +2,10 @@ import 'package:pluto_grid_plus/pluto_grid_plus.dart'; abstract class IHoveringState { - bool get isHoveringRow; - int? get hoveredRowIdx; - void setIsHoveringRow( - bool flag, - {bool notify = true} - ); - void setHoveredRowIdx( - int rowIdx, + int? rowIdx, {bool notify = true} ); @@ -20,34 +13,15 @@ abstract class IHoveringState { } class _State { - bool _isHoveringRow = false; - int? _hoverRowIdx; } mixin HoveringState implements IPlutoGridState { final _State _state = _State(); - @override - bool get isHoveringRow => _state._isHoveringRow; - @override int? get hoveredRowIdx => _state._hoverRowIdx; - @override - void setIsHoveringRow( - bool flag, - {bool notify = true,} - ) { - if (isHoveringRow == flag) { - return; - } - - _state._isHoveringRow = flag; - - notifyListeners(notify, setIsHoveringRow.hashCode); - } - @override void setHoveredRowIdx( int? rowIdx, @@ -63,7 +37,14 @@ mixin HoveringState implements IPlutoGridState { } @override - bool isRowIdxHovered(int? rowIdx) { - return rowIdx != null && hoveredRowIdx != null; + bool isRowIdxHovered(int rowIdx) { + if (hoveredRowIdx == null) { + return false; + } + if (hoveredRowIdx == rowIdx) { + return true; + } else { + return false; + } } } diff --git a/lib/src/pluto_grid_configuration.dart b/lib/src/pluto_grid_configuration.dart index b4e2ce8a0..4151fb752 100644 --- a/lib/src/pluto_grid_configuration.dart +++ b/lib/src/pluto_grid_configuration.dart @@ -198,6 +198,7 @@ class PlutoGridStyleConfig { this.enableCellBorderVertical = true, this.enableCellBorderHorizontal = true, this.enableRowColorAnimation = false, + this.enableRowHoverColor = false, this.gridBackgroundColor = Colors.white, this.rowColor = Colors.white, this.oddRowColor, @@ -270,6 +271,7 @@ class PlutoGridStyleConfig { this.enableCellBorderVertical = true, this.enableCellBorderHorizontal = true, this.enableRowColorAnimation = false, + this.enableRowHoverColor = false, this.gridBackgroundColor = const Color(0xFF111111), this.rowColor = const Color(0xFF111111), this.oddRowColor, @@ -354,6 +356,14 @@ class PlutoGridStyleConfig { /// such as when the current row or rows are dragged. final bool enableRowColorAnimation; + /// Hover effect on rows. + /// If true, the background color of the row changes to [rowHoveredColor] + /// when the mouse hovers over it. + /// If false, the background color of the row does not change and + /// the background color of the row is the same as [rowColor]. + /// [rowHoveredColor] is therefore not used. + final bool enableRowHoverColor; + final Color gridBackgroundColor; /// Default row background color diff --git a/lib/src/pluto_grid_events.dart b/lib/src/pluto_grid_events.dart index 1418b0ef7..eb0740423 100644 --- a/lib/src/pluto_grid_events.dart +++ b/lib/src/pluto_grid_events.dart @@ -176,12 +176,10 @@ class PlutoGridOnRowSecondaryTapEvent { class PlutoGridOnRowEnterEvent { final PlutoRow? row; final int? rowIdx; - final PlutoCell cell; const PlutoGridOnRowEnterEvent({ this.row, this.rowIdx, - required this.cell, }); } @@ -190,12 +188,10 @@ class PlutoGridOnRowEnterEvent { class PlutoGridOnRowExitEvent { final PlutoRow? row; final int? rowIdx; - final PlutoCell cell; const PlutoGridOnRowExitEvent({ this.row, this.rowIdx, - required this.cell, }); } diff --git a/lib/src/ui/pluto_base_cell.dart b/lib/src/ui/pluto_base_cell.dart index 0550b841a..106c14c34 100644 --- a/lib/src/ui/pluto_base_cell.dart +++ b/lib/src/ui/pluto_base_cell.dart @@ -1,4 +1,3 @@ -import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid_plus/pluto_grid_plus.dart'; @@ -94,30 +93,6 @@ class PlutoBaseCell extends StatelessWidget ); } - void _handleOnEnter(PointerEnterEvent event) { - _addGestureEvent( - PlutoGridGestureType.onEnter, - Offset.zero, - ); - // set hovering row to true - stateManager.setIsHoveringRow(true, notify: true); - - // set hovered row index - stateManager.setHoveredRowIdx(rowIdx, notify: true); - } - - void _handleOnExit(PointerExitEvent event) { - _addGestureEvent( - PlutoGridGestureType.onExit, - Offset.zero, - ); - // set hovering row to false - stateManager.setIsHoveringRow(false, notify: true); - - // set hovered row index to null - stateManager.setHoveredRowIdx(null, notify: true); - } - void Function()? _onDoubleTapOrNull() { return stateManager.onRowDoubleTap == null ? null : _handleOnDoubleTap; } @@ -128,53 +103,32 @@ class PlutoBaseCell extends StatelessWidget : _handleOnSecondaryTap; } - void Function(PointerEnterEvent event)? _onEnterOrNull() { - return stateManager.onRowEnter == null - ? null - : _handleOnEnter; - } - - void Function(PointerExitEvent event)? _onExitOrNull() { - return stateManager.onRowExit == null - ? null - : _handleOnExit; - } - @override Widget build(BuildContext context) { - return MouseRegion( - // Event is triggered when mouse enters the cell, - // which is used for hover logic - onEnter: _onEnterOrNull(), - // Event is triggered when mouse leaves the cell, - // which is used for hover logic - onExit: _onExitOrNull(), - - child: GestureDetector( - behavior: HitTestBehavior.translucent, - // Essential gestures. - onTapUp: _handleOnTapUp, - onLongPressStart: _handleOnLongPressStart, - onLongPressMoveUpdate: _handleOnLongPressMoveUpdate, - onLongPressEnd: _handleOnLongPressEnd, - // Optional gestures. - onDoubleTap: _onDoubleTapOrNull(), - onSecondaryTapDown: _onSecondaryTapOrNull(), - child: _CellContainer( - cell: cell, + return GestureDetector( + behavior: HitTestBehavior.translucent, + // Essential gestures. + onTapUp: _handleOnTapUp, + onLongPressStart: _handleOnLongPressStart, + onLongPressMoveUpdate: _handleOnLongPressMoveUpdate, + onLongPressEnd: _handleOnLongPressEnd, + // Optional gestures. + onDoubleTap: _onDoubleTapOrNull(), + onSecondaryTapDown: _onSecondaryTapOrNull(), + child: _CellContainer( + cell: cell, + rowIdx: rowIdx, + row: row, + column: column, + cellPadding: column.cellPadding ?? + stateManager.configuration.style.defaultCellPadding, + stateManager: stateManager, + child: _Cell( + stateManager: stateManager, rowIdx: rowIdx, - row: row, column: column, - cellPadding: column.cellPadding ?? - stateManager.configuration.style.defaultCellPadding, - stateManager: stateManager, - child: _Cell( - stateManager: stateManager, - rowIdx: rowIdx, - column: column, - row: row, - cell: cell, - ), + row: row, + cell: cell, ), ), ); diff --git a/lib/src/ui/pluto_base_row.dart b/lib/src/ui/pluto_base_row.dart index f0796f1a2..bb8bce4fd 100644 --- a/lib/src/ui/pluto_base_row.dart +++ b/lib/src/ui/pluto_base_row.dart @@ -1,6 +1,7 @@ import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid_plus/pluto_grid_plus.dart'; +import 'package:pluto_grid_plus/src/manager/event/pluto_grid_row_hover_event.dart'; import 'ui.dart'; @@ -108,12 +109,37 @@ class PlutoBaseRow extends StatelessWidget { ); } + void _handleOnEnter() { + // set hovered row index + stateManager.eventManager!.addEvent( + PlutoGridRowHoverEvent( + rowIdx: rowIdx, + isHovered: true, + ), + ); + } + + void _handleOnExit() { + // reset hovered row index + stateManager.eventManager!.addEvent( + PlutoGridRowHoverEvent( + rowIdx: rowIdx, + isHovered: false, + ), + ); + } + @override Widget build(BuildContext context) { - return DragTarget( - onWillAccept: _handleOnWillAccept, - onAccept: _handleOnAccept, - builder: _dragTargetBuilder, + return MouseRegion ( + onEnter: (event) => _handleOnEnter(), + onExit: (event) => _handleOnExit(), + + child: DragTarget( + onWillAccept: _handleOnWillAccept, + onAccept: _handleOnAccept, + builder: _dragTargetBuilder, + ), ); } } @@ -272,7 +298,12 @@ class _RowContainerWidgetState extends PlutoStateWithChange<_RowContainerWidget> if (checkCurrentRow || checkSelectedRow) { color = stateManager.configuration.style.activatedColor; } else { - if (isHovered) { + // If the row is checked, the hover color is not applied. + // If the row is hovered and hover color is enabled, + // the configuration hover color is used. + bool enableRowHoverColor = + stateManager.configuration.style.enableRowHoverColor; + if (isHovered && enableRowHoverColor) { color = stateManager.configuration.style.rowHoveredColor; } } diff --git a/test/src/manager/state/hovering_row_state_test.dart b/test/src/manager/state/hovering_row_state_test.dart index 6c2ee6f1e..da52c2540 100644 --- a/test/src/manager/state/hovering_row_state_test.dart +++ b/test/src/manager/state/hovering_row_state_test.dart @@ -35,56 +35,6 @@ void main() { stateManager.addListener(listener!.noParamReturnVoid); }); - group('setIsHoveringRow', () { - test( - 'If the existing isHovering value is identical' - 'to the value to be changed, notifyListeners should not be called.', - () { - // given - expect(stateManager.isHoveringRow, isFalse); - - // when - stateManager.setIsHoveringRow(false); - - // then - verifyNever(listener!.noParamReturnVoid()); - }, - ); - - test( - 'If the existing isHovering value is different from' - 'the value you want to change, notifyListeners should be called.', - () { - // given - expect(stateManager.isHoveringRow, isFalse); - - // when - stateManager.setIsHoveringRow(true); - - // then - expect(stateManager.isHoveringRow, isTrue); - verify(listener!.noParamReturnVoid()).called(1); - }, - ); - - test( - 'If the existing isHovering value is different from' - 'the value you want to change, but notify is false, ' - 'then notifyListeners should not be called.', - () { - // given - expect(stateManager.isHoveringRow, isFalse); - - // when - stateManager.setIsHoveringRow(true, notify: false); - - // then - expect(stateManager.isHoveringRow, isTrue); - verifyNever(listener!.noParamReturnVoid()); - }, - ); - }); - group('setHoveredRowIdx', () { test( 'If the rowIdx passed as an argument is the same as' @@ -148,15 +98,19 @@ void main() { stateManager.setHoveredRowIdx(givenHoveredRowIdx); }); - test('If rowIdx is null, false should be returned.', () { - expect(stateManager.isRowIdxHovered(null), isFalse); + test('should return true if rowIdx is equal to the given rowIdx.', () { + expect( + stateManager.isRowIdxHovered(givenHoveredRowIdx), + isTrue, + ); }); + test('should return false if hoveredRowIdx is null.', () { + stateManager.setHoveredRowIdx(null); - test('should return true if rowIdx is equal to the given rowIdx.', () { expect( stateManager.isRowIdxHovered(givenHoveredRowIdx), - isTrue, + isFalse, ); }); }); From d8a8053f41cbdabbd36b462d2c49cf4483afed36 Mon Sep 17 00:00:00 2001 From: coruscant187 Date: Mon, 1 Apr 2024 21:09:31 +0200 Subject: [PATCH 33/80] modified CHANGELOG.md, contributor tile and version --- CHANGELOG.md | 6 ++++++ README.md | 2 +- demo/lib/screen/home_screen.dart | 7 +++++++ packages/pluto_grid_plus_export/pubspec.yaml | 2 +- pubspec.yaml | 2 +- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b02d8e3f3..337004104 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [8.4.0] - 2024. 04. 01 + + +* Added onRowEnter, onRowExit callbacks to react on. @coruscant187 +* Added logic to change background color of row if hovered. @coruscant187 doonfrs/pluto_grid_plus#29 + ## [8.3.1] - 2024. 03. 19 * upgrade packages to latest major version diff --git a/README.md b/README.md index 4fe66c50d..19db718a0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## PlutoGrid Plus for flutter - v8.3.0 +## PlutoGrid Plus for flutter - v8.4.0 PlutoGrid Plus is a maintained version of https://github.com/bosskmk/pluto_grid [![Awesome Flutter](https://img.shields.io/badge/Awesome-Flutter-blue.svg)](https://github.com/Solido/awesome-flutter) diff --git a/demo/lib/screen/home_screen.dart b/demo/lib/screen/home_screen.dart index 1042bd04d..95fd1cc76 100644 --- a/demo/lib/screen/home_screen.dart +++ b/demo/lib/screen/home_screen.dart @@ -697,6 +697,13 @@ class PlutoContributors extends StatelessWidget { launchUrl('https://github.com/sidlatau'); }, ), + PlutoContributorTile( + name: 'coruscant187', + linkTitle: 'Github', + onTapLink: () { + launchUrl('https://github.com/coruscant187'); + }, + ), PlutoContributorTile.invisible( name: 'And you.', linkTitle: 'Github', diff --git a/packages/pluto_grid_plus_export/pubspec.yaml b/packages/pluto_grid_plus_export/pubspec.yaml index 4e3450575..1b783c9d9 100644 --- a/packages/pluto_grid_plus_export/pubspec.yaml +++ b/packages/pluto_grid_plus_export/pubspec.yaml @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: ^8.3.0 + pluto_grid_plus: ^8.4.0 csv: ^6.0.0 pdf: ^3.10.7 printing: ^5.11.1 diff --git a/pubspec.yaml b/pubspec.yaml index 547eb617d..5b7d58d3e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pluto_grid_plus description: PlutoGrid plus is a maintained version of PlutoGrid, PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS. (DataGrid, DataTable, Data Grid, Data Table, Sticky) -version: 8.3.1 +version: 8.4.0 homepage: https://pluto.weblaze.dev repository: https://github.com/doonfrs/pluto_grid_plus From 8e54396b4ccc2b1eee0c02e97c73fd9bf6f6d6a1 Mon Sep 17 00:00:00 2001 From: Sokcevic <40267209+Sokcevic@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:01:44 +0200 Subject: [PATCH 34/80] Update pluto_lazy_pagination.dart, Check if bodyRowsVertical has any Clients to prevent Exceptions caused by async events --- lib/src/plugin/pluto_lazy_pagination.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/plugin/pluto_lazy_pagination.dart b/lib/src/plugin/pluto_lazy_pagination.dart index e8299d3f5..cfa1b65a5 100644 --- a/lib/src/plugin/pluto_lazy_pagination.dart +++ b/lib/src/plugin/pluto_lazy_pagination.dart @@ -180,6 +180,7 @@ class _PlutoLazyPaginationState extends State { ), ) .then((data) { + if(!stateManager.scroll.bodyRowsVertical!.hasClients)return; stateManager.scroll.bodyRowsVertical!.jumpTo(0); stateManager.refRows.clearFromOriginal(); From 3f7a4f8e1078448eb5e526c8ebdf983c74fe1d1c Mon Sep 17 00:00:00 2001 From: Sokcevic <40267209+Sokcevic@users.noreply.github.com> Date: Mon, 15 Apr 2024 08:00:21 +0200 Subject: [PATCH 35/80] Fix --- lib/src/plugin/pluto_lazy_pagination.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/plugin/pluto_lazy_pagination.dart b/lib/src/plugin/pluto_lazy_pagination.dart index cfa1b65a5..6126c8cc4 100644 --- a/lib/src/plugin/pluto_lazy_pagination.dart +++ b/lib/src/plugin/pluto_lazy_pagination.dart @@ -180,7 +180,7 @@ class _PlutoLazyPaginationState extends State { ), ) .then((data) { - if(!stateManager.scroll.bodyRowsVertical!.hasClients)return; + if(!mounted)return; stateManager.scroll.bodyRowsVertical!.jumpTo(0); stateManager.refRows.clearFromOriginal(); From 7eec6316d9bb43fffcb47df63e9c00e3476f471c Mon Sep 17 00:00:00 2001 From: doonfrs Date: Sat, 20 Apr 2024 19:24:13 +0300 Subject: [PATCH 36/80] update version to 8.4 and publish to pub.dev --- demo/pubspec.yaml | 2 +- packages/pluto_grid_plus_export/example/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/pubspec.yaml b/demo/pubspec.yaml index 482aafb28..8cc1398d3 100644 --- a/demo/pubspec.yaml +++ b/demo/pubspec.yaml @@ -23,7 +23,7 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: 8.3.1 + pluto_grid_plus: 8.4.0 faker: ^2.1.0 url_launcher: ^6.2.1 font_awesome_flutter: ^10.6.0 diff --git a/packages/pluto_grid_plus_export/example/pubspec.yaml b/packages/pluto_grid_plus_export/example/pubspec.yaml index 4a3dfc9ba..f6aee17d5 100644 --- a/packages/pluto_grid_plus_export/example/pubspec.yaml +++ b/packages/pluto_grid_plus_export/example/pubspec.yaml @@ -29,7 +29,7 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: 8.3.1 + pluto_grid_plus: 8.4.0 pluto_grid_plus_export: path: ../ file_saver: ^0.2.12 From d7d31435b80f90ad88e46d445103ae7682ff80b1 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Wed, 15 May 2024 18:32:02 +0300 Subject: [PATCH 37/80] upgrade pubspec --- demo/pubspec.yaml | 2 +- example/pubspec.yaml | 2 +- pubspec.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/pubspec.yaml b/demo/pubspec.yaml index 8cc1398d3..ea3cb39ef 100644 --- a/demo/pubspec.yaml +++ b/demo/pubspec.yaml @@ -38,7 +38,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 6c71292c3..5f8ee19d4 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -46,7 +46,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/pubspec.yaml b/pubspec.yaml index 5b7d58d3e..5d534de50 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: sdk: flutter # Follows the intl version included in Flutter. # https://github.com/flutter/flutter/blob/84a1e904f44f9b0e9c4510138010edcc653163f8/packages/flutter_localizations/pubspec.yaml#L11 - intl: ^0.18.1 + intl: ^0.19.0 rxdart: ^0.27.7 collection: ^1.18.0 @@ -22,4 +22,4 @@ dev_dependencies: sdk: flutter mockito: ^5.4.3 build_runner: ^2.4.7 - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 From 43f8d022e1cf264dd9f898797c6d38a751c3a125 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Wed, 15 May 2024 23:52:51 +0300 Subject: [PATCH 38/80] upgrade to latest flutter & migrate --- CHANGELOG.md | 3 +++ README.md | 2 +- demo/lib/main.dart | 2 +- .../screen/feature/listing_mode_screen.dart | 4 ++-- demo/pubspec.yaml | 2 +- lib/src/manager/pluto_grid_event_manager.dart | 6 ++--- lib/src/manager/pluto_grid_key_manager.dart | 2 +- lib/src/ui/columns/pluto_column_title.dart | 14 +++++------ lib/src/ui/pluto_base_row.dart | 24 ++++++++----------- packages/pluto_grid_plus_export/CHANGELOG.md | 3 +++ .../example/lib/main.dart | 4 ++-- .../example/pubspec.yaml | 4 ++-- packages/pluto_grid_plus_export/pubspec.yaml | 6 ++--- pubspec.yaml | 2 +- 14 files changed, 40 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 337004104..6247fe1b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [8.4.1] - 2024. 05. 15 +upgrade for flutter 3.22.0 + ## [8.4.0] - 2024. 04. 01 diff --git a/README.md b/README.md index 19db718a0..2be89ce27 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## PlutoGrid Plus for flutter - v8.4.0 +## PlutoGrid Plus for flutter - v8.4.1 PlutoGrid Plus is a maintained version of https://github.com/bosskmk/pluto_grid [![Awesome Flutter](https://img.shields.io/badge/Awesome-Flutter-blue.svg)](https://github.com/Solido/awesome-flutter) diff --git a/demo/lib/main.dart b/demo/lib/main.dart index 24ba66c84..7508fe929 100644 --- a/demo/lib/main.dart +++ b/demo/lib/main.dart @@ -119,7 +119,7 @@ class MyApp extends StatelessWidget { scaffoldBackgroundColor: PlutoGridExampleColors.backgroundColor, colorScheme: const ColorScheme.light( primary: PlutoGridExampleColors.primaryColor, - background: PlutoGridExampleColors.backgroundColor, + surface: PlutoGridExampleColors.backgroundColor, ), ), ); diff --git a/demo/lib/screen/feature/listing_mode_screen.dart b/demo/lib/screen/feature/listing_mode_screen.dart index 9fb845354..2038fce89 100644 --- a/demo/lib/screen/feature/listing_mode_screen.dart +++ b/demo/lib/screen/feature/listing_mode_screen.dart @@ -115,7 +115,7 @@ class _ListingModeScreenState extends State { }, style: ButtonStyle( backgroundColor: - MaterialStateProperty.all( + WidgetStateProperty.all( Colors.blue, ), ), @@ -202,7 +202,7 @@ class _ListingModeScreenState extends State { }, style: ButtonStyle( backgroundColor: - MaterialStateProperty.all( + WidgetStateProperty.all( Colors.blue, ), ), diff --git a/demo/pubspec.yaml b/demo/pubspec.yaml index ea3cb39ef..bb1eed2ef 100644 --- a/demo/pubspec.yaml +++ b/demo/pubspec.yaml @@ -23,7 +23,7 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: 8.4.0 + pluto_grid_plus: 8.4.1 faker: ^2.1.0 url_launcher: ^6.2.1 font_awesome_flutter: ^10.6.0 diff --git a/lib/src/manager/pluto_grid_event_manager.dart b/lib/src/manager/pluto_grid_event_manager.dart index 732d28a50..7cf74b013 100644 --- a/lib/src/manager/pluto_grid_event_manager.dart +++ b/lib/src/manager/pluto_grid_event_manager.dart @@ -32,7 +32,7 @@ class PlutoGridEventManager { .where((event) => event.type.isThrottleLeading) .transform( ThrottleStreamTransformer( - (_) => TimerStream(_, _.duration as Duration), + (e) => TimerStream(e, e.duration as Duration), trailing: false, leading: true, ), @@ -42,7 +42,7 @@ class PlutoGridEventManager { .where((event) => event.type.isThrottleTrailing) .transform( ThrottleStreamTransformer( - (_) => TimerStream(_, _.duration as Duration), + (e) => TimerStream(e, e.duration as Duration), trailing: true, leading: false, ), @@ -51,7 +51,7 @@ class PlutoGridEventManager { final debounceStream = _subject.stream.where((event) => event.type.isDebounce).transform( DebounceStreamTransformer( - (_) => TimerStream(_, _.duration as Duration), + (e) => TimerStream(e, e.duration as Duration), ), ); diff --git a/lib/src/manager/pluto_grid_key_manager.dart b/lib/src/manager/pluto_grid_key_manager.dart index 0b06818fd..a10e28b3b 100644 --- a/lib/src/manager/pluto_grid_key_manager.dart +++ b/lib/src/manager/pluto_grid_key_manager.dart @@ -66,7 +66,7 @@ class PlutoGridKeyManager { final movingStream = _subject.stream.where((event) => event.needsThrottle).transform( ThrottleStreamTransformer( - (_) => TimerStream(_, const Duration(milliseconds: 1)), + (e) => TimerStream(e, const Duration(milliseconds: 1)), ), ); diff --git a/lib/src/ui/columns/pluto_column_title.dart b/lib/src/ui/columns/pluto_column_title.dart index a8b5d9a78..9c8cd5e95 100644 --- a/lib/src/ui/columns/pluto_column_title.dart +++ b/lib/src/ui/columns/pluto_column_title.dart @@ -354,17 +354,17 @@ class _ColumnWidget extends StatelessWidget { @override Widget build(BuildContext context) { return DragTarget( - onWillAccept: (PlutoColumn? columnToDrag) { - return columnToDrag != null && - columnToDrag.key != column.key && + onWillAcceptWithDetails: (columnToDrag) { + return columnToDrag.data.key != column.key && !stateManager.limitMoveColumn( - column: columnToDrag, + column: columnToDrag.data, targetColumn: column, ); }, - onAccept: (PlutoColumn columnToMove) { - if (columnToMove.key != column.key) { - stateManager.moveColumn(column: columnToMove, targetColumn: column); + onAcceptWithDetails: (columnToMove) { + if (columnToMove.data.key != column.key) { + stateManager.moveColumn( + column: columnToMove.data, targetColumn: column); } }, builder: (dragContext, candidate, rejected) { diff --git a/lib/src/ui/pluto_base_row.dart b/lib/src/ui/pluto_base_row.dart index bb8bce4fd..0c2a7d930 100644 --- a/lib/src/ui/pluto_base_row.dart +++ b/lib/src/ui/pluto_base_row.dart @@ -25,11 +25,11 @@ class PlutoBaseRow extends StatelessWidget { super.key, }); - bool _checkSameDragRows(PlutoRow draggingRow) { + bool _checkSameDragRows(DragTargetDetails draggingRow) { final List selectedRows = stateManager.currentSelectingRows.isNotEmpty ? stateManager.currentSelectingRows - : [draggingRow]; + : [draggingRow.data]; final end = rowIdx + selectedRows.length; @@ -42,18 +42,14 @@ class PlutoBaseRow extends StatelessWidget { return true; } - bool _handleOnWillAccept(PlutoRow? draggingRow) { - if (draggingRow == null) { - return false; - } - + bool _handleOnWillAccept(DragTargetDetails draggingRow) { return !_checkSameDragRows(draggingRow); } - void _handleOnAccept(PlutoRow draggingRow) async { + void _handleOnAccept(DragTargetDetails draggingRow) async { final draggingRows = stateManager.currentSelectingRows.isNotEmpty ? stateManager.currentSelectingRows - : [draggingRow]; + : [draggingRow.data]; stateManager.eventManager!.addEvent( PlutoGridDragRowsEvent( @@ -131,13 +127,12 @@ class PlutoBaseRow extends StatelessWidget { @override Widget build(BuildContext context) { - return MouseRegion ( + return MouseRegion( onEnter: (event) => _handleOnEnter(), onExit: (event) => _handleOnExit(), - child: DragTarget( - onWillAccept: _handleOnWillAccept, - onAccept: _handleOnAccept, + onWillAcceptWithDetails: _handleOnWillAccept, + onAcceptWithDetails: _handleOnAccept, builder: _dragTargetBuilder, ), ); @@ -310,7 +305,8 @@ class _RowContainerWidgetState extends PlutoStateWithChange<_RowContainerWidget> } return isCheckedRow - ? Color.alphaBlend(stateManager.configuration.style.rowCheckedColor, color) + ? Color.alphaBlend( + stateManager.configuration.style.rowCheckedColor, color) : color; } diff --git a/packages/pluto_grid_plus_export/CHANGELOG.md b/packages/pluto_grid_plus_export/CHANGELOG.md index 386970593..82f28319d 100644 --- a/packages/pluto_grid_plus_export/CHANGELOG.md +++ b/packages/pluto_grid_plus_export/CHANGELOG.md @@ -1,3 +1,6 @@ +## [1.0.5] - 2024. 5. 15 +upgrade for flutter 3.22.0 & pluto_grid_plus 8.4.1 + ## [1.0.4] - 2024. 2. 18 * Change repo path & class name in readme diff --git a/packages/pluto_grid_plus_export/example/lib/main.dart b/packages/pluto_grid_plus_export/example/lib/main.dart index a4806fe6d..bdf2b1e81 100644 --- a/packages/pluto_grid_plus_export/example/lib/main.dart +++ b/packages/pluto_grid_plus_export/example/lib/main.dart @@ -14,7 +14,7 @@ void main() { /// For more details, please refer to the link below for how to use it. /// https://github.com/bosskmk/pluto_grid/blob/master/demo/lib/screen/feature/export_screen.dart class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override Widget build(BuildContext context) { @@ -29,7 +29,7 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatefulWidget { - const MyHomePage({Key? key}) : super(key: key); + const MyHomePage({super.key}); @override State createState() => _MyHomePageState(); diff --git a/packages/pluto_grid_plus_export/example/pubspec.yaml b/packages/pluto_grid_plus_export/example/pubspec.yaml index f6aee17d5..724ab69d5 100644 --- a/packages/pluto_grid_plus_export/example/pubspec.yaml +++ b/packages/pluto_grid_plus_export/example/pubspec.yaml @@ -29,7 +29,7 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: 8.4.0 + pluto_grid_plus: 8.4.1 pluto_grid_plus_export: path: ../ file_saver: ^0.2.12 @@ -47,7 +47,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/pluto_grid_plus_export/pubspec.yaml b/packages/pluto_grid_plus_export/pubspec.yaml index 1b783c9d9..87c7bc7e8 100644 --- a/packages/pluto_grid_plus_export/pubspec.yaml +++ b/packages/pluto_grid_plus_export/pubspec.yaml @@ -1,6 +1,6 @@ name: pluto_grid_plus_export description: PlutoGridExport converts PlutoGrid's metadata to CSV or PDF. Used with PlutoGrid. -version: 1.0.4 +version: 1.0.5 homepage: https://bosskmk.github.io repository: https://github.com/doonfrs/pluto_grid_plus/tree/master/packages/pluto_grid_plus_export @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: ^8.4.0 + pluto_grid_plus: ^8.4.1 csv: ^6.0.0 pdf: ^3.10.7 printing: ^5.11.1 @@ -21,4 +21,4 @@ dev_dependencies: sdk: flutter mockito: ^5.4.3 build_runner: ^2.4.7 - flutter_lints: ^3.0.1 + flutter_lints: ^4.0.0 diff --git a/pubspec.yaml b/pubspec.yaml index 5d534de50..6109f359a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pluto_grid_plus description: PlutoGrid plus is a maintained version of PlutoGrid, PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS. (DataGrid, DataTable, Data Grid, Data Table, Sticky) -version: 8.4.0 +version: 8.4.1 homepage: https://pluto.weblaze.dev repository: https://github.com/doonfrs/pluto_grid_plus From 8a4a114e50b1e4819c93b9fa144a771975325c0c Mon Sep 17 00:00:00 2001 From: ryanjohnson Date: Fri, 31 May 2024 11:36:10 +0930 Subject: [PATCH 39/80] add rowWrapper --- lib/src/manager/pluto_grid_state_manager.dart | 2 ++ lib/src/pluto_grid.dart | 23 ++++++++----------- lib/src/ui/pluto_body_rows.dart | 6 ++++- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index 22ced5859..9cbb0b812 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -219,11 +219,13 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier /// ``` /// {@endtemplate} class PlutoGridStateManager extends PlutoGridStateChangeNotifier { + final rowWrapper; PlutoGridStateManager({ required super.columns, required super.rows, required super.gridFocusNode, required super.scroll, + this.rowWrapper, super.columnGroups, super.onChanged, super.onSelected, diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index 7dad6223a..774f4e944 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -60,10 +60,12 @@ typedef PlutoRowColorCallback = Color Function( /// and option selection used inside [PlutoGrid] are created with the API provided outside of [PlutoGrid]. /// Also, the popup to set the filter or column inside the grid is implemented through the setting of [PlutoGrid]. class PlutoGrid extends PlutoStatefulWidget { + final rowWrapper; const PlutoGrid({ super.key, required this.columns, required this.rows, + this.rowWrapper, this.columnGroups, this.onLoaded, this.onChanged, @@ -943,8 +945,7 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { BoxConstraints.loose(size), ); - final double posX = - isLTR ? size.width - s.width + gridBorderWidth : 0; + final double posX = isLTR ? size.width - s.width + gridBorderWidth : 0; positionChild( _StackName.rightFrozenColumns, @@ -1066,9 +1067,8 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { if (hasChild(_StackName.leftFrozenRows)) { final double offset = isLTR ? bodyLeftOffset : bodyRightOffset; - final double posX = isLTR - ? 0 - : size.width - bodyRightOffset + gridBorderWidth; + final double posX = + isLTR ? 0 : size.width - bodyRightOffset + gridBorderWidth; layoutChild( _StackName.leftFrozenRows, @@ -1088,9 +1088,8 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { if (hasChild(_StackName.leftFrozenColumnFooters)) { final double offset = isLTR ? bodyLeftOffset : bodyRightOffset; - final double posX = isLTR - ? 0 - : size.width - bodyRightOffset + gridBorderWidth; + final double posX = + isLTR ? 0 : size.width - bodyRightOffset + gridBorderWidth; layoutChild( _StackName.leftFrozenColumnFooters, @@ -1107,9 +1106,8 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { if (hasChild(_StackName.rightFrozenRows)) { final double offset = isLTR ? bodyRightOffset : bodyLeftOffset; - final double posX = isLTR - ? size.width - bodyRightOffset + gridBorderWidth - : 0; + final double posX = + isLTR ? size.width - bodyRightOffset + gridBorderWidth : 0; layoutChild( _StackName.rightFrozenRows, @@ -1134,8 +1132,7 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { BoxConstraints.loose(Size(offset, size.height)), ); - final double posX = - isLTR ? size.width - s.width + gridBorderWidth : 0; + final double posX = isLTR ? size.width - s.width + gridBorderWidth : 0; positionChild( _StackName.rightFrozenColumnFooters, diff --git a/lib/src/ui/pluto_body_rows.dart b/lib/src/ui/pluto_body_rows.dart index 67a9fa0bc..5c586f2fe 100644 --- a/lib/src/ui/pluto_body_rows.dart +++ b/lib/src/ui/pluto_body_rows.dart @@ -104,7 +104,7 @@ class PlutoBodyRowsState extends PlutoStateWithChange { itemExtent: stateManager.rowTotalHeight, addRepaintBoundaries: false, itemBuilder: (ctx, i) { - return PlutoBaseRow( + Widget w = PlutoBaseRow( key: ValueKey('body_row_${_rows[i].key}'), rowIdx: i, row: _rows[i], @@ -112,6 +112,10 @@ class PlutoBodyRowsState extends PlutoStateWithChange { stateManager: stateManager, visibilityLayout: true, ); + + return stateManager.rowWrapper != null + ? stateManager.rowWrapper(w) + : w; }, ), ), From b0c49677041916116e8abedf14698c2173cf2a86 Mon Sep 17 00:00:00 2001 From: ryanjohnson Date: Fri, 31 May 2024 11:52:27 +0930 Subject: [PATCH 40/80] fix --- lib/src/pluto_grid.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index 774f4e944..72da610fe 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -520,6 +520,7 @@ class PlutoGridState extends PlutoStateWithChange { _stateManager = PlutoGridStateManager( columns: widget.columns, rows: widget.rows, + rowWrapper: widget.rowWrapper, gridFocusNode: _gridFocusNode, scroll: PlutoGridScrollController( vertical: _verticalScroll, From b5c0182b59dee5b857278ce25199f8234cc93962 Mon Sep 17 00:00:00 2001 From: ryanjohnson Date: Fri, 31 May 2024 13:11:31 +0930 Subject: [PATCH 41/80] fix --- lib/src/ui/pluto_body_rows.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/ui/pluto_body_rows.dart b/lib/src/ui/pluto_body_rows.dart index 5c586f2fe..b858c7ceb 100644 --- a/lib/src/ui/pluto_body_rows.dart +++ b/lib/src/ui/pluto_body_rows.dart @@ -101,7 +101,9 @@ class PlutoBodyRowsState extends PlutoStateWithChange { scrollDirection: Axis.vertical, physics: const ClampingScrollPhysics(), itemCount: _rows.length, - itemExtent: stateManager.rowTotalHeight, + itemExtent: stateManager.rowWrapper != null + ? null + : stateManager.rowTotalHeight, addRepaintBoundaries: false, itemBuilder: (ctx, i) { Widget w = PlutoBaseRow( From aa2f45c93578e9a4cb4cce6e84dc948c9e86dbae Mon Sep 17 00:00:00 2001 From: Christian Hessenbruch Date: Sun, 2 Jun 2024 09:59:57 +0200 Subject: [PATCH 42/80] Added an option for developers to use either the standard Material DatePicker or a custom datepicker. --- example/lib/main.dart | 11 +++++ lib/src/manager/pluto_grid_state_manager.dart | 5 +++ lib/src/manager/state/grid_state.dart | 2 + lib/src/pluto_grid.dart | 7 ++++ lib/src/ui/cells/pluto_date_cell.dart | 40 +++++++++++-------- 5 files changed, 49 insertions(+), 16 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index b075606f8..dad9d280d 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -181,6 +181,17 @@ class _PlutoGridExamplePageState extends State { print(event); }, configuration: const PlutoGridConfiguration(), + selectDateCallback: (PlutoCell cell, PlutoColumn column) async { + return showDatePicker( + context: context, + initialDate: PlutoDateTimeHelper.parseOrNullWithFormat( + cell.value, + column.type.date.format, + ) ?? DateTime.now(), + firstDate: column.type.date.startDate ?? DateTime(0), + lastDate: column.type.date.endDate ?? DateTime(9999) + ); + } ), ), ); diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index 22ced5859..c5bacceb1 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -84,6 +84,7 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier this.onRowsMoved, this.onColumnsMoved, this.rowColorCallback, + this.selectDateCallback, this.createHeader, this.createFooter, PlutoColumnMenuDelegate? columnMenuDelegate, @@ -159,6 +160,9 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier @override final CreateFooterCallBack? createFooter; + @override + final PlutoSelectDateCallBack? selectDateCallback; + @override final PlutoColumnMenuDelegate columnMenuDelegate; @@ -236,6 +240,7 @@ class PlutoGridStateManager extends PlutoGridStateChangeNotifier { super.onRowsMoved, super.onColumnsMoved, super.rowColorCallback, + super.selectDateCallback, super.createHeader, super.createFooter, super.columnMenuDelegate, diff --git a/lib/src/manager/state/grid_state.dart b/lib/src/manager/state/grid_state.dart index 8e7ae75dc..ea3a97c72 100644 --- a/lib/src/manager/state/grid_state.dart +++ b/lib/src/manager/state/grid_state.dart @@ -38,6 +38,8 @@ abstract class IGridState { CreateFooterCallBack? get createFooter; + PlutoSelectDateCallBack? get selectDateCallback; + PlutoGridLocaleText get localeText; PlutoGridStyleConfig get style; diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index 7dad6223a..c610af617 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -51,6 +51,9 @@ typedef CreateFooterCallBack = Widget Function( typedef PlutoRowColorCallback = Color Function( PlutoRowColorContext rowColorContext); +typedef PlutoSelectDateCallBack = Future Function( + PlutoCell dateCell, PlutoColumn column); + /// [PlutoGrid] is a widget that receives columns and rows and is expressed as a grid-type UI. /// /// [PlutoGrid] supports movement and editing with the keyboard, @@ -80,6 +83,7 @@ class PlutoGrid extends PlutoStatefulWidget { this.createFooter, this.noRowsWidget, this.rowColorCallback, + this.selectDateCallback, this.columnMenuDelegate, this.configuration = const PlutoGridConfiguration(), this.notifierFilterResolver, @@ -309,6 +313,8 @@ class PlutoGrid extends PlutoStatefulWidget { /// {@endtemplate} final PlutoRowColorCallback? rowColorCallback; + final PlutoSelectDateCallBack? selectDateCallback; + /// {@template pluto_grid_property_columnMenuDelegate} /// Column menu can be customized. /// @@ -535,6 +541,7 @@ class PlutoGridState extends PlutoStateWithChange { onRowsMoved: widget.onRowsMoved, onColumnsMoved: widget.onColumnsMoved, rowColorCallback: widget.rowColorCallback, + selectDateCallback: widget.selectDateCallback, createHeader: widget.createHeader, createFooter: widget.createFooter, columnMenuDelegate: widget.columnMenuDelegate, diff --git a/lib/src/ui/cells/pluto_date_cell.dart b/lib/src/ui/cells/pluto_date_cell.dart index 0e788c1d5..e86562b83 100644 --- a/lib/src/ui/cells/pluto_date_cell.dart +++ b/lib/src/ui/cells/pluto_date_cell.dart @@ -42,26 +42,34 @@ class PlutoDateCellState extends State IconData? get icon => widget.column.type.date.popupIcon; @override - void openPopup() { + void openPopup() async { if (widget.column.checkReadOnly(widget.row, widget.cell)) { return; } + if (widget.stateManager.selectDateCallback != null) { + final sm = widget.stateManager; + final date = await sm.selectDateCallback!(widget.cell, widget.column); + isOpenedPopup = false; + if (date != null) { + handleSelected(widget.column.type.date.dateFormat.format(date)); // Consider call onSelected + } + } else { + PlutoGridDatePicker( + context: context, + initDate: PlutoDateTimeHelper.parseOrNullWithFormat( + widget.cell.value, + widget.column.type.date.format, + ), + startDate: widget.column.type.date.startDate, + endDate: widget.column.type.date.endDate, + dateFormat: widget.column.type.date.dateFormat, + headerDateFormat: widget.column.type.date.headerDateFormat, + onSelected: onSelected, + itemHeight: widget.stateManager.rowTotalHeight, + configuration: widget.stateManager.configuration, + ); + } isOpenedPopup = true; - - PlutoGridDatePicker( - context: context, - initDate: PlutoDateTimeHelper.parseOrNullWithFormat( - widget.cell.value, - widget.column.type.date.format, - ), - startDate: widget.column.type.date.startDate, - endDate: widget.column.type.date.endDate, - dateFormat: widget.column.type.date.dateFormat, - headerDateFormat: widget.column.type.date.headerDateFormat, - onSelected: onSelected, - itemHeight: widget.stateManager.rowTotalHeight, - configuration: widget.stateManager.configuration, - ); } } From 22a298161d4cd35639d497523f80a6e89ec2bcaf Mon Sep 17 00:00:00 2001 From: Christian Hessenbruch Date: Mon, 1 Jul 2024 19:44:46 +0200 Subject: [PATCH 43/80] Datepicker - moved isOpenedPopup = true --- lib/src/ui/cells/pluto_date_cell.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/src/ui/cells/pluto_date_cell.dart b/lib/src/ui/cells/pluto_date_cell.dart index e86562b83..cf8d3d628 100644 --- a/lib/src/ui/cells/pluto_date_cell.dart +++ b/lib/src/ui/cells/pluto_date_cell.dart @@ -46,7 +46,7 @@ class PlutoDateCellState extends State if (widget.column.checkReadOnly(widget.row, widget.cell)) { return; } - + isOpenedPopup = true; if (widget.stateManager.selectDateCallback != null) { final sm = widget.stateManager; final date = await sm.selectDateCallback!(widget.cell, widget.column); @@ -70,6 +70,5 @@ class PlutoDateCellState extends State configuration: widget.stateManager.configuration, ); } - isOpenedPopup = true; } } From 861947a0384a1e9801142580ce2b8b2617333fb5 Mon Sep 17 00:00:00 2001 From: Stan Persoons Date: Wed, 10 Jul 2024 16:05:42 +0200 Subject: [PATCH 44/80] Added the ability to add a custom data property at the row level. For example: you can pass data to onSelect or any other onHandler. (not required) --- lib/src/model/pluto_row.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/src/model/pluto_row.dart b/lib/src/model/pluto_row.dart index 79d2d5005..e771d59a8 100644 --- a/lib/src/model/pluto_row.dart +++ b/lib/src/model/pluto_row.dart @@ -1,11 +1,12 @@ import 'package:flutter/material.dart'; import 'package:pluto_grid_plus/pluto_grid_plus.dart'; -class PlutoRow { +class PlutoRow { PlutoRow({ required this.cells, PlutoRowType? type, this.sortIdx = 0, + this.data, bool checked = false, Key? key, }) : type = type ?? PlutoRowTypeNormal.instance, @@ -17,6 +18,8 @@ class PlutoRow { final Key _key; + T? data; + Map cells; /// Value to maintain the default sort order when sorting columns. @@ -119,6 +122,8 @@ class PlutoRow { _parent = row; } + void setData(T data) => this.data = data; + void setChecked(bool? flag) { _checked = flag; if (type.isGroup) { From dd245c3faadfb76679d0bcfee7b2bc071fa77528 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Mon, 15 Jul 2024 00:20:24 +0300 Subject: [PATCH 45/80] reformat readme md make it standard --- README.md | 79 +++++++++++++++++++++---------------------------------- 1 file changed, 30 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 2be89ce27..9afdff228 100644 --- a/README.md +++ b/README.md @@ -1,82 +1,68 @@ -## PlutoGrid Plus for flutter - v8.4.1 -PlutoGrid Plus is a maintained version of https://github.com/bosskmk/pluto_grid +# PlutoGrid Plus for flutter - v8.4.1 + +PlutoGrid Plus is a maintained version of [![Awesome Flutter](https://img.shields.io/badge/Awesome-Flutter-blue.svg)](https://github.com/Solido/awesome-flutter) [![codecov](https://codecov.io/gh/bosskmk/pluto_grid/branch/master/graph/badge.svg)](https://codecov.io/gh/bosskmk/pluto_grid) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -
- `PlutoGrid` is a `DataGrid` that can be operated with the keyboard in various situations such as moving cells. It is developed with priority on the web and desktop. Improvements such as UI on mobile are being considered. If you comment on an issue, mobile improvements can be made quickly. -
- -### [Demo Web](https://bosskmk.github.io/pluto_grid/build/web/index.html) +## [Demo Web](https://bosskmk.github.io/pluto_grid/build/web/index.html) +> > You can try out various functions and usage methods right away. > All features provide example code. -
- -### [Pub.Dev](https://pub.dev/packages/pluto_grid) +## [Pub.Dev](https://pub.dev/packages/pluto_grid) +> > Check out how to install from the official distribution site. -
- -### [Documentation](https://pluto.weblaze.dev/series/pluto-grid) +## [Documentation](https://pluto.weblaze.dev/series/pluto-grid) +> > The documentation has more details. -
- -### [ChangeLog](https://github.com/bosskmk/pluto_grid/blob/master/CHANGELOG.md) +## [ChangeLog](https://github.com/bosskmk/pluto_grid/blob/master/CHANGELOG.md) +> > Please note the changes when changing the version of PlutoGrid you are using. -
- -### [Issue](https://github.com/bosskmk/pluto_grid/issues) +## [Issue](https://github.com/bosskmk/pluto_grid/issues) +> > Report any questions or errors. -
- -### Packages +## Packages > [PlutoGridExport](https://github.com/bosskmk/pluto_grid/tree/master/packages/pluto_grid_export) > This package can export the metadata of PlutoGrid as CSV or PDF. +## Screenshots -
+### Change the color of the rows or make the cells look the way you want them -### Screenshots - -#### Change the color of the rows or make the cells look the way you want them. ![PlutoGrid Normal](https://bosskmk.github.io/images/pluto_grid/2.8.0/pluto_grid_2.8.0_01.png) -
+### Date type input can be easily selected by pop-up and keyboard -#### Date type input can be easily selected by pop-up and keyboard. ![PlutoGrid Select Popup](https://bosskmk.github.io/images/pluto_grid/3.1.0/pluto_grid_3.1.0_01.png) -
+### The selection type column can be easily selected using a pop-up and keyboard -#### The selection type column can be easily selected using a pop-up and keyboard. ![PlutoGrid Select Date](https://bosskmk.github.io/images/pluto_grid/2.8.0/pluto_grid_2.8.0_03.png) -
+### Group columns by desired depth -#### Group columns by desired depth. ![PlutoGrid Cell renderer](https://bosskmk.github.io/images/pluto_grid/2.8.0/pluto_grid_2.8.0_04.png) -
+### Grid can be expressed in dark mode or a combination of desired colors. Also, freeze the column, move it by dragging, or adjust the size -#### Grid can be expressed in dark mode or a combination of desired colors. Also, freeze the column, move it by dragging, or adjust the size. ![PlutoGrid Multi select](https://bosskmk.github.io/images/pluto_grid/2.8.0/pluto_grid_2.8.0_05.png) -
+## Example -### Example Generate the data to be used in the grid. + ```dart List columns = [ @@ -144,6 +130,7 @@ List rows = [ ``` Create a grid with the data created above. + ```dart @override Widget build(BuildContext context) { @@ -168,9 +155,7 @@ Widget build(BuildContext context) { } ``` -
- -### Flutter version compatible +## Flutter version compatible | Flutter | PlutoGrid | |------------------|-----------------------| @@ -182,22 +167,18 @@ Widget build(BuildContext context) { For other versions, contact the issue -
- -### Related packages +## Related packages +> > develop packages that make it easy to develop admin pages or CMS with Flutter. + * [PlutoGrid](https://github.com/bosskmk/pluto_grid) * [PlutoMenuBar](https://github.com/bosskmk/pluto_menu_bar) * [PlutoLayout](https://github.com/bosskmk/pluto_layout) -
- -### Donate to this project +## Donate to this project [![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/white_img.png)](https://www.buymeacoffee.com/manki) -
- -### Jetbrains provides a free license +## Jetbrains provides a free license -[IDE license support](https://www.jetbrains.com/community/opensource/#support) +[![IDE license support](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png)](https://www.jetbrains.com/community/opensource/#support) From abef05b49c6772f10eb2c7cbe1b63d3857517dae Mon Sep 17 00:00:00 2001 From: doonfrs Date: Mon, 15 Jul 2024 00:29:27 +0300 Subject: [PATCH 46/80] prepare 8.4.2 for publish --- CHANGELOG.md | 116 +++++++++++++++++++++++++++++---------------------- README.md | 2 +- pubspec.yaml | 4 +- 3 files changed, 69 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6247fe1b8..4bb252aef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,29 +1,45 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## [8.4.2] - 2024. 07. 15 + +* add rowWrapper +* Added an option for developers to use either the standard Material DatePicker or a custom datepicker. +* Datepicker - moved isOpenedPopup = true +* Added the ability to add a custom data property at the row level. For example: you can pass data to onSelect or any other onHandler. (not required) +* Upgrade some used package to the latest version. + ## [8.4.1] - 2024. 05. 15 + upgrade for flutter 3.22.0 ## [8.4.0] - 2024. 04. 01 - * Added onRowEnter, onRowExit callbacks to react on. @coruscant187 * Added logic to change background color of row if hovered. @coruscant187 doonfrs/pluto_grid_plus#29 ## [8.3.1] - 2024. 03. 19 + * upgrade packages to latest major version ## [8.3.0] - 2024. 02. 18 + * Change pluto_grid_export to pluto_grid_plus_export as the old version is not maintained. * fix & enhance the example for csv export. ## [8.2.0] - 2023. 12. 19 + * Add builder function in plutoColumnType.select allow user to customize the popup by item widget. ## [8.1.0] - 2023. 12. 8 + * Customize filter column by @RamshaFarheen bosskmk#739 * Add column title (padding, icon-size, and checkBox size to auto-fit calculation by @Milad-Akarie bosskmk#715 * add onSelectedItem function in plutoColumnType.select bosskmk#935 - ## [8.0.0] - 2023. 7. 12 + * Change Package name to pluto_grid_plus * Upgrade the packages to the latest version. @@ -42,12 +58,12 @@ upgrade for flutter 3.22.0 ## [6.0.4] - 2023. 3. 7 -* Add Scrollbar properties. https://github.com/bosskmk/pluto_grid/issues/743 +* Add Scrollbar properties. ## [6.0.3] - 2023. 3. 6 * Add locales.(German, French) -* Fix row group expanded bug. https://github.com/bosskmk/pluto_grid/issues/775 +* Fix row group expanded bug. ## [6.0.2] - 2023. 2. 2 @@ -75,25 +91,25 @@ upgrade for flutter 3.22.0 * Fix sorting bug. Fixed sorting issue with pagination applied. - https://github.com/bosskmk/pluto_grid/issues/668 + ## [5.4.6] - 2022. 11. 30 * Fix keepAlive. - Fixed a bug that slowed down when moving horizontally/vertically + Fixed a bug that slowed down when moving horizontally/vertically with the keyboard direction keys for a long time in succession. ## [5.4.5] - 2022. 11. 30 -* Fix RTL initiation flicker. - By https://github.com/Milad-Akarie +* Fix RTL initiation flicker. + By * Fix column context menu is triggered after drag (column resizing). - By https://github.com/Milad-Akarie + By ## [5.4.4] - 2022. 11. 29 * Add hovered scrollbar. - https://pluto.weblaze.dev/scrollbar-and-scroll-behavior + ## [5.4.3] - 2022. 11. 21 @@ -104,11 +120,11 @@ upgrade for flutter 3.22.0 ## [5.4.2] - 2022. 11. 15 * Add properties of PlutoGridScrollbarConfig. - - onlyDraggingThumb - - mainAxisMargin - - crossAxisMargin - - scrollBarColor - - scrollBarTrackColor + * onlyDraggingThumb + * mainAxisMargin + * crossAxisMargin + * scrollBarColor + * scrollBarTrackColor ## [5.4.1] - 2022. 11. 12 @@ -117,7 +133,7 @@ upgrade for flutter 3.22.0 ## [5.4.0] - 2022. 11. 5 * Add shortcut to PlutoGridConfiguration. - https://pluto.weblaze.dev/shortcuts + * Add popupIcon for popup type column. You can change the icon that appears on the right of the date, time, or selection type column cell or set it to null to remove it. @@ -151,7 +167,7 @@ upgrade for flutter 3.22.0 * Change PlutoGridStateManager.configuration to not null. * Add Currency column. - https://github.com/bosskmk/pluto_grid/blob/master/demo/lib/screen/feature/currency_type_column_screen.dart + ## [5.1.1] - 2022. 9. 25 @@ -160,13 +176,13 @@ upgrade for flutter 3.22.0 ## [5.1.0] - 2022. 9. 10 * Add Column footer. - https://weblaze.dev/pluto_grid/build/web/#feature/column-footer + * Add to be able to set locale for numeric type PlutoColumn. ## [5.0.6] - 2022. 9. 5 * Add support for countries that use comma as Decimal separator. -* Breaking change - Only available for flutter 3.3, +* Breaking change - Only available for flutter 3.3, otherwise it'll show this error on console: "Error: No named parameter with the name 'disabledForegroundColor'" ## [5.0.5] - 2022. 8. 30 @@ -199,21 +215,21 @@ upgrade for flutter 3.22.0 * Added middle divider for `PlutoDualGrid`, `PlutoDualPopup` widget. By adding a divider in the center of the two grids, the position can be changed by dragging and dropping. - https://weblaze.dev/pluto_grid/build/web/#feature/dual-mode + * Add to `PlutoGridEventManager` stream to receive column sort changes. Add `PlutoGrid.onSorted` callback. * Added an option to disable column width adjustment while displaying the column right menu. - - Activate both `PlutoColumn.enableContextMenu` and `PlutoColumn.enableDropToResize` + * Activate both `PlutoColumn.enableContextMenu` and `PlutoColumn.enableDropToResize` Tap the column menu to display the context menu. Drag left or right to adjust the column width. - - Activate only `PlutoColumn.enableContextMenu` + * Activate only `PlutoColumn.enableContextMenu` You cannot adjust the column width by dragging the column menu. - - Only enable `PlutoColumn.enableDropToResize` + * Only enable `PlutoColumn.enableDropToResize` You cannot call the context menu by tapping the column menu. * Hide all column headings. `PlutoGridStateManager.setShowColumnTitle` - https://weblaze.dev/pluto_grid/build/web/#development + In the link above, you can hide or show the entire column area by clicking the toggle column title button in the top show menu. -* When the parent widget of `PlutoGrid` is scrolled, in the previous 4.0.0 logic, +* When the parent widget of `PlutoGrid` is scrolled, in the previous 4.0.0 logic, the error that the row area disappears when the column is out of the screen area has been fixed. * Improve text selection when edit TextCell by @DmitrySboychakov * Improve padding for table cells and column titles by @DmitrySboychakov @@ -225,10 +241,10 @@ upgrade for flutter 3.22.0 * Modified to pass `PlutoColumn` instead of passing `PlutoColumn.key` when calling `hideColumn`. * Add `PlutoGridStateManager.hideColumns(List columns, bool hide)` * Changes due to the constraint of a frozen column. - - The width of the frozen column cannot be expanded beyond the limit width. - - When changing a non-frozen column to a frozen column, it cannot be changed if the constraint width is insufficient. - - If a column with a hidden frozen column state is unhidden in a narrow constraint width, the column frozen state is forcibly changed to `PlutoColumnFrozen.none`. - - If the entire grid width is narrowed to less than the constraint width while + * The width of the frozen column cannot be expanded beyond the limit width. + * When changing a non-frozen column to a frozen column, it cannot be changed if the constraint width is insufficient. + * If a column with a hidden frozen column state is unhidden in a narrow constraint width, the column frozen state is forcibly changed to `PlutoColumnFrozen.none`. + * If the entire grid width is narrowed to less than the constraint width while there is a frozen column, the frozen column is permanently changed to `PlutoColumnFrozen.none`, and it does not return to the frozen column again even if the grid width is increased. * Change the logic to move by dragging rows. Previous behavior: rows are moved while dragging. @@ -242,7 +258,7 @@ upgrade for flutter 3.22.0 Changed left and right of `PlutoColumn.frozen` to start and end. `PlutoColumn.textAlign` default value changed from left to start. `PlutoColumn.titleTextAlign` default value changed from left to start. - https://weblaze.dev/pluto_grid/build/web/#feature/rtl + * Change `PlutoGridConfiguration`. Settings such as color, size, icon, border, and text style have been moved to `PlutoGridConfiguration.style`. * Even/Odd Color. @@ -250,7 +266,7 @@ upgrade for flutter 3.22.0 * Set default row color. Add `PlutoGridConfiguration.style.rowColor`. * Customize column menu. - https://weblaze.dev/pluto_grid/build/web/#feature/column-menu + ## [4.0.1] - 2022. 6. 21 @@ -262,8 +278,8 @@ upgrade for flutter 3.22.0 Please check the performance in profile or build mode. Debug mode can be slow if there are many lines. * Some state management is applied as a Provider. -* Added PlutoGridStateManager.initializeRowsAsync static method. - To avoid UI freezing when starting the grid with a large number of rows. +* Added PlutoGridStateManager.initializeRowsAsync static method. + To avoid UI freezing when starting the grid with a large number of rows. [Initialize rows asynchronously](https://weblaze.dev/pluto_grid/build/web/#feature/add-rows-asynchronously) ## [3.1.2] - 2022. 6. 2 @@ -281,7 +297,7 @@ upgrade for flutter 3.22.0 ## [3.0.2] - 2022. 5. 25 -* CSV export has been separated into external packages. +* CSV export has been separated into external packages. Install the pluto_grid_export package. ## [3.0.0-1.pre] - 2022. 5. 14 @@ -347,7 +363,7 @@ upgrade for flutter 3.22.0 ## [2.7.1] - 2021. 12. 8 -* Fixed an error where the row height of the popup did not change when the rowHeight value was changed. +* Fixed an error where the row height of the popup did not change when the rowHeight value was changed. ## [2.7.0] - 2021. 12. 7 @@ -387,7 +403,7 @@ upgrade for flutter 3.22.0 ## [2.4.0] - 2021. 7. 31 -* Added pagination. +* Added pagination. * Added debounce on keyboard input in filter. ## [2.3.0] - 2021. 7. 7 @@ -402,7 +418,7 @@ upgrade for flutter 3.22.0 ## [2.2.0] - 2021. 5. 29 -* Add callback to row checks developed by https://github.com/MrCasCode. +* Add callback to row checks developed by . ## [2.1.0] - 2021. 5. 19 @@ -411,7 +427,7 @@ upgrade for flutter 3.22.0 ## [2.0.0] - 2021. 5. 14 * Change scroll physics. -* Fix a bug when dragging rows. +* Fix a bug when dragging rows. * Stable release. ## [2.0.0-nullsafety.2] - 2021. 5. 1 @@ -451,9 +467,9 @@ upgrade for flutter 3.22.0 ## [1.0.0] - 2020. 12. 30 * Class name change. Just like changing PlutoConfiguration to PlutoGridConfiguration, the word Grid was added in the middle. - - PlutoStateManager > PlutoGridStateManager - - PlutoOnLoadedEvent > PlutoGridOnLoadedEvent - - Many other classes... + * PlutoStateManager > PlutoGridStateManager + * PlutoOnLoadedEvent > PlutoGridOnLoadedEvent + * Many other classes... ## [1.0.0-pre.10] - 2020. 12. 21 @@ -488,9 +504,9 @@ upgrade for flutter 3.22.0 ## [1.0.0-pre.4] - 2020. 11. 16 * Enable constant_identifier_names. - - ex) `PlutoColumnFixed.Left` > `PlutoColumnFixed.left` - - ex) `PlutoSelectingMode.Row` > `PlutoSelectingMode.row` - - All existing constants such as enum are changed. + * ex) `PlutoColumnFixed.Left` > `PlutoColumnFixed.left` + * ex) `PlutoSelectingMode.Row` > `PlutoSelectingMode.row` + * All existing constants such as enum are changed. * Add a loading indicator. ## [1.0.0-pre.3] - 2020. 11. 13 @@ -512,20 +528,20 @@ upgrade for flutter 3.22.0 ## [1.0.0-pre.1] - 2020. 11. 05 -##### Breaking changes: +### Breaking changes * PlutoGrid.popup has been deleted. PlutoGrid.popup() has been removed. Just clear the popup and create it with PlutoGrid(). * The column property enableDraggable has been changed to enableColumnDrag. -##### Improvements: +### Improvements * Column properties have been added. - - enableRowDrag : If set to true, an icon is create in the cell of the column, and the row can be moved by dragging it. - - enableRowChecked : If set to true, a check box is create in the cell of the column. - - renderer : You can change the displayed cell. - - applyFormatterInEditing : If this is set to true, the value changed by a formatter is a reflected in the editing state. However, it is only in the readonly state, or the state in which the cell value cannot be directly modified in the form of popup. + * enableRowDrag : If set to true, an icon is create in the cell of the column, and the row can be moved by dragging it. + * enableRowChecked : If set to true, a check box is create in the cell of the column. + * renderer : You can change the displayed cell. + * applyFormatterInEditing : If this is set to true, the value changed by a formatter is a reflected in the editing state. However, it is only in the readonly state, or the state in which the cell value cannot be directly modified in the form of popup. ## [0.1.21] - 2020. 11. 01 diff --git a/README.md b/README.md index 9afdff228..b17ca1a72 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PlutoGrid Plus for flutter - v8.4.1 +# PlutoGrid Plus for flutter - v8.4.2 PlutoGrid Plus is a maintained version of diff --git a/pubspec.yaml b/pubspec.yaml index 6109f359a..ea1c09d25 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: pluto_grid_plus description: PlutoGrid plus is a maintained version of PlutoGrid, PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS. (DataGrid, DataTable, Data Grid, Data Table, Sticky) -version: 8.4.1 +version: 8.4.2 homepage: https://pluto.weblaze.dev repository: https://github.com/doonfrs/pluto_grid_plus @@ -14,7 +14,7 @@ dependencies: # Follows the intl version included in Flutter. # https://github.com/flutter/flutter/blob/84a1e904f44f9b0e9c4510138010edcc653163f8/packages/flutter_localizations/pubspec.yaml#L11 intl: ^0.19.0 - rxdart: ^0.27.7 + rxdart: ^0.28.0 collection: ^1.18.0 dev_dependencies: From 59ec734aede5111dbced15618641bee7777d7579 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Mon, 15 Jul 2024 00:30:48 +0300 Subject: [PATCH 47/80] use 8.4.2 in demo and included packages --- demo/pubspec.yaml | 2 +- packages/pluto_grid_plus_export/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/pubspec.yaml b/demo/pubspec.yaml index bb1eed2ef..5c334d8cb 100644 --- a/demo/pubspec.yaml +++ b/demo/pubspec.yaml @@ -23,7 +23,7 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: 8.4.1 + pluto_grid_plus: 8.4.2 faker: ^2.1.0 url_launcher: ^6.2.1 font_awesome_flutter: ^10.6.0 diff --git a/packages/pluto_grid_plus_export/pubspec.yaml b/packages/pluto_grid_plus_export/pubspec.yaml index 87c7bc7e8..24f1b7370 100644 --- a/packages/pluto_grid_plus_export/pubspec.yaml +++ b/packages/pluto_grid_plus_export/pubspec.yaml @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: ^8.4.1 + pluto_grid_plus: ^8.4.2 csv: ^6.0.0 pdf: ^3.10.7 printing: ^5.11.1 From 55aeb9d9d5901c3ce690c87bf01f32b3d911ba77 Mon Sep 17 00:00:00 2001 From: Software365-info Date: Fri, 19 Jul 2024 10:51:49 +0200 Subject: [PATCH 48/80] added filterbuilder to pluto column --- lib/src/model/pluto_column.dart | 10 ++++++++++ lib/src/ui/columns/pluto_column_filter.dart | 3 ++- packages/pluto_grid_plus_export/example/pubspec.yaml | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/src/model/pluto_column.dart b/lib/src/model/pluto_column.dart index d8145c7f0..620d8fcfe 100644 --- a/lib/src/model/pluto_column.dart +++ b/lib/src/model/pluto_column.dart @@ -186,8 +186,17 @@ class PlutoColumn { Icon? filterSuffixIcon; ///Set custom widget + @Deprecated("Use new filterWidgetBuilder to provide some parameters") Widget? filterWidget; + Widget Function( + FocusNode focusNode, + TextEditingController controller, + bool enabled, + void Function(String changed) handleOnChanged, + PlutoGridStateManager stateManager, + )? filterWidgetBuilder; + /// Displays Hide column menu in the column context menu. /// Valid only when [enableContextMenu] is activated. bool enableHideColumnMenuItem; @@ -242,6 +251,7 @@ class PlutoColumn { this.enableAutoEditing = false, this.enableEditingMode = true, this.hide = false, + this.filterWidgetBuilder, }) : _key = UniqueKey(), _checkReadOnly = checkReadOnly; diff --git a/lib/src/ui/columns/pluto_column_filter.dart b/lib/src/ui/columns/pluto_column_filter.dart index dfa02b734..cc16a5205 100644 --- a/lib/src/ui/columns/pluto_column_filter.dart +++ b/lib/src/ui/columns/pluto_column_filter.dart @@ -254,7 +254,8 @@ class PlutoColumnFilterState extends PlutoStateWithChange { ), child: Padding( padding: _padding, - child: widget.column.filterWidget ?? + child: widget.column.filterWidgetBuilder?.call(_focusNode, + _controller, _enabled, _handleOnChanged, stateManager) ?? TextField( focusNode: _focusNode, controller: _controller, diff --git a/packages/pluto_grid_plus_export/example/pubspec.yaml b/packages/pluto_grid_plus_export/example/pubspec.yaml index 724ab69d5..e89c9f877 100644 --- a/packages/pluto_grid_plus_export/example/pubspec.yaml +++ b/packages/pluto_grid_plus_export/example/pubspec.yaml @@ -29,7 +29,7 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: 8.4.1 + pluto_grid_plus: 8.4.2 pluto_grid_plus_export: path: ../ file_saver: ^0.2.12 From 95ecdd9a4c2cc96bd13c0f84e26a95c2a74bf19e Mon Sep 17 00:00:00 2001 From: Software365-info Date: Fri, 19 Jul 2024 11:52:58 +0200 Subject: [PATCH 49/80] readded filterWidget so it can be deprecated but still usable --- lib/src/model/pluto_column.dart | 1 + lib/src/ui/columns/pluto_column_filter.dart | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/model/pluto_column.dart b/lib/src/model/pluto_column.dart index 620d8fcfe..9a4845eb9 100644 --- a/lib/src/model/pluto_column.dart +++ b/lib/src/model/pluto_column.dart @@ -245,6 +245,7 @@ class PlutoColumn { this.filterHintText, this.filterHintTextColor, this.filterSuffixIcon, + @Deprecated("Use new filterWidgetBuilder to provide some parameters") this.filterWidget, this.enableHideColumnMenuItem = true, this.enableSetColumnsMenuItem = true, diff --git a/lib/src/ui/columns/pluto_column_filter.dart b/lib/src/ui/columns/pluto_column_filter.dart index cc16a5205..19e5b22a9 100644 --- a/lib/src/ui/columns/pluto_column_filter.dart +++ b/lib/src/ui/columns/pluto_column_filter.dart @@ -254,8 +254,9 @@ class PlutoColumnFilterState extends PlutoStateWithChange { ), child: Padding( padding: _padding, - child: widget.column.filterWidgetBuilder?.call(_focusNode, - _controller, _enabled, _handleOnChanged, stateManager) ?? + child: widget.column.filterWidget ?? + widget.column.filterWidgetBuilder?.call(_focusNode, _controller, + _enabled, _handleOnChanged, stateManager) ?? TextField( focusNode: _focusNode, controller: _controller, From 2c588d54fc60f650c65dfc905c1e3e965f0d5d69 Mon Sep 17 00:00:00 2001 From: Software365-info Date: Mon, 22 Jul 2024 18:13:13 +0200 Subject: [PATCH 50/80] made average and sum aggregates ignore null values --- lib/src/helper/pluto_aggregate_helper.dart | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/src/helper/pluto_aggregate_helper.dart b/lib/src/helper/pluto_aggregate_helper.dart index d49a45c7f..5563daf58 100644 --- a/lib/src/helper/pluto_aggregate_helper.dart +++ b/lib/src/helper/pluto_aggregate_helper.dart @@ -1,5 +1,5 @@ import 'package:collection/collection.dart' - show IterableNumberExtension, IterableExtension; + show IterableExtension, IterableNullableExtension, IterableNumberExtension; import 'package:pluto_grid_plus/pluto_grid_plus.dart'; class PlutoAggregateHelper { @@ -19,9 +19,11 @@ class PlutoAggregateHelper { ? rows.where((row) => filter(row.cells[column.field]!)) : rows; - final Iterable numbers = foundItems.map( - (e) => e.cells[column.field]!.value, - ); + final Iterable numbers = foundItems + .map( + (e) => e.cells[column.field]?.value as num?, + ) + .whereNotNull(); return numberColumn.toNumber(numberColumn.applyFormat(numbers.sum)); } @@ -42,9 +44,11 @@ class PlutoAggregateHelper { ? rows.where((row) => filter(row.cells[column.field]!)) : rows; - final Iterable numbers = foundItems.map( - (e) => e.cells[column.field]!.value, - ); + final Iterable numbers = foundItems + .map( + (e) => e.cells[column.field]?.value as num?, + ) + .whereNotNull(); return numberColumn.toNumber(numberColumn.applyFormat(numbers.average)); } From 2d08def835b5dc03aeb99710e4e761b11fcfc8cd Mon Sep 17 00:00:00 2001 From: Software365-info Date: Tue, 23 Jul 2024 11:35:28 +0200 Subject: [PATCH 51/80] empty check before calculating average/sum --- lib/src/helper/pluto_aggregate_helper.dart | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/src/helper/pluto_aggregate_helper.dart b/lib/src/helper/pluto_aggregate_helper.dart index 5563daf58..9ecdc3f78 100644 --- a/lib/src/helper/pluto_aggregate_helper.dart +++ b/lib/src/helper/pluto_aggregate_helper.dart @@ -3,7 +3,7 @@ import 'package:collection/collection.dart' import 'package:pluto_grid_plus/pluto_grid_plus.dart'; class PlutoAggregateHelper { - static num sum({ + static num? sum({ required Iterable rows, required PlutoColumn column, PlutoAggregateFilter? filter, @@ -25,10 +25,12 @@ class PlutoAggregateHelper { ) .whereNotNull(); - return numberColumn.toNumber(numberColumn.applyFormat(numbers.sum)); + return numbers.isNotEmpty + ? numberColumn.toNumber(numberColumn.applyFormat(numbers.sum)) + : null; } - static num average({ + static num? average({ required Iterable rows, required PlutoColumn column, PlutoAggregateFilter? filter, @@ -50,7 +52,9 @@ class PlutoAggregateHelper { ) .whereNotNull(); - return numberColumn.toNumber(numberColumn.applyFormat(numbers.average)); + return numbers.isNotEmpty + ? numberColumn.toNumber(numberColumn.applyFormat(numbers.average)) + : null; } static num? min({ From db43188f2f2966510debc12eebb4d41f441bd8d0 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Sat, 7 Sep 2024 01:08:25 +0300 Subject: [PATCH 52/80] fix demo project errors after upgrading faker package --- demo/lib/screen/development_screen.dart | 4 ++-- demo/lib/screen/feature/add_and_remove_column_row_screen.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/lib/screen/development_screen.dart b/demo/lib/screen/development_screen.dart index fa2ed7ae0..aef41ebcd 100644 --- a/demo/lib/screen/development_screen.dart +++ b/demo/lib/screen/development_screen.dart @@ -1,4 +1,4 @@ -import 'package:faker/faker.dart'; +import 'package:faker/faker.dart' as faker_package; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid_plus/pluto_grid_plus.dart'; @@ -446,7 +446,7 @@ class _HeaderState extends State<_Header> { 0, [ PlutoColumn( - title: faker.food.cuisine(), + title: faker_package.faker.food.cuisine(), field: 'new_${DateTime.now()}', type: PlutoColumnType.text(), frozen: frozen, diff --git a/demo/lib/screen/feature/add_and_remove_column_row_screen.dart b/demo/lib/screen/feature/add_and_remove_column_row_screen.dart index 819f0ef20..b2152de8c 100644 --- a/demo/lib/screen/feature/add_and_remove_column_row_screen.dart +++ b/demo/lib/screen/feature/add_and_remove_column_row_screen.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:faker/faker.dart'; +import 'package:faker/faker.dart' as faker_package; import 'package:flutter/material.dart'; import 'package:pluto_grid_plus/pluto_grid_plus.dart'; @@ -176,7 +176,7 @@ class _Header extends StatefulWidget { } class _HeaderState extends State<_Header> { - final faker = Faker(); + final faker = faker_package.Faker(); int addCount = 1; From 94e806135a92fafc936e09b17c82deeb122b9b0a Mon Sep 17 00:00:00 2001 From: doonfrs Date: Mon, 16 Sep 2024 11:25:15 +0300 Subject: [PATCH 53/80] Ignore some auto generated files --- .gitignore | 5 +++- .../flutter/generated_plugin_registrant.cc | 11 --------- .../flutter/generated_plugin_registrant.h | 15 ------------ .../windows/flutter/generated_plugins.cmake | 23 ------------------- 4 files changed, 4 insertions(+), 50 deletions(-) delete mode 100644 example/windows/flutter/generated_plugin_registrant.cc delete mode 100644 example/windows/flutter/generated_plugin_registrant.h delete mode 100644 example/windows/flutter/generated_plugins.cmake diff --git a/.gitignore b/.gitignore index b0407d4e1..b28e1b84a 100644 --- a/.gitignore +++ b/.gitignore @@ -77,4 +77,7 @@ coverage/ !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages # FVM Support - https://fvm.app/ -.fvm/flutter_sdk \ No newline at end of file +.fvm/flutter_sdk +example/windows/flutter/generated_plugin_registrant.cc +example/windows/flutter/generated_plugin_registrant.h +example/windows/flutter/generated_plugins.cmake diff --git a/example/windows/flutter/generated_plugin_registrant.cc b/example/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 8b6d4680a..000000000 --- a/example/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,11 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - - -void RegisterPlugins(flutter::PluginRegistry* registry) { -} diff --git a/example/windows/flutter/generated_plugin_registrant.h b/example/windows/flutter/generated_plugin_registrant.h deleted file mode 100644 index dc139d85a..000000000 --- a/example/windows/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void RegisterPlugins(flutter::PluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/example/windows/flutter/generated_plugins.cmake b/example/windows/flutter/generated_plugins.cmake deleted file mode 100644 index b93c4c30c..000000000 --- a/example/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) From 5eb0c4aaa6bfe1084b7b07718f01cef639b95601 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Mon, 16 Sep 2024 11:25:51 +0300 Subject: [PATCH 54/80] add explicit type for rowWrapper --- lib/src/pluto_grid.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index 696a58c01..deef2f629 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -63,7 +63,7 @@ typedef PlutoSelectDateCallBack = Future Function( /// and option selection used inside [PlutoGrid] are created with the API provided outside of [PlutoGrid]. /// Also, the popup to set the filter or column inside the grid is implemented through the setting of [PlutoGrid]. class PlutoGrid extends PlutoStatefulWidget { - final rowWrapper; + final Widget Function(Widget rowWidget)? rowWrapper; const PlutoGrid({ super.key, required this.columns, From 776895afdf35672bd80dc9a7c19c018ddefbaf13 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Mon, 16 Sep 2024 22:42:14 +0300 Subject: [PATCH 55/80] add editCellWrapper and rowWrapper code --- lib/src/manager/pluto_grid_state_manager.dart | 13 +++++++++++-- lib/src/manager/state/editing_state.dart | 3 +++ lib/src/manager/state/row_state.dart | 2 ++ lib/src/pluto_grid.dart | 8 +++++++- lib/src/ui/cells/text_cell.dart | 8 +++++++- lib/src/ui/pluto_body_rows.dart | 8 +++++--- 6 files changed, 35 insertions(+), 7 deletions(-) diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index f9c67fc67..e6678cd7c 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -73,6 +73,8 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier required this.gridFocusNode, required this.scroll, List? columnGroups, + this.rowWrapper, + this.editCellWrapper, this.onChanged, this.onSelected, this.onSorted, @@ -106,6 +108,13 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier _initialize(); } + @override + final Widget Function(Widget rowWidget)? rowWrapper; + + @override + final Widget Function(Widget editCellWidget, PlutoCell cell, + TextEditingController controller)? editCellWrapper; + @override final FilteredList refColumns; @@ -223,13 +232,13 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier /// ``` /// {@endtemplate} class PlutoGridStateManager extends PlutoGridStateChangeNotifier { - final rowWrapper; PlutoGridStateManager({ required super.columns, required super.rows, required super.gridFocusNode, required super.scroll, - this.rowWrapper, + super.rowWrapper, + super.editCellWrapper, super.columnGroups, super.onChanged, super.onSelected, diff --git a/lib/src/manager/state/editing_state.dart b/lib/src/manager/state/editing_state.dart index 36797e002..991ea52d8 100644 --- a/lib/src/manager/state/editing_state.dart +++ b/lib/src/manager/state/editing_state.dart @@ -58,6 +58,9 @@ class _State { mixin EditingState implements IPlutoGridState { final _State _state = _State(); + Widget Function(Widget editCellWidget, PlutoCell cell, + TextEditingController controller)? get editCellWrapper; + @override bool get isEditing => _state._isEditing; diff --git a/lib/src/manager/state/row_state.dart b/lib/src/manager/state/row_state.dart index 5d12e306f..e5cf173a4 100644 --- a/lib/src/manager/state/row_state.dart +++ b/lib/src/manager/state/row_state.dart @@ -39,6 +39,8 @@ abstract class IRowState { /// Row of currently selected cell. PlutoRow? get currentRow; + Widget Function(Widget rowWidget)? get rowWrapper; + PlutoRowColorCallback? get rowColorCallback; int? getRowIdxByOffset(double offset); diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index deef2f629..a36e966e5 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -63,12 +63,12 @@ typedef PlutoSelectDateCallBack = Future Function( /// and option selection used inside [PlutoGrid] are created with the API provided outside of [PlutoGrid]. /// Also, the popup to set the filter or column inside the grid is implemented through the setting of [PlutoGrid]. class PlutoGrid extends PlutoStatefulWidget { - final Widget Function(Widget rowWidget)? rowWrapper; const PlutoGrid({ super.key, required this.columns, required this.rows, this.rowWrapper, + this.editCellWrapper, this.columnGroups, this.onLoaded, this.onChanged, @@ -92,6 +92,11 @@ class PlutoGrid extends PlutoStatefulWidget { this.mode = PlutoGridMode.normal, }); + final Widget Function(Widget rowWidget)? rowWrapper; + + final Widget Function(Widget editCellWidget, PlutoCell cell, + TextEditingController controller)? editCellWrapper; + /// {@template pluto_grid_property_columns} /// The [PlutoColumn] column is delivered as a list and can be added or deleted after grid creation. /// @@ -527,6 +532,7 @@ class PlutoGridState extends PlutoStateWithChange { columns: widget.columns, rows: widget.rows, rowWrapper: widget.rowWrapper, + editCellWrapper: widget.editCellWrapper, gridFocusNode: _gridFocusNode, scroll: PlutoGridScrollController( vertical: _verticalScroll, diff --git a/lib/src/ui/cells/text_cell.dart b/lib/src/ui/cells/text_cell.dart index e64181e14..631ee6f6c 100644 --- a/lib/src/ui/cells/text_cell.dart +++ b/lib/src/ui/cells/text_cell.dart @@ -231,7 +231,7 @@ mixin TextCellState on State implements TextFieldProps { cellFocus.requestFocus(); } - return TextField( + Widget w = TextField( focusNode: cellFocus, controller: _textController, readOnly: widget.column.checkReadOnly(widget.row, widget.cell), @@ -252,6 +252,12 @@ mixin TextCellState on State implements TextFieldProps { textAlignVertical: TextAlignVertical.center, textAlign: widget.column.textAlign.value, ); + + if (widget.stateManager.editCellWrapper != null) { + w = widget.stateManager.editCellWrapper!(w, widget.cell, _textController); + } + + return w; } } diff --git a/lib/src/ui/pluto_body_rows.dart b/lib/src/ui/pluto_body_rows.dart index b858c7ceb..ced13c926 100644 --- a/lib/src/ui/pluto_body_rows.dart +++ b/lib/src/ui/pluto_body_rows.dart @@ -115,9 +115,11 @@ class PlutoBodyRowsState extends PlutoStateWithChange { visibilityLayout: true, ); - return stateManager.rowWrapper != null - ? stateManager.rowWrapper(w) - : w; + if (stateManager.rowWrapper != null) { + w = stateManager.rowWrapper!(w); + } + + return w; }, ), ), From 1a9968b805a6f10c4cc61e76e2b37b6d90b6f20a Mon Sep 17 00:00:00 2001 From: "ciocca@gmail.com" Date: Thu, 17 Oct 2024 22:56:41 -0300 Subject: [PATCH 56/80] 20241017 --- lib/src/model/pluto_column.dart | 2 +- lib/src/pluto_grid_popup.dart | 2 +- lib/src/ui/cells/pluto_default_cell.dart | 2 +- lib/src/ui/columns/pluto_column_title.dart | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/model/pluto_column.dart b/lib/src/model/pluto_column.dart index 521e05fb8..5dc568165 100644 --- a/lib/src/model/pluto_column.dart +++ b/lib/src/model/pluto_column.dart @@ -147,7 +147,7 @@ class PlutoColumn { /// A checkbox appears in the cell of the column. bool enableRowChecked; - int rowCheckBoxGroupDepth; + int rowCheckBoxGroupDepth; // bool enableTitleChecked; /// Sort rows by tapping on the column heading. diff --git a/lib/src/pluto_grid_popup.dart b/lib/src/pluto_grid_popup.dart index b7c17064a..e2256be9e 100644 --- a/lib/src/pluto_grid_popup.dart +++ b/lib/src/pluto_grid_popup.dart @@ -75,7 +75,7 @@ class PlutoGridPopup { final double? height; - final bool? barrierDismissible; + final bool? barrierDismissible; // PlutoGridPopup({ required this.context, diff --git a/lib/src/ui/cells/pluto_default_cell.dart b/lib/src/ui/cells/pluto_default_cell.dart index 9dc562d92..d68b955fd 100644 --- a/lib/src/ui/cells/pluto_default_cell.dart +++ b/lib/src/ui/cells/pluto_default_cell.dart @@ -129,7 +129,7 @@ class _PlutoDefaultCellState extends PlutoStateWithChange { @override Widget build(BuildContext context) { - int depth = 0; + int depth = 0; // PlutoRow? row = widget.row; while (row?.parent != null) { depth++; diff --git a/lib/src/ui/columns/pluto_column_title.dart b/lib/src/ui/columns/pluto_column_title.dart index f4a147fc9..79f75573b 100644 --- a/lib/src/ui/columns/pluto_column_title.dart +++ b/lib/src/ui/columns/pluto_column_title.dart @@ -377,7 +377,7 @@ class _ColumnWidget extends StatelessWidget { height: height, child: DecoratedBox( decoration: BoxDecoration( - gradient: column.backgroundGradient, + gradient: column.backgroundGradient, // color: column.backgroundGradient == null ? (noDragTarget ? column.backgroundColor From 9d102b3c381393c8f9f70e937b9369a9ccc96970 Mon Sep 17 00:00:00 2001 From: AminBhst Date: Sat, 19 Oct 2024 16:27:12 +0330 Subject: [PATCH 57/80] Manually detect doubleTaps on desktop platform to eliminate delay --- lib/src/helper/pluto_double_tap_detector.dart | 24 +++++++++++++++++++ lib/src/ui/pluto_base_cell.dart | 11 +++++++++ 2 files changed, 35 insertions(+) create mode 100644 lib/src/helper/pluto_double_tap_detector.dart diff --git a/lib/src/helper/pluto_double_tap_detector.dart b/lib/src/helper/pluto_double_tap_detector.dart new file mode 100644 index 000000000..a4789e15a --- /dev/null +++ b/lib/src/helper/pluto_double_tap_detector.dart @@ -0,0 +1,24 @@ +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; + +class PlutoDoubleTapDetector { + static PlutoCell? _prevTappedCell; + static int _lastTap = DateTime.now().millisecondsSinceEpoch; + static int _consecutiveTaps = 1; + + static bool isDoubleTap(PlutoCell cell) { + int now = DateTime.now().millisecondsSinceEpoch; + bool doubleTap = false; + if (now - _lastTap < 300) { + _consecutiveTaps++; + if (_consecutiveTaps >= 2 && _prevTappedCell == cell) { + doubleTap = true; + } + } else { + _consecutiveTaps = 1; + doubleTap = false; + } + _lastTap = now; + _prevTappedCell = cell; + return doubleTap; + } +} diff --git a/lib/src/ui/pluto_base_cell.dart b/lib/src/ui/pluto_base_cell.dart index 106c14c34..991cfec91 100644 --- a/lib/src/ui/pluto_base_cell.dart +++ b/lib/src/ui/pluto_base_cell.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; import 'package:pluto_grid_plus/pluto_grid_plus.dart'; +import 'package:pluto_grid_plus/src/helper/platform_helper.dart'; +import 'package:pluto_grid_plus/src/helper/pluto_double_tap_detector.dart'; import 'ui.dart'; @@ -46,6 +48,12 @@ class PlutoBaseCell extends StatelessWidget } void _handleOnTapUp(TapUpDetails details) { + if (PlatformHelper.isDesktop && + PlutoDoubleTapDetector.isDoubleTap(cell) && + stateManager.onRowDoubleTap != null) { + _handleOnDoubleTap(); + return; + } _addGestureEvent(PlutoGridGestureType.onTapUp, details.globalPosition); } @@ -94,6 +102,9 @@ class PlutoBaseCell extends StatelessWidget } void Function()? _onDoubleTapOrNull() { + if (PlatformHelper.isDesktop) { + return null; + } return stateManager.onRowDoubleTap == null ? null : _handleOnDoubleTap; } From add10d61c8142266c4114f11d8e2262e38cac7ae Mon Sep 17 00:00:00 2001 From: AminBhst Date: Sat, 19 Oct 2024 23:48:19 +0330 Subject: [PATCH 58/80] Add PlutoGridRowSelectionCheckBehavior which enables automatically setting the CheckBox values of selected rows --- lib/src/manager/state/grid_state.dart | 47 +++++++++++++++++++++++++++ lib/src/manager/state/row_state.dart | 17 +++++++--- lib/src/model/pluto_row.dart | 9 ++++- lib/src/pluto_grid_configuration.dart | 35 ++++++++++++++++++++ 4 files changed, 102 insertions(+), 6 deletions(-) diff --git a/lib/src/manager/state/grid_state.dart b/lib/src/manager/state/grid_state.dart index ea3a97c72..ffa3b2005 100644 --- a/lib/src/manager/state/grid_state.dart +++ b/lib/src/manager/state/grid_state.dart @@ -195,6 +195,7 @@ mixin GridState implements IPlutoGridState { @override void handleOnSelected() { + _handleSelectCheckRowBehavior(); if (mode.isSelectMode == true && onSelected != null) { onSelected!( PlutoGridOnSelectedEvent( @@ -207,6 +208,52 @@ mixin GridState implements IPlutoGridState { } } + void _handleSelectCheckRowBehavior() { + final stateManager = eventManager?.stateManager; + if (currentRow == null || stateManager == null) return; + final checkedRowsViaSelect = stateManager.checkedRowsViaSelect; + switch (configuration.rowSelectionCheckBoxBehavior) { + case PlutoGridRowSelectionCheckBoxBehavior.none: + break; + case PlutoGridRowSelectionCheckBoxBehavior.checkRow: + stateManager.setRowChecked(currentRow!, true, checkedViaSelect: true); + break; + case PlutoGridRowSelectionCheckBoxBehavior.toggleCheckRow: + if (checkedRowsViaSelect.contains(currentRow)) { + stateManager.setRowChecked( + currentRow!, + (!(currentRow?.checked ?? false)), + checkedViaSelect: true, + ); + } else { + eventManager!.stateManager.setRowChecked( + currentRow!, + (!(currentRow?.checked ?? true)), + checkedViaSelect: true, + ); + } + break; + case PlutoGridRowSelectionCheckBoxBehavior.singleRowCheck: + for (var row in checkedRowsViaSelect) { + row.setChecked(false); + } + currentRow!.setChecked(true, viaSelect: true); + stateManager.notifyListeners(); + break; + case PlutoGridRowSelectionCheckBoxBehavior.toggleSingleRowCheck: + for (var row in checkedRowsViaSelect) { + row.setChecked(false); + } + if (checkedRowsViaSelect.contains(currentRow)) { + currentRow!.setChecked(false, viaSelect: false); + } else { + currentRow!.setChecked(true, viaSelect: true); + } + stateManager.notifyListeners(); + break; + } + } + @override void setSortOnlyEvent(bool flag) { _state._sortOnlyEvent = flag; diff --git a/lib/src/manager/state/row_state.dart b/lib/src/manager/state/row_state.dart index e5cf173a4..ab5e9ebbc 100644 --- a/lib/src/manager/state/row_state.dart +++ b/lib/src/manager/state/row_state.dart @@ -24,6 +24,8 @@ abstract class IRowState { List get checkedRows; + List get checkedRowsViaSelect; + List get unCheckedRows; bool get hasCheckedRow; @@ -110,6 +112,10 @@ mixin RowState implements IPlutoGridState { growable: false, ); + @override + List get checkedRowsViaSelect => + checkedRows.where((row) => row.checkedViaSelect).toList(growable: false); + @override List get unCheckedRows => refRows.where((row) => !row.checked!).toList( @@ -218,10 +224,11 @@ mixin RowState implements IPlutoGridState { @override void setRowChecked( - PlutoRow row, - bool flag, { - bool notify = true, - }) { + PlutoRow row, + bool flag, { + bool notify = true, + bool checkedViaSelect = false, + }) { final findRow = refRows.firstWhereOrNull( (element) => element.key == row.key, ); @@ -230,7 +237,7 @@ mixin RowState implements IPlutoGridState { return; } - findRow.setChecked(flag); + findRow.setChecked(flag, viaSelect: checkedViaSelect); notifyListeners(notify, setRowChecked.hashCode); } diff --git a/lib/src/model/pluto_row.dart b/lib/src/model/pluto_row.dart index e771d59a8..709754859 100644 --- a/lib/src/model/pluto_row.dart +++ b/lib/src/model/pluto_row.dart @@ -28,6 +28,8 @@ class PlutoRow { bool? _checked; + bool? _checkedViaSelect; + PlutoRow? _parent; PlutoRowState _state; @@ -70,6 +72,10 @@ class PlutoRow { return type.isGroup ? _tristateCheckedRow : _checked; } + bool get checkedViaSelect { + return (checked ?? false) && (_checkedViaSelect ?? false); + } + bool? get _tristateCheckedRow { if (!type.isGroup) return false; @@ -124,8 +130,9 @@ class PlutoRow { void setData(T data) => this.data = data; - void setChecked(bool? flag) { + void setChecked(bool? flag, {bool viaSelect = false}) { _checked = flag; + _checkedViaSelect = viaSelect; if (type.isGroup) { for (final child in type.group.children) { child.setChecked(flag); diff --git a/lib/src/pluto_grid_configuration.dart b/lib/src/pluto_grid_configuration.dart index 4151fb752..7941883df 100644 --- a/lib/src/pluto_grid_configuration.dart +++ b/lib/src/pluto_grid_configuration.dart @@ -11,6 +11,24 @@ class PlutoGridConfiguration { /// Moves the current cell when focus reaches the left or right edge in the edit state. final bool enableMoveHorizontalInEditing; + /// [PlutoGridRowSelectionCheckBoxBehavior.none] + /// Selecting a row does nothing to its checkbox + /// + /// [PlutoGridRowSelectionCheckBoxBehavior.checkRow] + /// Automatically enables the checkbox of the selected rows + /// + /// [PlutoGridRowSelectionCheckBoxBehavior.toggleCheckRow] + /// Automatically toggles the checkbox of the selected rows + /// + /// [PlutoGridRowSelectionCheckBoxBehavior.singleRowCheck] + /// Checks a selected row (if another row is checked via select, the previous one is unchecked) + /// + /// [PlutoGridRowSelectionCheckBoxBehavior.singleRowCheck] + /// Toggles the checkbox of a selected row (if another row is checked via select, the previous one is unchecked) + /// + /// Important: Only works with mode: PlutoGridMode.selectWithOneTap, + final PlutoGridRowSelectionCheckBoxBehavior rowSelectionCheckBoxBehavior; + /// [PlutoEnterKeyAction.EditingAndMoveDown] /// It switches to the editing state, and moves down in the editing state. /// @@ -76,6 +94,8 @@ class PlutoGridConfiguration { const PlutoGridConfiguration({ this.enableMoveDownAfterSelecting = false, this.enableMoveHorizontalInEditing = false, + this.rowSelectionCheckBoxBehavior = + PlutoGridRowSelectionCheckBoxBehavior.none, this.enterKeyAction = PlutoGridEnterKeyAction.editingAndMoveDown, this.tabKeyAction = PlutoGridTabKeyAction.normal, this.shortcut = const PlutoGridShortcut(), @@ -89,6 +109,8 @@ class PlutoGridConfiguration { const PlutoGridConfiguration.dark({ this.enableMoveDownAfterSelecting = false, this.enableMoveHorizontalInEditing = false, + this.rowSelectionCheckBoxBehavior = + PlutoGridRowSelectionCheckBoxBehavior.none, this.enterKeyAction = PlutoGridEnterKeyAction.editingAndMoveDown, this.tabKeyAction = PlutoGridTabKeyAction.normal, this.shortcut = const PlutoGridShortcut(), @@ -1759,6 +1781,19 @@ class PlutoGridLocaleText { ]); } +enum PlutoGridRowSelectionCheckBoxBehavior { + /// Selecting a row does nothing to its checkbox + none, + /// Automatically enables the checkbox of the selected rows + checkRow, + /// Automatically toggles the checkbox value of the selected rows + toggleCheckRow, + /// Checks a selected row (if another row is selected via select, the previous one is unchecked) + singleRowCheck, + /// Toggle checks a selected (if another row is selected, the previous one is unchecked) + toggleSingleRowCheck, +} + /// Behavior of the Enter key when a cell is selected. enum PlutoGridEnterKeyAction { /// When the Enter key is pressed, the cell is changed to the edit state, From b77a892490e2d610304b57bc71a7fd71ae953367 Mon Sep 17 00:00:00 2001 From: Amin Beheshti <82708492+AminBhst@users.noreply.github.com> Date: Sun, 20 Oct 2024 00:08:34 +0330 Subject: [PATCH 59/80] Update docs --- lib/src/pluto_grid_configuration.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/pluto_grid_configuration.dart b/lib/src/pluto_grid_configuration.dart index 7941883df..c3bed1f8b 100644 --- a/lib/src/pluto_grid_configuration.dart +++ b/lib/src/pluto_grid_configuration.dart @@ -21,10 +21,10 @@ class PlutoGridConfiguration { /// Automatically toggles the checkbox of the selected rows /// /// [PlutoGridRowSelectionCheckBoxBehavior.singleRowCheck] - /// Checks a selected row (if another row is checked via select, the previous one is unchecked) + /// Automatically enabels the checkbox of a selected row (if another row is checked via select, the previous one is unchecked) /// /// [PlutoGridRowSelectionCheckBoxBehavior.singleRowCheck] - /// Toggles the checkbox of a selected row (if another row is checked via select, the previous one is unchecked) + /// Automatically toggles the checkbox of a selected row (if another row is checked via select, the previous one is unchecked) /// /// Important: Only works with mode: PlutoGridMode.selectWithOneTap, final PlutoGridRowSelectionCheckBoxBehavior rowSelectionCheckBoxBehavior; @@ -1786,11 +1786,11 @@ enum PlutoGridRowSelectionCheckBoxBehavior { none, /// Automatically enables the checkbox of the selected rows checkRow, - /// Automatically toggles the checkbox value of the selected rows + /// Automatically toggles the checkbox of the selected rows toggleCheckRow, - /// Checks a selected row (if another row is selected via select, the previous one is unchecked) + /// Automatically enabels the checkbox of a selected row (if another row is checked via select, the previous one is unchecked) singleRowCheck, - /// Toggle checks a selected (if another row is selected, the previous one is unchecked) + /// Automatically toggles the checkbox of a selected row (if another row is checked via select, the previous one is unchecked) toggleSingleRowCheck, } From ecc0b1bfdb8e822f121506c421865dd3d33cc853 Mon Sep 17 00:00:00 2001 From: doonfrs Date: Wed, 23 Oct 2024 00:23:33 +0300 Subject: [PATCH 60/80] lint & upgrade packages --- CHANGELOG.md | 11 ++++++++ README.md | 2 +- demo/pubspec.yaml | 8 +++--- example/pubspec.yaml | 4 +-- lib/pluto_grid_plus.dart | 2 +- .../manager/pluto_change_notifier_filter.dart | 28 +++++++++---------- lib/src/manager/pluto_grid_key_manager.dart | 1 + packages/pluto_grid_plus_export/README.md | 2 +- .../lib/pluto_grid_plus_export.dart | 2 +- packages/pluto_grid_plus_export/pubspec.yaml | 7 ++--- pubspec.yaml | 7 ++--- 11 files changed, 42 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bb252aef..a61163f38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to this project will be documented in this file. +## [8.4.3] - 2024. 10. 23 + +* Added rowWrapper & editCellWrapper for the state manager +* Manually detect doubleTaps on desktop platform to eliminate delay +* Several improvements +* Add PlutoGridRowSelectionCheckBehavior which enables automatically setting the CheckBox values of selected rows +* Add PlutoGridRowSelectionCheckBehavior +* Upgrade packages + + + ## [8.4.2] - 2024. 07. 15 * add rowWrapper diff --git a/README.md b/README.md index b17ca1a72..9fcfc8a33 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PlutoGrid Plus for flutter - v8.4.2 +# PlutoGrid Plus for flutter - v8.4.3 PlutoGrid Plus is a maintained version of diff --git a/demo/pubspec.yaml b/demo/pubspec.yaml index 5c334d8cb..9d24b2f0e 100644 --- a/demo/pubspec.yaml +++ b/demo/pubspec.yaml @@ -18,19 +18,19 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.17.0 <4.0.0" + sdk: ^3.0.0 dependencies: flutter: sdk: flutter - pluto_grid_plus: 8.4.2 + pluto_grid_plus: 8.4.3 faker: ^2.1.0 url_launcher: ^6.2.1 font_awesome_flutter: ^10.6.0 rainbow_color: ^2.0.1 pluto_menu_bar: ^3.0.1 file_saver: ^0.2.10 - pluto_grid_plus_export: 1.0.4 + pluto_grid_plus_export: 1.0.5 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.6 @@ -38,7 +38,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 5f8ee19d4..25eb25387 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.17.0 <4.0.0" + sdk: ^3.0.0 # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -46,7 +46,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/lib/pluto_grid_plus.dart b/lib/pluto_grid_plus.dart index 813c20eaf..04ed11a9f 100644 --- a/lib/pluto_grid_plus.dart +++ b/lib/pluto_grid_plus.dart @@ -1,4 +1,4 @@ -library pluto_grid_plus; +library; export './src/helper/filter_helper.dart'; export './src/helper/filtered_list.dart'; diff --git a/lib/src/manager/pluto_change_notifier_filter.dart b/lib/src/manager/pluto_change_notifier_filter.dart index 53bf45528..51ae80324 100644 --- a/lib/src/manager/pluto_change_notifier_filter.dart +++ b/lib/src/manager/pluto_change_notifier_filter.dart @@ -160,29 +160,29 @@ class PlutoNotifierFilterResolverDefault @override Set resolve(PlutoGridStateManager stateManager, Type type) { switch (type) { - case PlutoGrid: + case const (PlutoGrid): return defaultGridFilter(stateManager); - case PlutoBodyColumns: - case PlutoBodyColumnsFooter: - case PlutoLeftFrozenColumns: - case PlutoLeftFrozenColumnsFooter: - case PlutoRightFrozenColumns: - case PlutoRightFrozenColumnsFooter: + case const (PlutoBodyColumns): + case const (PlutoBodyColumnsFooter): + case const (PlutoLeftFrozenColumns): + case const (PlutoLeftFrozenColumnsFooter): + case const (PlutoRightFrozenColumns): + case const (PlutoRightFrozenColumnsFooter): return defaultColumnsFilter(stateManager); - case PlutoBodyRows: - case PlutoLeftFrozenRows: - case PlutoRightFrozenRows: + case const (PlutoBodyRows): + case const (PlutoLeftFrozenRows): + case const (PlutoRightFrozenRows): return defaultRowsFilter(stateManager); - case PlutoNoRowsWidget: + case const (PlutoNoRowsWidget): return { ...defaultRowsFilter(stateManager), stateManager.setShowLoading.hashCode, }; - case PlutoAggregateColumnFooter: + case const (PlutoAggregateColumnFooter): return defaultAggregateColumnFooterFilter(stateManager); - case CheckboxSelectionWidget: + case const (CheckboxSelectionWidget): return defaultCheckboxFilter(stateManager); - case CheckboxAllSelectionWidget: + case const (CheckboxAllSelectionWidget): return defaultCheckboxAllFilter(stateManager); } diff --git a/lib/src/manager/pluto_grid_key_manager.dart b/lib/src/manager/pluto_grid_key_manager.dart index a10e28b3b..5d0dfb6ef 100644 --- a/lib/src/manager/pluto_grid_key_manager.dart +++ b/lib/src/manager/pluto_grid_key_manager.dart @@ -66,6 +66,7 @@ class PlutoGridKeyManager { final movingStream = _subject.stream.where((event) => event.needsThrottle).transform( ThrottleStreamTransformer( + // ignore: void_checks (e) => TimerStream(e, const Duration(milliseconds: 1)), ), ); diff --git a/packages/pluto_grid_plus_export/README.md b/packages/pluto_grid_plus_export/README.md index 28f2a705e..c3c7e6ee8 100644 --- a/packages/pluto_grid_plus_export/README.md +++ b/packages/pluto_grid_plus_export/README.md @@ -1,4 +1,4 @@ -## PlutoGridExport for PlutoGrid - v1.0.4 +## PlutoGridExport for PlutoGrid - v1.0.5 [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) diff --git a/packages/pluto_grid_plus_export/lib/pluto_grid_plus_export.dart b/packages/pluto_grid_plus_export/lib/pluto_grid_plus_export.dart index 80897c954..5e2066815 100644 --- a/packages/pluto_grid_plus_export/lib/pluto_grid_plus_export.dart +++ b/packages/pluto_grid_plus_export/lib/pluto_grid_plus_export.dart @@ -1,4 +1,4 @@ -library pluto_grid_plus_export; +library; export 'package:pdf/pdf.dart'; export 'package:pdf/widgets.dart'; diff --git a/packages/pluto_grid_plus_export/pubspec.yaml b/packages/pluto_grid_plus_export/pubspec.yaml index 24f1b7370..33ce7e43b 100644 --- a/packages/pluto_grid_plus_export/pubspec.yaml +++ b/packages/pluto_grid_plus_export/pubspec.yaml @@ -5,13 +5,12 @@ homepage: https://bosskmk.github.io repository: https://github.com/doonfrs/pluto_grid_plus/tree/master/packages/pluto_grid_plus_export environment: - sdk: ">=2.17.0 <4.0.0" - flutter: ">=2.5.0" + sdk: ^3.0.0 dependencies: flutter: sdk: flutter - pluto_grid_plus: ^8.4.2 + pluto_grid_plus: ^8.4.3 csv: ^6.0.0 pdf: ^3.10.7 printing: ^5.11.1 @@ -21,4 +20,4 @@ dev_dependencies: sdk: flutter mockito: ^5.4.3 build_runner: ^2.4.7 - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 diff --git a/pubspec.yaml b/pubspec.yaml index ea1c09d25..852b8286d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,12 +1,11 @@ name: pluto_grid_plus description: PlutoGrid plus is a maintained version of PlutoGrid, PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS. (DataGrid, DataTable, Data Grid, Data Table, Sticky) -version: 8.4.2 +version: 8.4.3 homepage: https://pluto.weblaze.dev repository: https://github.com/doonfrs/pluto_grid_plus environment: - sdk: ">=2.17.0 <4.0.0" - flutter: ">=2.5.0" + sdk: ^3.0.0 dependencies: flutter: @@ -22,4 +21,4 @@ dev_dependencies: sdk: flutter mockito: ^5.4.3 build_runner: ^2.4.7 - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 From 9512f22776434a9f235fef6f04e5cc126e643dde Mon Sep 17 00:00:00 2001 From: Stan Persoons Date: Wed, 13 Nov 2024 18:17:00 +0100 Subject: [PATCH 61/80] Updated pluto_grid_plus from 8.4.2 to ^8.4.3 --- packages/pluto_grid_plus_export/example/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pluto_grid_plus_export/example/pubspec.yaml b/packages/pluto_grid_plus_export/example/pubspec.yaml index e89c9f877..7fc504961 100644 --- a/packages/pluto_grid_plus_export/example/pubspec.yaml +++ b/packages/pluto_grid_plus_export/example/pubspec.yaml @@ -29,7 +29,7 @@ environment: dependencies: flutter: sdk: flutter - pluto_grid_plus: 8.4.2 + pluto_grid_plus: ^8.4.3 pluto_grid_plus_export: path: ../ file_saver: ^0.2.12 From ffdc76f65a798a581e7c2fc21f3a711206ca609d Mon Sep 17 00:00:00 2001 From: Stan Persoons Date: Wed, 13 Nov 2024 18:17:37 +0100 Subject: [PATCH 62/80] Added onActiveCellChanged When a cell changes this callback is called --- lib/src/manager/pluto_grid_state_manager.dart | 5 +++++ lib/src/manager/state/cell_state.dart | 5 +++++ lib/src/manager/state/grid_state.dart | 2 ++ lib/src/pluto_grid.dart | 11 +++++++++++ lib/src/pluto_grid_events.dart | 11 +++++++++++ lib/src/pluto_grid_popup.dart | 5 +++++ test/src/pluto_grid_popup_test.dart | 2 ++ 7 files changed, 41 insertions(+) diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index e6678cd7c..79a00ea7e 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -84,6 +84,7 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier this.onRowEnter, this.onRowExit, this.onRowsMoved, + this.onActiveCellChanged, this.onColumnsMoved, this.rowColorCallback, this.selectDateCallback, @@ -157,6 +158,9 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier @override final PlutoOnRowsMovedEventCallback? onRowsMoved; + @override + final PlutoOnActiveCellChangedEventCallback? onActiveCellChanged; + @override final PlutoOnColumnsMovedEventCallback? onColumnsMoved; @@ -249,6 +253,7 @@ class PlutoGridStateManager extends PlutoGridStateChangeNotifier { super.onRowEnter, super.onRowExit, super.onRowsMoved, + super.onActiveCellChanged, super.onColumnsMoved, super.rowColorCallback, super.selectDateCallback, diff --git a/lib/src/manager/state/cell_state.dart b/lib/src/manager/state/cell_state.dart index abc84540b..61b3426af 100644 --- a/lib/src/manager/state/cell_state.dart +++ b/lib/src/manager/state/cell_state.dart @@ -213,6 +213,11 @@ mixin CellState implements IPlutoGridState { setEditing(autoEditing, notify: false); notifyListeners(notify, setCurrentCell.hashCode); + + onActiveCellChanged?.call(PlutoGridOnActiveCellChangedEvent( + idx: rowIdx, + cell: _state._currentCell, + )); } @override diff --git a/lib/src/manager/state/grid_state.dart b/lib/src/manager/state/grid_state.dart index ffa3b2005..fc405d454 100644 --- a/lib/src/manager/state/grid_state.dart +++ b/lib/src/manager/state/grid_state.dart @@ -30,6 +30,8 @@ abstract class IGridState { PlutoOnRowsMovedEventCallback? get onRowsMoved; + PlutoOnActiveCellChangedEventCallback? get onActiveCellChanged; + PlutoOnColumnsMovedEventCallback? get onColumnsMoved; PlutoColumnMenuDelegate get columnMenuDelegate; diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index a36e966e5..6a02e738d 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -54,6 +54,9 @@ typedef PlutoRowColorCallback = Color Function( typedef PlutoSelectDateCallBack = Future Function( PlutoCell dateCell, PlutoColumn column); +typedef PlutoOnActiveCellChangedEventCallback = void Function( + PlutoGridOnActiveCellChangedEvent event); + /// [PlutoGrid] is a widget that receives columns and rows and is expressed as a grid-type UI. /// /// [PlutoGrid] supports movement and editing with the keyboard, @@ -80,6 +83,7 @@ class PlutoGrid extends PlutoStatefulWidget { this.onRowEnter, this.onRowExit, this.onRowsMoved, + this.onActiveCellChanged, this.onColumnsMoved, this.createHeader, this.createFooter, @@ -221,6 +225,12 @@ class PlutoGrid extends PlutoStatefulWidget { /// {@endtemplate} final PlutoOnRowsMovedEventCallback? onRowsMoved; + /// {@template pluto_grid_property_onActiveCellChanged} + /// Callback for receiving events + /// when the active cell is changed + /// {@endtemplate} + final PlutoOnActiveCellChangedEventCallback? onActiveCellChanged; + /// {@template pluto_grid_property_onColumnsMoved} /// Callback for receiving events /// when the column is moved by dragging the column @@ -548,6 +558,7 @@ class PlutoGridState extends PlutoStateWithChange { onRowEnter: widget.onRowEnter, onRowExit: widget.onRowExit, onRowsMoved: widget.onRowsMoved, + onActiveCellChanged: widget.onActiveCellChanged, onColumnsMoved: widget.onColumnsMoved, rowColorCallback: widget.rowColorCallback, selectDateCallback: widget.selectDateCallback, diff --git a/lib/src/pluto_grid_events.dart b/lib/src/pluto_grid_events.dart index eb0740423..ff81963cc 100644 --- a/lib/src/pluto_grid_events.dart +++ b/lib/src/pluto_grid_events.dart @@ -238,3 +238,14 @@ class PlutoGridOnColumnsMovedEvent { return text; } } + +/// When the active cell changes this callback is called +class PlutoGridOnActiveCellChangedEvent { + final int idx; + final PlutoCell? cell; + + const PlutoGridOnActiveCellChangedEvent({ + required this.idx, + required this.cell, + }); +} diff --git a/lib/src/pluto_grid_popup.dart b/lib/src/pluto_grid_popup.dart index e2256be9e..9ed7d967d 100644 --- a/lib/src/pluto_grid_popup.dart +++ b/lib/src/pluto_grid_popup.dart @@ -38,6 +38,9 @@ class PlutoGridPopup { /// {@macro pluto_grid_property_onRowsMoved} final PlutoOnRowsMovedEventCallback? onRowsMoved; + /// {@macro pluto_grid_property_onActiveCellChanged} + final PlutoOnActiveCellChangedEventCallback? onActiveCellChanged; + /// {@macro pluto_grid_property_onColumnsMoved} final PlutoOnColumnsMovedEventCallback? onColumnsMoved; @@ -90,6 +93,7 @@ class PlutoGridPopup { this.onRowDoubleTap, this.onRowSecondaryTap, this.onRowsMoved, + this.onActiveCellChanged, this.onColumnsMoved, this.createHeader, this.createFooter, @@ -152,6 +156,7 @@ class PlutoGridPopup { onRowDoubleTap: onRowDoubleTap, onRowSecondaryTap: onRowSecondaryTap, onRowsMoved: onRowsMoved, + onActiveCellChanged: onActiveCellChanged, onColumnsMoved: onColumnsMoved, createHeader: createHeader, createFooter: createFooter, diff --git a/test/src/pluto_grid_popup_test.dart b/test/src/pluto_grid_popup_test.dart index e5623b99e..ed822cc18 100644 --- a/test/src/pluto_grid_popup_test.dart +++ b/test/src/pluto_grid_popup_test.dart @@ -31,6 +31,7 @@ void main() { PlutoOnRowDoubleTapEventCallback? onRowDoubleTap, PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap, PlutoOnRowsMovedEventCallback? onRowsMoved, + PlutoOnActiveCellChangedEventCallback? onActiveCellChanged, PlutoOnColumnsMovedEventCallback? onColumnsMoved, CreateHeaderCallBack? createHeader, CreateFooterCallBack? createFooter, @@ -69,6 +70,7 @@ void main() { onRowDoubleTap: onRowDoubleTap, onRowSecondaryTap: onRowSecondaryTap, onRowsMoved: onRowsMoved, + onActiveCellChanged: onActiveCellChanged, onColumnsMoved: onColumnsMoved, createHeader: createHeader, createFooter: createFooter, From eafbdc5b0ec549bd057da7d2e1bcfe43aee4aad5 Mon Sep 17 00:00:00 2001 From: Adel Khayata <63958307+adelkhayata76@users.noreply.github.com> Date: Sun, 17 Nov 2024 09:21:30 +0400 Subject: [PATCH 63/80] Pumped intl library to: ^0.20.0 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 852b8286d..009593f5a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: sdk: flutter # Follows the intl version included in Flutter. # https://github.com/flutter/flutter/blob/84a1e904f44f9b0e9c4510138010edcc653163f8/packages/flutter_localizations/pubspec.yaml#L11 - intl: ^0.19.0 + intl: ^0.20.0 rxdart: ^0.28.0 collection: ^1.18.0 From 78cf7c078f77763305dc11c34f6ffbe0035d9f39 Mon Sep 17 00:00:00 2001 From: Author itsnotmeman Date: Fri, 22 Nov 2024 13:12:46 +0100 Subject: [PATCH 64/80] itsnotmeman v1: Introduced a new null check to prevent the 'Null check operator used on a null value' exception. --- lib/src/manager/shortcut/pluto_grid_shortcut_action.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart b/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart index 2e5f2364e..e2284058a 100644 --- a/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart +++ b/lib/src/manager/shortcut/pluto_grid_shortcut_action.dart @@ -658,6 +658,9 @@ class PlutoGridActionPasteValues extends PlutoGridShortcutAction { } Clipboard.getData('text/plain').then((value) { + if (value == null) { + return; + } List> textList = PlutoClipboardTransformation.stringToList(value!.text!); From c38cb9dfc55a08a31545dc68c344d81bbf605455 Mon Sep 17 00:00:00 2001 From: Stan Persoons Date: Mon, 2 Dec 2024 22:20:12 +0100 Subject: [PATCH 65/80] Fixed homescreen pointing to old package --- demo/lib/screen/home_screen.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/demo/lib/screen/home_screen.dart b/demo/lib/screen/home_screen.dart index 95fd1cc76..e84c7aada 100644 --- a/demo/lib/screen/home_screen.dart +++ b/demo/lib/screen/home_screen.dart @@ -114,8 +114,7 @@ class HomeScreen extends StatelessWidget { icon: const FaIcon(FontAwesomeIcons.link), color: Colors.white, onPressed: () { - launchUrl( - 'https://pub.dev/packages/pluto_grid'); + launchUrl('https://pub.dev/packages/pluto_grid_plus'); }, ), const Text( @@ -146,8 +145,7 @@ class HomeScreen extends StatelessWidget { icon: const FaIcon(FontAwesomeIcons.github), color: Colors.white, onPressed: () { - launchUrl( - 'https://github.com/bosskmk/pluto_grid'); + launchUrl('https://github.com/doonfrs/pluto_grid_plus'); }, ), const Text( From 2f2df5c3f66e6c0412986884f4f213439e9feb42 Mon Sep 17 00:00:00 2001 From: ArThoX Date: Tue, 3 Dec 2024 22:25:27 +0100 Subject: [PATCH 66/80] feat: continue to _update infinity scroll if screen not filled --- lib/src/plugin/pluto_infinity_scroll_rows.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/src/plugin/pluto_infinity_scroll_rows.dart b/lib/src/plugin/pluto_infinity_scroll_rows.dart index 76acb08ce..060862574 100644 --- a/lib/src/plugin/pluto_infinity_scroll_rows.dart +++ b/lib/src/plugin/pluto_infinity_scroll_rows.dart @@ -199,6 +199,15 @@ class _PlutoInfinityScrollRowsState extends State { _isFetching = false; _isLast = response.isLast; + + if (!_isLast) { + WidgetsBinding.instance.addPostFrameCallback((_) { + if (scroll.position.maxScrollExtent == 0) { + var lastRow = stateManager.rows.isNotEmpty ? stateManager.rows.last : null; + _update(lastRow); + } + }); + } }); } From cc4e9f83b883d3e7f890a77f76ecdf31b3451676 Mon Sep 17 00:00:00 2001 From: Stan Persoons <147701137+stan-at-work@users.noreply.github.com> Date: Wed, 4 Dec 2024 00:12:33 +0100 Subject: [PATCH 67/80] Changed function(Widget child) top WidgetBuilder --- lib/src/manager/pluto_grid_state_manager.dart | 2 +- lib/src/manager/state/row_state.dart | 2 +- lib/src/pluto_grid.dart | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index 79a00ea7e..aaff02b94 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -110,7 +110,7 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier } @override - final Widget Function(Widget rowWidget)? rowWrapper; + final WidgetBuilder? rowWrapper; @override final Widget Function(Widget editCellWidget, PlutoCell cell, diff --git a/lib/src/manager/state/row_state.dart b/lib/src/manager/state/row_state.dart index ab5e9ebbc..82a431aae 100644 --- a/lib/src/manager/state/row_state.dart +++ b/lib/src/manager/state/row_state.dart @@ -41,7 +41,7 @@ abstract class IRowState { /// Row of currently selected cell. PlutoRow? get currentRow; - Widget Function(Widget rowWidget)? get rowWrapper; + WidgetBuilder? get rowWrapper; PlutoRowColorCallback? get rowColorCallback; diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index 6a02e738d..b6c8aba3e 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -96,7 +96,8 @@ class PlutoGrid extends PlutoStatefulWidget { this.mode = PlutoGridMode.normal, }); - final Widget Function(Widget rowWidget)? rowWrapper; + /// A wrapper that wraps arround each row. + final WidgetBuilder? rowWrapper; final Widget Function(Widget editCellWidget, PlutoCell cell, TextEditingController controller)? editCellWrapper; From 8dfe854809ad12f3903c727752a76394ddbf20f8 Mon Sep 17 00:00:00 2001 From: Stan Persoons <147701137+stan-at-work@users.noreply.github.com> Date: Wed, 4 Dec 2024 01:29:20 +0100 Subject: [PATCH 68/80] Changed WidgetBuilder to Widget Function(BuildContext, Widget) --- lib/src/manager/pluto_grid_state_manager.dart | 2 +- lib/src/manager/state/row_state.dart | 12 ++++++------ lib/src/pluto_grid.dart | 4 ++-- lib/src/ui/pluto_body_rows.dart | 8 ++------ 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index aaff02b94..7643e6fcf 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -110,7 +110,7 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier } @override - final WidgetBuilder? rowWrapper; + final Widget Function(BuildContext context, Widget row)? rowWrapper; @override final Widget Function(Widget editCellWidget, PlutoCell cell, diff --git a/lib/src/manager/state/row_state.dart b/lib/src/manager/state/row_state.dart index 82a431aae..b2ef39c68 100644 --- a/lib/src/manager/state/row_state.dart +++ b/lib/src/manager/state/row_state.dart @@ -41,7 +41,7 @@ abstract class IRowState { /// Row of currently selected cell. PlutoRow? get currentRow; - WidgetBuilder? get rowWrapper; + Widget Function(BuildContext context, Widget row)? get rowWrapper; PlutoRowColorCallback? get rowColorCallback; @@ -224,11 +224,11 @@ mixin RowState implements IPlutoGridState { @override void setRowChecked( - PlutoRow row, - bool flag, { - bool notify = true, - bool checkedViaSelect = false, - }) { + PlutoRow row, + bool flag, { + bool notify = true, + bool checkedViaSelect = false, + }) { final findRow = refRows.firstWhereOrNull( (element) => element.key == row.key, ); diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index b6c8aba3e..8d1997d74 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -55,7 +55,7 @@ typedef PlutoSelectDateCallBack = Future Function( PlutoCell dateCell, PlutoColumn column); typedef PlutoOnActiveCellChangedEventCallback = void Function( - PlutoGridOnActiveCellChangedEvent event); + PlutoGridOnActiveCellChangedEvent event); /// [PlutoGrid] is a widget that receives columns and rows and is expressed as a grid-type UI. /// @@ -97,7 +97,7 @@ class PlutoGrid extends PlutoStatefulWidget { }); /// A wrapper that wraps arround each row. - final WidgetBuilder? rowWrapper; + final Widget Function(BuildContext context, Widget row)? rowWrapper; final Widget Function(Widget editCellWidget, PlutoCell cell, TextEditingController controller)? editCellWrapper; diff --git a/lib/src/ui/pluto_body_rows.dart b/lib/src/ui/pluto_body_rows.dart index ced13c926..b95101d0e 100644 --- a/lib/src/ui/pluto_body_rows.dart +++ b/lib/src/ui/pluto_body_rows.dart @@ -106,7 +106,7 @@ class PlutoBodyRowsState extends PlutoStateWithChange { : stateManager.rowTotalHeight, addRepaintBoundaries: false, itemBuilder: (ctx, i) { - Widget w = PlutoBaseRow( + Widget row = PlutoBaseRow( key: ValueKey('body_row_${_rows[i].key}'), rowIdx: i, row: _rows[i], @@ -115,11 +115,7 @@ class PlutoBodyRowsState extends PlutoStateWithChange { visibilityLayout: true, ); - if (stateManager.rowWrapper != null) { - w = stateManager.rowWrapper!(w); - } - - return w; + return stateManager.rowWrapper?.call(context, row) ?? row; }, ), ), From 53035c3202e2b6b2f9a93671365b5111a79e5030 Mon Sep 17 00:00:00 2001 From: Stan Persoons <147701137+stan-at-work@users.noreply.github.com> Date: Wed, 4 Dec 2024 01:36:56 +0100 Subject: [PATCH 69/80] Added stateManager --- lib/src/manager/pluto_grid_state_manager.dart | 2 +- lib/src/manager/state/row_state.dart | 2 +- lib/src/pluto_grid.dart | 5 ++++- lib/src/ui/pluto_body_rows.dart | 4 +++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index 7643e6fcf..b29d1690a 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -110,7 +110,7 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier } @override - final Widget Function(BuildContext context, Widget row)? rowWrapper; + final RowWrapper? rowWrapper; @override final Widget Function(Widget editCellWidget, PlutoCell cell, diff --git a/lib/src/manager/state/row_state.dart b/lib/src/manager/state/row_state.dart index b2ef39c68..48c466947 100644 --- a/lib/src/manager/state/row_state.dart +++ b/lib/src/manager/state/row_state.dart @@ -41,7 +41,7 @@ abstract class IRowState { /// Row of currently selected cell. PlutoRow? get currentRow; - Widget Function(BuildContext context, Widget row)? get rowWrapper; + RowWrapper? get rowWrapper; PlutoRowColorCallback? get rowColorCallback; diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index 8d1997d74..5da3da498 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -57,6 +57,9 @@ typedef PlutoSelectDateCallBack = Future Function( typedef PlutoOnActiveCellChangedEventCallback = void Function( PlutoGridOnActiveCellChangedEvent event); +typedef RowWrapper = Widget Function( + BuildContext context, Widget row, PlutoGridStateManager stateManager); + /// [PlutoGrid] is a widget that receives columns and rows and is expressed as a grid-type UI. /// /// [PlutoGrid] supports movement and editing with the keyboard, @@ -97,7 +100,7 @@ class PlutoGrid extends PlutoStatefulWidget { }); /// A wrapper that wraps arround each row. - final Widget Function(BuildContext context, Widget row)? rowWrapper; + final RowWrapper? rowWrapper; final Widget Function(Widget editCellWidget, PlutoCell cell, TextEditingController controller)? editCellWrapper; diff --git a/lib/src/ui/pluto_body_rows.dart b/lib/src/ui/pluto_body_rows.dart index b95101d0e..558611f0b 100644 --- a/lib/src/ui/pluto_body_rows.dart +++ b/lib/src/ui/pluto_body_rows.dart @@ -115,7 +115,9 @@ class PlutoBodyRowsState extends PlutoStateWithChange { visibilityLayout: true, ); - return stateManager.rowWrapper?.call(context, row) ?? row; + return stateManager.rowWrapper + ?.call(context, row, stateManager) ?? + row; }, ), ), From f8e232c37acd95fa0f93b431f583155492688fde Mon Sep 17 00:00:00 2001 From: Stan Persoons <147701137+stan-at-work@users.noreply.github.com> Date: Wed, 4 Dec 2024 01:49:42 +0100 Subject: [PATCH 70/80] Added coments --- lib/src/manager/pluto_grid_state_manager.dart | 1 + lib/src/manager/state/row_state.dart | 5 +++++ lib/src/pluto_grid.dart | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index b29d1690a..b977d151a 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -109,6 +109,7 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier _initialize(); } + /// {@macro pluto_grid_row_wrapper} @override final RowWrapper? rowWrapper; diff --git a/lib/src/manager/state/row_state.dart b/lib/src/manager/state/row_state.dart index 48c466947..8aeb7fa26 100644 --- a/lib/src/manager/state/row_state.dart +++ b/lib/src/manager/state/row_state.dart @@ -41,6 +41,11 @@ abstract class IRowState { /// Row of currently selected cell. PlutoRow? get currentRow; + /// {@template pluto_grid_row_wrapper} + /// + /// A wrapper that wraps arround each row. + /// + /// {@endtemplate} RowWrapper? get rowWrapper; PlutoRowColorCallback? get rowColorCallback; diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index 5da3da498..459280a66 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -99,7 +99,7 @@ class PlutoGrid extends PlutoStatefulWidget { this.mode = PlutoGridMode.normal, }); - /// A wrapper that wraps arround each row. + /// {@macro pluto_grid_row_wrapper} final RowWrapper? rowWrapper; final Widget Function(Widget editCellWidget, PlutoCell cell, From 80772c01dd703c96592e06d7c8c408f39743e41e Mon Sep 17 00:00:00 2001 From: Pierre CORSINI <50719398+pierrecorsini@users.noreply.github.com> Date: Thu, 5 Dec 2024 22:45:49 +0100 Subject: [PATCH 71/80] fix: guard agains missing scroll client (disposed) --- lib/src/plugin/pluto_infinity_scroll_rows.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/plugin/pluto_infinity_scroll_rows.dart b/lib/src/plugin/pluto_infinity_scroll_rows.dart index 060862574..756d0232f 100644 --- a/lib/src/plugin/pluto_infinity_scroll_rows.dart +++ b/lib/src/plugin/pluto_infinity_scroll_rows.dart @@ -202,7 +202,7 @@ class _PlutoInfinityScrollRowsState extends State { if (!_isLast) { WidgetsBinding.instance.addPostFrameCallback((_) { - if (scroll.position.maxScrollExtent == 0) { + if (scroll.hasClients && scroll.position.maxScrollExtent == 0) { var lastRow = stateManager.rows.isNotEmpty ? stateManager.rows.last : null; _update(lastRow); } From 10c9ce36d0e54e42936f0465428012a0bfdf21c4 Mon Sep 17 00:00:00 2001 From: Stan Persoons <147701137+stan-at-work@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:30:31 +0100 Subject: [PATCH 72/80] Fix unit tests --- demo/pubspec.yaml | 174 +++---- lib/src/helper/pluto_key_manager_event.dart | 448 ++++++++++-------- .../helper/pluto_key_manager_event_test.dart | 433 +++++++++-------- 3 files changed, 572 insertions(+), 483 deletions(-) diff --git a/demo/pubspec.yaml b/demo/pubspec.yaml index 9d24b2f0e..06ae60b00 100644 --- a/demo/pubspec.yaml +++ b/demo/pubspec.yaml @@ -1,86 +1,88 @@ -name: demo -description: PlutoGrid demo app. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ^3.0.0 - -dependencies: - flutter: - sdk: flutter - pluto_grid_plus: 8.4.3 - faker: ^2.1.0 - url_launcher: ^6.2.1 - font_awesome_flutter: ^10.6.0 - rainbow_color: ^2.0.1 - pluto_menu_bar: ^3.0.1 - file_saver: ^0.2.10 - pluto_grid_plus_export: 1.0.5 - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.6 - -dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^5.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - assets: - - assets/images/ - - fonts: - - family: OpenSans - fonts: - - asset: assets/fonts/open_sans/OpenSans-ExtraBold.ttf - weight: 800 - - asset: assets/fonts/open_sans/OpenSans-ExtraBoldItalic.ttf - weight: 800 - style: italic - - asset: assets/fonts/open_sans/OpenSans-Bold.ttf - weight: 700 - - asset: assets/fonts/open_sans/OpenSans-BoldItalic.ttf - weight: 700 - style: italic - - asset: assets/fonts/open_sans/OpenSans-SemiBold.ttf - weight: 600 - - asset: assets/fonts/open_sans/OpenSans-SemiBoldItalic.ttf - weight: 600 - style: italic - - asset: assets/fonts/open_sans/OpenSans-Regular.ttf - weight: 400 - - asset: assets/fonts/open_sans/OpenSans-Italic.ttf - weight: 400 - style: italic - - asset: assets/fonts/open_sans/OpenSans-Light.ttf - weight: 300 - - asset: assets/fonts/open_sans/OpenSans-LightItalic.ttf - weight: 300 - style: italic - +name: demo +description: PlutoGrid demo app. + +# The following line prevents the package from being accidentally published to +# pub.dev using `pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 1.0.0+1 + +environment: + sdk: ^3.0.0 + +dependency_overrides: + pluto_grid_plus: + path: ../ + +dependencies: + flutter: + sdk: flutter + pluto_grid_plus: 8.4.3 + faker: ^2.1.0 + url_launcher: ^6.2.1 + font_awesome_flutter: ^10.6.0 + rainbow_color: ^2.0.1 + pluto_menu_bar: ^3.0.1 + file_saver: ^0.2.10 + pluto_grid_plus_export: 1.0.5 + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.6 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + assets: + - assets/images/ + + fonts: + - family: OpenSans + fonts: + - asset: assets/fonts/open_sans/OpenSans-ExtraBold.ttf + weight: 800 + - asset: assets/fonts/open_sans/OpenSans-ExtraBoldItalic.ttf + weight: 800 + style: italic + - asset: assets/fonts/open_sans/OpenSans-Bold.ttf + weight: 700 + - asset: assets/fonts/open_sans/OpenSans-BoldItalic.ttf + weight: 700 + style: italic + - asset: assets/fonts/open_sans/OpenSans-SemiBold.ttf + weight: 600 + - asset: assets/fonts/open_sans/OpenSans-SemiBoldItalic.ttf + weight: 600 + style: italic + - asset: assets/fonts/open_sans/OpenSans-Regular.ttf + weight: 400 + - asset: assets/fonts/open_sans/OpenSans-Italic.ttf + weight: 400 + style: italic + - asset: assets/fonts/open_sans/OpenSans-Light.ttf + weight: 300 + - asset: assets/fonts/open_sans/OpenSans-LightItalic.ttf + weight: 300 + style: italic diff --git a/lib/src/helper/pluto_key_manager_event.dart b/lib/src/helper/pluto_key_manager_event.dart index 13294fcce..855c39e17 100644 --- a/lib/src/helper/pluto_key_manager_event.dart +++ b/lib/src/helper/pluto_key_manager_event.dart @@ -1,207 +1,241 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - -class PlutoKeyManagerEvent { - FocusNode focusNode; - KeyEvent event; - - PlutoKeyManagerEvent({ - required this.focusNode, - required this.event, - }); - - bool get needsThrottle => isMoving || isTab || isPageUp || isPageDown; - - bool get isKeyDownEvent => event.runtimeType == KeyDownEvent; - - bool get isKeyUpEvent => event.runtimeType == KeyUpEvent; - - bool get isMoving => isHorizontal || isVertical; - - bool get isHorizontal => isLeft || isRight; - - bool get isVertical => isUp || isDown; - - bool get isLeft => - event.logicalKey.keyId == LogicalKeyboardKey.arrowLeft.keyId; - - bool get isRight => - event.logicalKey.keyId == LogicalKeyboardKey.arrowRight.keyId; - - bool get isUp => event.logicalKey.keyId == LogicalKeyboardKey.arrowUp.keyId; - - bool get isDown => - event.logicalKey.keyId == LogicalKeyboardKey.arrowDown.keyId; - - bool get isHome => event.logicalKey.keyId == LogicalKeyboardKey.home.keyId; - - bool get isEnd => event.logicalKey.keyId == LogicalKeyboardKey.end.keyId; - - bool get isPageUp { - // windows 에서 pageUp keyId 가 0x10700000021. - return event.logicalKey.keyId == LogicalKeyboardKey.pageUp.keyId || - event.logicalKey.keyId == 0x10700000021; - } - - bool get isPageDown { - // windows 에서 pageDown keyId 가 0x10700000022. - return event.logicalKey.keyId == LogicalKeyboardKey.pageDown.keyId || - event.logicalKey.keyId == 0x10700000022; - } - - bool get isEsc => event.logicalKey.keyId == LogicalKeyboardKey.escape.keyId; - - bool get isEnter => - event.logicalKey.keyId == LogicalKeyboardKey.enter.keyId || - event.logicalKey.keyId == LogicalKeyboardKey.numpadEnter.keyId; - - bool get isTab => event.logicalKey.keyId == LogicalKeyboardKey.tab.keyId; - - bool get isF2 => event.logicalKey.keyId == LogicalKeyboardKey.f2.keyId; - - bool get isF3 => event.logicalKey.keyId == LogicalKeyboardKey.f3.keyId; - - bool get isF4 => event.logicalKey.keyId == LogicalKeyboardKey.f4.keyId; - - bool get isBackspace => - event.logicalKey.keyId == LogicalKeyboardKey.backspace.keyId; - - bool get isShift => - event.logicalKey.keyId == LogicalKeyboardKey.shift.keyId; - - bool get isControl => - event.logicalKey.keyId == LogicalKeyboardKey.control.keyId; - - bool get isCharacter => _characters.contains(event.logicalKey.keyId); - - bool get isCtrlC { - return isCtrlPressed && - event.logicalKey.keyId == LogicalKeyboardKey.keyC.keyId; - } - - bool get isCtrlV { - return isCtrlPressed && - event.logicalKey.keyId == LogicalKeyboardKey.keyV.keyId; - } - - bool get isCtrlA { - return isCtrlPressed && - event.logicalKey.keyId == LogicalKeyboardKey.keyA.keyId; - } - - bool get isShiftPressed { - return HardwareKeyboard.instance.isShiftPressed; - } - - bool get isCtrlPressed { - return HardwareKeyboard.instance.isMetaPressed || - HardwareKeyboard.instance.isControlPressed; - } - - bool get isAltPressed { - return HardwareKeyboard.instance.isAltPressed; - } - - bool get isModifierPressed { - return isShiftPressed || isCtrlPressed || isAltPressed; - } -} - -const _characters = { - 0x0000000041, // keyA, - 0x0000000042, // keyB, - 0x0000000043, // keyC, - 0x0000000044, // keyD, - 0x0000000045, // keyE, - 0x0000000046, // keyF, - 0x0000000047, // keyG, - 0x0000000048, // keyH, - 0x0000000049, // keyI, - 0x000000004a, // keyJ, - 0x000000004b, // keyK, - 0x000000004c, // keyL, - 0x000000004d, // keyM, - 0x000000004e, // keyN, - 0x000000004f, // keyO, - 0x0000000050, // keyP, - 0x0000000051, // keyQ, - 0x0000000052, // keyR, - 0x0000000053, // keyS, - 0x0000000054, // keyT, - 0x0000000055, // keyU, - 0x0000000056, // keyV, - 0x0000000057, // keyW, - 0x0000000058, // keyX, - 0x0000000059, // keyY, - 0x000000005a, // keyZ, - 0x0000000061, // keyA, - 0x0000000062, // keyB, - 0x0000000063, // keyC, - 0x0000000064, // keyD, - 0x0000000065, // keyE, - 0x0000000066, // keyF, - 0x0000000067, // keyG, - 0x0000000068, // keyH, - 0x0000000069, // keyI, - 0x000000006a, // keyJ, - 0x000000006b, // keyK, - 0x000000006c, // keyL, - 0x000000006d, // keyM, - 0x000000006e, // keyN, - 0x000000006f, // keyO, - 0x0000000070, // keyP, - 0x0000000071, // keyQ, - 0x0000000072, // keyR, - 0x0000000073, // keyS, - 0x0000000074, // keyT, - 0x0000000075, // keyU, - 0x0000000076, // keyV, - 0x0000000077, // keyW, - 0x0000000078, // keyX, - 0x0000000079, // keyY, - 0x000000007a, // keyZ, - 0x0000000031, // digit1, - 0x0000000032, // digit2, - 0x0000000033, // digit3, - 0x0000000034, // digit4, - 0x0000000035, // digit5, - 0x0000000036, // digit6, - 0x0000000037, // digit7, - 0x0000000038, // digit8, - 0x0000000039, // digit9, - 0x0000000030, // digit0, - 0x0000000020, // space, - 0x000000002d, // minus, - 0x000000003d, // equal, - 0x000000005b, // bracketLeft, - 0x000000005d, // bracketRight, - 0x000000005c, // backslash, - 0x000000003b, // semicolon, - 0x0000000027, // quote, - 0x0000000060, // backquote, - 0x000000002c, // comma, - 0x000000002e, // period, - 0x000000002f, // slash, - 0x0100070054, // numpadDivide, - 0x0100070055, // numpadMultiply, - 0x0100070056, // numpadSubtract, - 0x0100070057, // numpadAdd, - 0x0100070059, // numpad1, - 0x010007005a, // numpad2, - 0x010007005b, // numpad3, - 0x010007005c, // numpad4, - 0x010007005d, // numpad5, - 0x010007005e, // numpad6, - 0x010007005f, // numpad7, - 0x0100070060, // numpad8, - 0x0100070061, // numpad9, - 0x0100070062, // numpad0, - 0x0100070063, // numpadDecimal, - 0x0100070064, // intlBackslash, - 0x0100070067, // numpadEqual, - 0x0100070085, // numpadComma, - 0x0100070087, // intlRo, - 0x0100070089, // intlYen, - 0x01000700b6, // numpadParenLeft, - 0x01000700b7, // numpadParenRight, -}; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class PlutoKeyManagerEvent { + FocusNode focusNode; + KeyEvent event; + bool Function(LogicalKeyboardKey key)? isLogicalKeyPressed; + + PlutoKeyManagerEvent({ + required this.focusNode, + required this.event, + this.isLogicalKeyPressed, + }); + + bool get needsThrottle => isMoving || isTab || isPageUp || isPageDown; + + bool get isKeyDownEvent => event.runtimeType == KeyDownEvent; + + bool get isKeyUpEvent => event.runtimeType == KeyUpEvent; + + bool get isMoving => isHorizontal || isVertical; + + bool get isHorizontal => isLeft || isRight; + + bool get isVertical => isUp || isDown; + + bool get isLeft => + event.logicalKey.keyId == LogicalKeyboardKey.arrowLeft.keyId; + + bool get isRight => + event.logicalKey.keyId == LogicalKeyboardKey.arrowRight.keyId; + + bool get isUp => event.logicalKey.keyId == LogicalKeyboardKey.arrowUp.keyId; + + bool get isDown => + event.logicalKey.keyId == LogicalKeyboardKey.arrowDown.keyId; + + bool get isHome => event.logicalKey.keyId == LogicalKeyboardKey.home.keyId; + + bool get isEnd => event.logicalKey.keyId == LogicalKeyboardKey.end.keyId; + + bool get isPageUp { + // windows 에서 pageUp keyId 가 0x10700000021. + return event.logicalKey.keyId == LogicalKeyboardKey.pageUp.keyId || + event.logicalKey.keyId == 0x10700000021; + } + + bool get isPageDown { + // windows 에서 pageDown keyId 가 0x10700000022. + return event.logicalKey.keyId == LogicalKeyboardKey.pageDown.keyId || + event.logicalKey.keyId == 0x10700000022; + } + + bool get isEsc => event.logicalKey.keyId == LogicalKeyboardKey.escape.keyId; + + bool get isEnter => + event.logicalKey.keyId == LogicalKeyboardKey.enter.keyId || + event.logicalKey.keyId == LogicalKeyboardKey.numpadEnter.keyId; + + bool get isTab => event.logicalKey.keyId == LogicalKeyboardKey.tab.keyId; + + bool get isF2 => event.logicalKey.keyId == LogicalKeyboardKey.f2.keyId; + + bool get isF3 => event.logicalKey.keyId == LogicalKeyboardKey.f3.keyId; + + bool get isF4 => event.logicalKey.keyId == LogicalKeyboardKey.f4.keyId; + + bool get isBackspace => + event.logicalKey.keyId == LogicalKeyboardKey.backspace.keyId; + + /// This can be: + /// + /// LogicalKeyboardKey.shift + /// LogicalKeyboardKey.shiftLeft + /// LogicalKeyboardKey.shiftRight + bool get isShift => [ + LogicalKeyboardKey.shift, + LogicalKeyboardKey.shiftLeft, + LogicalKeyboardKey.shiftRight, + ].any((lKey) => lKey.keyId == event.logicalKey.keyId); + + bool get isLeftShift => [ + LogicalKeyboardKey.shiftLeft, + ].any((lKey) => lKey.keyId == event.logicalKey.keyId); + + bool get isRightShift => [ + LogicalKeyboardKey.shiftRight, + ].any((lKey) => lKey.keyId == event.logicalKey.keyId); + + /// This can be: + /// + /// LogicalKeyboardKey.control + /// LogicalKeyboardKey.controlLeft + /// LogicalKeyboardKey.controlRight + bool get isControl => [ + LogicalKeyboardKey.control, + LogicalKeyboardKey.controlLeft, + LogicalKeyboardKey.controlRight, + ].any((lKey) => lKey.keyId == event.logicalKey.keyId); + + bool get isLeftControl => [ + LogicalKeyboardKey.controlLeft, + ].any((lKey) => lKey.keyId == event.logicalKey.keyId); + + bool get isRightControl => [ + LogicalKeyboardKey.controlRight, + ].any((lKey) => lKey.keyId == event.logicalKey.keyId); + + bool get isCharacter => _characters.contains(event.logicalKey.keyId); + + bool get isCtrlC { + return isCtrlPressed && + event.logicalKey.keyId == LogicalKeyboardKey.keyC.keyId; + } + + bool get isCtrlV { + return isCtrlPressed && + event.logicalKey.keyId == LogicalKeyboardKey.keyV.keyId; + } + + bool get isCtrlA { + return isCtrlPressed && + event.logicalKey.keyId == LogicalKeyboardKey.keyA.keyId; + } + + bool get isShiftPressed { + return HardwareKeyboard.instance.isShiftPressed; + } + + bool get isCtrlPressed { + return HardwareKeyboard.instance.isMetaPressed || + HardwareKeyboard.instance.isControlPressed; + } + + bool get isAltPressed { + return HardwareKeyboard.instance.isAltPressed; + } + + bool get isModifierPressed { + return isShiftPressed || isCtrlPressed || isAltPressed; + } +} + +const _characters = { + 0x0000000041, // keyA, + 0x0000000042, // keyB, + 0x0000000043, // keyC, + 0x0000000044, // keyD, + 0x0000000045, // keyE, + 0x0000000046, // keyF, + 0x0000000047, // keyG, + 0x0000000048, // keyH, + 0x0000000049, // keyI, + 0x000000004a, // keyJ, + 0x000000004b, // keyK, + 0x000000004c, // keyL, + 0x000000004d, // keyM, + 0x000000004e, // keyN, + 0x000000004f, // keyO, + 0x0000000050, // keyP, + 0x0000000051, // keyQ, + 0x0000000052, // keyR, + 0x0000000053, // keyS, + 0x0000000054, // keyT, + 0x0000000055, // keyU, + 0x0000000056, // keyV, + 0x0000000057, // keyW, + 0x0000000058, // keyX, + 0x0000000059, // keyY, + 0x000000005a, // keyZ, + 0x0000000061, // keyA, + 0x0000000062, // keyB, + 0x0000000063, // keyC, + 0x0000000064, // keyD, + 0x0000000065, // keyE, + 0x0000000066, // keyF, + 0x0000000067, // keyG, + 0x0000000068, // keyH, + 0x0000000069, // keyI, + 0x000000006a, // keyJ, + 0x000000006b, // keyK, + 0x000000006c, // keyL, + 0x000000006d, // keyM, + 0x000000006e, // keyN, + 0x000000006f, // keyO, + 0x0000000070, // keyP, + 0x0000000071, // keyQ, + 0x0000000072, // keyR, + 0x0000000073, // keyS, + 0x0000000074, // keyT, + 0x0000000075, // keyU, + 0x0000000076, // keyV, + 0x0000000077, // keyW, + 0x0000000078, // keyX, + 0x0000000079, // keyY, + 0x000000007a, // keyZ, + 0x0000000031, // digit1, + 0x0000000032, // digit2, + 0x0000000033, // digit3, + 0x0000000034, // digit4, + 0x0000000035, // digit5, + 0x0000000036, // digit6, + 0x0000000037, // digit7, + 0x0000000038, // digit8, + 0x0000000039, // digit9, + 0x0000000030, // digit0, + 0x0000000020, // space, + 0x000000002d, // minus, + 0x000000003d, // equal, + 0x000000005b, // bracketLeft, + 0x000000005d, // bracketRight, + 0x000000005c, // backslash, + 0x000000003b, // semicolon, + 0x0000000027, // quote, + 0x0000000060, // backquote, + 0x000000002c, // comma, + 0x000000002e, // period, + 0x000000002f, // slash, + 0x0100070054, // numpadDivide, + 0x0100070055, // numpadMultiply, + 0x0100070056, // numpadSubtract, + 0x0100070057, // numpadAdd, + 0x0100070059, // numpad1, + 0x010007005a, // numpad2, + 0x010007005b, // numpad3, + 0x010007005c, // numpad4, + 0x010007005d, // numpad5, + 0x010007005e, // numpad6, + 0x010007005f, // numpad7, + 0x0100070060, // numpad8, + 0x0100070061, // numpad9, + 0x0100070062, // numpad0, + 0x0100070063, // numpadDecimal, + 0x0100070064, // intlBackslash, + 0x0100070067, // numpadEqual, + 0x0100070085, // numpadComma, + 0x0100070087, // intlRo, + 0x0100070089, // intlYen, + 0x01000700b6, // numpadParenLeft, + 0x01000700b7, // numpadParenRight, +}; diff --git a/test/src/helper/pluto_key_manager_event_test.dart b/test/src/helper/pluto_key_manager_event_test.dart index dc20b95b2..c31764414 100644 --- a/test/src/helper/pluto_key_manager_event_test.dart +++ b/test/src/helper/pluto_key_manager_event_test.dart @@ -1,190 +1,243 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid_plus.dart'; - -void main() { - late FocusNode focusNode; - - late PlutoKeyManagerEvent? keyManagerEvent; - - KeyEventResult callback(FocusNode node, KeyEvent event) { - keyManagerEvent = PlutoKeyManagerEvent( - focusNode: node, - event: event, - ); - - return KeyEventResult.handled; - } - - setUp(() { - focusNode = FocusNode(); - }); - - tearDown(() { - keyManagerEvent = null; - }); - - Future buildWidget({ - required WidgetTester tester, - required KeyEventResult Function(FocusNode, KeyEvent) callback, - }) async { - await tester.pumpWidget(MaterialApp( - home: FocusScope( - autofocus: true, - onKeyEvent: callback, - child: Focus( - focusNode: focusNode, - child: const SizedBox(width: 100, height: 100), - ), - ), - )); - - focusNode.requestFocus(); - } - - testWidgets( - '아무 키나 입력하면 isKeyDownEvent 가 true 여야 한다.', - (tester) async { - await buildWidget(tester: tester, callback: callback); - - const key = LogicalKeyboardKey.keyE; - await tester.sendKeyDownEvent(key); - expect(keyManagerEvent!.isKeyDownEvent, true); - await tester.sendKeyUpEvent(key); - expect(keyManagerEvent!.isKeyDownEvent, false); - }, - ); - - testWidgets( - 'Home 키를 입력하면 isHome 이 true 여야 한다.', - (tester) async { - late PlutoKeyManagerEvent keyManagerEvent; - - KeyEventResult callback(FocusNode node, KeyEvent event) { - keyManagerEvent = PlutoKeyManagerEvent( - focusNode: node, - event: event, - ); - - return KeyEventResult.handled; - } - - await buildWidget(tester: tester, callback: callback); - - const key = LogicalKeyboardKey.home; - await tester.sendKeyDownEvent(key); - expect(keyManagerEvent.isHome, true); - await tester.sendKeyUpEvent(key); - }, - ); - - testWidgets( - 'End 키를 입력하면 isEnd 가 true 여야 한다.', - (tester) async { - await buildWidget(tester: tester, callback: callback); - - const key = LogicalKeyboardKey.end; - await tester.sendKeyDownEvent(key); - expect(keyManagerEvent!.isEnd, true); - await tester.sendKeyUpEvent(key); - }, - ); - - testWidgets( - 'F4 키를 입력하면 isF4 가 true 여야 한다.', - (tester) async { - await buildWidget(tester: tester, callback: callback); - - const key = LogicalKeyboardKey.f4; - await tester.sendKeyDownEvent(key); - expect(keyManagerEvent!.isF4, true); - await tester.sendKeyUpEvent(key); - }, - ); - - testWidgets( - 'Backspace 키를 입력하면 isBackspace 가 true 여야 한다.', - (tester) async { - await buildWidget(tester: tester, callback: callback); - - const key = LogicalKeyboardKey.backspace; - await tester.sendKeyDownEvent(key); - expect(keyManagerEvent!.isBackspace, true); - await tester.sendKeyUpEvent(key); - }, - ); - - testWidgets( - 'Shift 키를 입력하면 isShift 가 true 여야 한다.', - (tester) async { - await buildWidget(tester: tester, callback: callback); - - const key = LogicalKeyboardKey.shift; - await tester.sendKeyDownEvent(key); - expect(keyManagerEvent!.isShift, true); - await tester.sendKeyUpEvent(key); - }, - ); - - testWidgets( - 'Control 키를 입력하면 isControl 가 true 여야 한다.', - (tester) async { - await buildWidget(tester: tester, callback: callback); - - const key = LogicalKeyboardKey.control; - await tester.sendKeyDownEvent(key); - expect(keyManagerEvent!.isControl, true); - await tester.sendKeyUpEvent(key); - }, - ); - - // While key combos still work in the real world, these 3 tests are failing due to what I suspect is an - // incomplete deprecation/migration from focusNode `onKey` to `onKeyEvent`. - // Flutter 3.19 does not trigger our event for `sendKeyUpEvent` only, and I prefer not - // to switch these tests to `sendKeyDownEvent` as that may cause unexpected behavior - // such as pasting multiple times due to repeating key presses. It might also be fine. - - // https://github.com/flutter/flutter/issues/136419 - testWidgets( - 'Control + C 키를 입력하면 isCtrlC 가 true 여야 한다.', - (tester) async { - await buildWidget(tester: tester, callback: callback); - - const key = LogicalKeyboardKey.control; - const key2 = LogicalKeyboardKey.keyC; - await tester.sendKeyDownEvent(key); - await tester.sendKeyUpEvent( - key2); // sendKeyUpEvent is not sending a keyManagerEvent - - expect(keyManagerEvent?.isCtrlC, true); - await tester.sendKeyUpEvent(key); - }, - ); - - testWidgets( - 'Control + V 키를 입력하면 isCtrlV 가 true 여야 한다.', - (tester) async { - await buildWidget(tester: tester, callback: callback); - - const key = LogicalKeyboardKey.control; - await tester.sendKeyDownEvent(key); - await tester.sendKeyUpEvent(LogicalKeyboardKey.keyV); - expect(keyManagerEvent!.isCtrlV, true); - await tester.sendKeyUpEvent(key); - }, - ); - - testWidgets( - 'Control + A 키를 입력하면 isCtrlA 가 true 여야 한다.', - (tester) async { - await buildWidget(tester: tester, callback: callback); - - const key = LogicalKeyboardKey.control; - await tester.sendKeyDownEvent(key); - await tester.sendKeyUpEvent(LogicalKeyboardKey.keyA); - expect(keyManagerEvent!.isCtrlA, true); - await tester.sendKeyUpEvent(key); - }, - ); -} +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; + +void main() { + late FocusNode focusNode; + + late PlutoKeyManagerEvent? keyManagerEvent; + + KeyEventResult callback(FocusNode node, KeyEvent event) { + keyManagerEvent = PlutoKeyManagerEvent( + focusNode: node, + event: event, + isLogicalKeyPressed: HardwareKeyboard.instance.isLogicalKeyPressed, + ); + + return KeyEventResult.handled; + } + + setUp(() { + focusNode = FocusNode(); + }); + + tearDown(() { + keyManagerEvent = null; + }); + + Future buildWidget({ + required WidgetTester tester, + required FocusOnKeyEventCallback callback, + }) async { + await tester.pumpWidget(MaterialApp( + home: FocusScope( + autofocus: true, + onKeyEvent: callback, + child: Focus( + focusNode: focusNode, + child: const SizedBox(width: 100, height: 100), + ), + ), + )); + + focusNode.requestFocus(); + } + + testWidgets( + '아무 키나 입력하면 isKeyDownEvent 가 true 여야 한다.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.keyE; + await tester.sendKeyDownEvent(key); + expect(keyManagerEvent!.isKeyDownEvent, true); + await tester.sendKeyUpEvent(key); + expect(keyManagerEvent!.isKeyDownEvent, false); + }, + ); + + testWidgets( + 'Home 키를 입력하면 isHome 이 true 여야 한다.', + (tester) async { + late PlutoKeyManagerEvent keyManagerEvent; + + KeyEventResult callback(FocusNode node, KeyEvent event) { + keyManagerEvent = PlutoKeyManagerEvent( + focusNode: node, + event: event, + ); + + return KeyEventResult.handled; + } + + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.home; + await tester.sendKeyDownEvent(key); + expect(keyManagerEvent.isHome, true); + await tester.sendKeyUpEvent(key); + }, + ); + + testWidgets( + 'End 키를 입력하면 isEnd 가 true 여야 한다.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.end; + await tester.sendKeyDownEvent(key); + expect(keyManagerEvent!.isEnd, true); + await tester.sendKeyUpEvent(key); + }, + ); + + testWidgets( + 'F4 키를 입력하면 isF4 가 true 여야 한다.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.f4; + await tester.sendKeyDownEvent(key); + expect(keyManagerEvent!.isF4, true); + await tester.sendKeyUpEvent(key); + }, + ); + + testWidgets( + 'Backspace 키를 입력하면 isBackspace 가 true 여야 한다.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.backspace; + await tester.sendKeyDownEvent(key); + expect(keyManagerEvent!.isBackspace, true); + await tester.sendKeyUpEvent(key); + }, + ); + + testWidgets( + 'When the Shift key is pressed, isShift must be `true`.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.shift; + await tester.sendKeyDownEvent(key); + expect(keyManagerEvent!.isShift, true); + await tester.sendKeyUpEvent(key); + }, + ); + + testWidgets( + 'When the LeftShift key is pressed, isLeftShift must be `true`.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.shiftLeft; + await tester.sendKeyDownEvent(key); + expect(keyManagerEvent!.isLeftShift, true); + await tester.sendKeyUpEvent(key); + }, + ); + + testWidgets( + 'When the RightShift key is pressed, RightShift must be `true`.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.shiftRight; + await tester.sendKeyDownEvent(key); + expect(keyManagerEvent!.isRightShift, true); + await tester.sendKeyUpEvent(key); + }, + ); + + testWidgets( + 'If the Control key is pressed, isControl should be true.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.control; + await tester.sendKeyDownEvent(key); + expect(keyManagerEvent!.isControl, true); + await tester.sendKeyUpEvent(key); + }, + ); + + testWidgets( + 'If the controlLeft key is pressed, isLeftControl should be true.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.controlLeft; + await tester.sendKeyDownEvent(key); + expect(keyManagerEvent!.isLeftControl, true); + await tester.sendKeyUpEvent(key); + }, + ); + + testWidgets( + 'If the controlRight key is pressed, isRightControl should be true.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.controlRight; + await tester.sendKeyDownEvent(key); + expect(keyManagerEvent!.isRightControl, true); + await tester.sendKeyUpEvent(key); + }, + ); + + testWidgets( + 'If the Control + C keys are pressed, isCtrlC should be true.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.control; + const key2 = LogicalKeyboardKey.keyC; + + await tester.sendKeyDownEvent(key); + await tester.sendKeyDownEvent(key2); + + expect(keyManagerEvent?.isCtrlC, true); + + await tester.sendKeyUpEvent(key); + await tester.sendKeyUpEvent(key2); + }, + ); + + testWidgets( + 'If the Control + V keys are pressed, isCtrlV should be true.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.control; + const key2 = LogicalKeyboardKey.keyV; + + await tester.sendKeyDownEvent(key); + await tester.sendKeyDownEvent(key2); + + expect(keyManagerEvent!.isCtrlV, true); + await tester.sendKeyUpEvent(key); + await tester.sendKeyUpEvent(key2); + }, + ); + + testWidgets( + 'If the Control + A keys are pressed, isCtrlA should be true.', + (tester) async { + await buildWidget(tester: tester, callback: callback); + + const key = LogicalKeyboardKey.control; + const key2 = LogicalKeyboardKey.keyA; + + await tester.sendKeyDownEvent(key); + await tester.sendKeyDownEvent(key2); + + expect(keyManagerEvent!.isCtrlA, true); + + await tester.sendKeyUpEvent(key); + await tester.sendKeyUpEvent(key2); + }, + ); +} From 1c917b8b37f7cb0574443d486fafe638a4f18729 Mon Sep 17 00:00:00 2001 From: Stan Persoons <147701137+stan-at-work@users.noreply.github.com> Date: Fri, 6 Dec 2024 19:33:25 +0100 Subject: [PATCH 73/80] Changed test to english --- .../helper/pluto_key_manager_event_test.dart | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/src/helper/pluto_key_manager_event_test.dart b/test/src/helper/pluto_key_manager_event_test.dart index c31764414..f91afa98f 100644 --- a/test/src/helper/pluto_key_manager_event_test.dart +++ b/test/src/helper/pluto_key_manager_event_test.dart @@ -45,7 +45,7 @@ void main() { } testWidgets( - '아무 키나 입력하면 isKeyDownEvent 가 true 여야 한다.', + 'When any key is pressed, isKeyDownEvent must be `true`.', (tester) async { await buildWidget(tester: tester, callback: callback); @@ -58,7 +58,7 @@ void main() { ); testWidgets( - 'Home 키를 입력하면 isHome 이 true 여야 한다.', + 'When the Home key is pressed, isHome must be `true`.', (tester) async { late PlutoKeyManagerEvent keyManagerEvent; @@ -81,7 +81,7 @@ void main() { ); testWidgets( - 'End 키를 입력하면 isEnd 가 true 여야 한다.', + 'When the End key is pressed, isEnd must be `true`.', (tester) async { await buildWidget(tester: tester, callback: callback); @@ -93,7 +93,7 @@ void main() { ); testWidgets( - 'F4 키를 입력하면 isF4 가 true 여야 한다.', + 'When the F4 key is pressed, isF4 must be `true`.', (tester) async { await buildWidget(tester: tester, callback: callback); @@ -105,7 +105,7 @@ void main() { ); testWidgets( - 'Backspace 키를 입력하면 isBackspace 가 true 여야 한다.', + 'When the Backspace key is pressed, isBackspace must be `true`.', (tester) async { await buildWidget(tester: tester, callback: callback); @@ -141,7 +141,7 @@ void main() { ); testWidgets( - 'When the RightShift key is pressed, RightShift must be `true`.', + 'When the RightShift key is pressed, isRightShift must be `true`.', (tester) async { await buildWidget(tester: tester, callback: callback); @@ -153,7 +153,7 @@ void main() { ); testWidgets( - 'If the Control key is pressed, isControl should be true.', + 'When the Control key is pressed, isControl must be `true`.', (tester) async { await buildWidget(tester: tester, callback: callback); @@ -165,7 +165,7 @@ void main() { ); testWidgets( - 'If the controlLeft key is pressed, isLeftControl should be true.', + 'When the LeftControl key is pressed, isLeftControl must be `true`.', (tester) async { await buildWidget(tester: tester, callback: callback); @@ -177,7 +177,7 @@ void main() { ); testWidgets( - 'If the controlRight key is pressed, isRightControl should be true.', + 'When the RightControl key is pressed, isRightControl must be `true`.', (tester) async { await buildWidget(tester: tester, callback: callback); @@ -189,7 +189,7 @@ void main() { ); testWidgets( - 'If the Control + C keys are pressed, isCtrlC should be true.', + 'When Control + C keys are pressed, isCtrlC must be `true`.', (tester) async { await buildWidget(tester: tester, callback: callback); @@ -207,7 +207,7 @@ void main() { ); testWidgets( - 'If the Control + V keys are pressed, isCtrlV should be true.', + 'When Control + V keys are pressed, isCtrlV must be `true`.', (tester) async { await buildWidget(tester: tester, callback: callback); @@ -224,7 +224,7 @@ void main() { ); testWidgets( - 'If the Control + A keys are pressed, isCtrlA should be true.', + 'When Control + A keys are pressed, isCtrlA must be `true`.', (tester) async { await buildWidget(tester: tester, callback: callback); From f0179124d8108e186f2ff7a21e4b9952a039bcaa Mon Sep 17 00:00:00 2001 From: Stan Persoons <147701137+stan-at-work@users.noreply.github.com> Date: Fri, 6 Dec 2024 20:04:36 +0100 Subject: [PATCH 74/80] Fixed test --- .../helper/pluto_aggregate_helper_test.dart | 824 +++++++++--------- 1 file changed, 412 insertions(+), 412 deletions(-) diff --git a/test/src/helper/pluto_aggregate_helper_test.dart b/test/src/helper/pluto_aggregate_helper_test.dart index 2bc4111d7..080be252c 100644 --- a/test/src/helper/pluto_aggregate_helper_test.dart +++ b/test/src/helper/pluto_aggregate_helper_test.dart @@ -1,412 +1,412 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:pluto_grid_plus/pluto_grid_plus.dart'; - -void main() { - group('sum', () { - test('숫자 컬럼이 아닌경우 0이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.text(), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: '10.001')}), - PlutoRow(cells: {'column': PlutoCell(value: '10.001')}), - PlutoRow(cells: {'column': PlutoCell(value: '10.001')}), - PlutoRow(cells: {'column': PlutoCell(value: '10.001')}), - PlutoRow(cells: {'column': PlutoCell(value: '10.001')}), - ]; - - expect(PlutoAggregateHelper.sum(rows: rows, column: column), 0); - }); - - test('[양수] condition 이 없이 sum 을 호출 한 경우 전체 합계 값이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10)}), - PlutoRow(cells: {'column': PlutoCell(value: 20)}), - PlutoRow(cells: {'column': PlutoCell(value: 30)}), - PlutoRow(cells: {'column': PlutoCell(value: 40)}), - PlutoRow(cells: {'column': PlutoCell(value: 50)}), - ]; - - expect(PlutoAggregateHelper.sum(rows: rows, column: column), 150); - }); - - test('[음수] condition 이 없이 sum 을 호출 한 경우 전체 합계 값이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: -10)}), - PlutoRow(cells: {'column': PlutoCell(value: -20)}), - PlutoRow(cells: {'column': PlutoCell(value: -30)}), - PlutoRow(cells: {'column': PlutoCell(value: -40)}), - PlutoRow(cells: {'column': PlutoCell(value: -50)}), - ]; - - expect(PlutoAggregateHelper.sum(rows: rows, column: column), -150); - }); - - test('[소수] condition 이 없이 sum 을 호출 한 경우 전체 합계 값이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###.###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - ]; - - expect(PlutoAggregateHelper.sum(rows: rows, column: column), 50.005); - }); - - test('condition 이 있는 경우 조건에 맞는 아이템의 합계 값이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###.###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - ]; - - expect( - PlutoAggregateHelper.sum( - rows: rows, - column: column, - filter: (PlutoCell cell) => cell.value == 10.001, - ), - 30.003, - ); - }); - - test('condition 이 있는 경우 조건에 맞는 아이템이 없다면 0이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###.###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - ]; - - expect( - PlutoAggregateHelper.sum( - rows: rows, - column: column, - filter: (PlutoCell cell) => cell.value == 10.003, - ), - 0, - ); - }); - }); - - group('average', () { - test('[양수] condition 이 없이 average 을 호출 한 경우 전체 합계 값이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10)}), - PlutoRow(cells: {'column': PlutoCell(value: 20)}), - PlutoRow(cells: {'column': PlutoCell(value: 30)}), - PlutoRow(cells: {'column': PlutoCell(value: 40)}), - PlutoRow(cells: {'column': PlutoCell(value: 50)}), - ]; - - expect(PlutoAggregateHelper.average(rows: rows, column: column), 30); - }); - - test('[음수] condition 이 없이 average 을 호출 한 경우 전체 합계 값이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: -10)}), - PlutoRow(cells: {'column': PlutoCell(value: -20)}), - PlutoRow(cells: {'column': PlutoCell(value: -30)}), - PlutoRow(cells: {'column': PlutoCell(value: -40)}), - PlutoRow(cells: {'column': PlutoCell(value: -50)}), - ]; - - expect(PlutoAggregateHelper.average(rows: rows, column: column), -30); - }); - - test('[소수] condition 이 없이 average 을 호출 한 경우 전체 합계 값이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###.###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), - ]; - - expect(PlutoAggregateHelper.average(rows: rows, column: column), 10.003); - }); - }); - - group('min', () { - test('[양수] condition 이 없이 min 을 호출 한 경우 최소 값이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 101)}), - PlutoRow(cells: {'column': PlutoCell(value: 102)}), - PlutoRow(cells: {'column': PlutoCell(value: 103)}), - PlutoRow(cells: {'column': PlutoCell(value: 104)}), - PlutoRow(cells: {'column': PlutoCell(value: 105)}), - ]; - - expect(PlutoAggregateHelper.min(rows: rows, column: column), 101); - }); - - test('[음수] condition 이 없이 min 을 호출 한 경우 최소 값이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: -101)}), - PlutoRow(cells: {'column': PlutoCell(value: -102)}), - PlutoRow(cells: {'column': PlutoCell(value: -103)}), - PlutoRow(cells: {'column': PlutoCell(value: -104)}), - PlutoRow(cells: {'column': PlutoCell(value: -105)}), - ]; - - expect(PlutoAggregateHelper.min(rows: rows, column: column), -105); - }); - - test('[소수] condition 이 없이 min 을 호출 한 경우 최소 값이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###.###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), - ]; - - expect(PlutoAggregateHelper.min(rows: rows, column: column), 10.001); - }); - - test('condition 이 있는 경우 조건에 맞는 아이템이 있다면 조건내에서 최소값이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###.###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), - ]; - - expect( - PlutoAggregateHelper.min( - rows: rows, - column: column, - filter: (PlutoCell cell) => cell.value >= 10.003, - ), - 10.003, - ); - }); - - test('condition 이 있는 경우 조건에 맞는 아이템이 없다면 null 이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###.###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - ]; - - expect( - PlutoAggregateHelper.min( - rows: rows, - column: column, - filter: (PlutoCell cell) => cell.value == 10.003, - ), - null, - ); - }); - }); - - group('max', () { - test('condition 이 있는 경우 조건에 맞는 아이템이 있다면 조건내에서 최대값이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###.###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), - ]; - - expect( - PlutoAggregateHelper.max( - rows: rows, - column: column, - filter: (PlutoCell cell) => cell.value >= 10.003, - ), - 10.005, - ); - }); - - test('condition 이 있는 경우 조건에 맞는 아이템이 없다면 null 이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###.###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), - ]; - - expect( - PlutoAggregateHelper.max( - rows: rows, - column: column, - filter: (PlutoCell cell) => cell.value >= 10.006, - ), - null, - ); - }); - }); - - group('count', () { - test('condition 이 없는 경우 전체 리스트 개수가 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###.###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), - ]; - - expect(PlutoAggregateHelper.count(rows: rows, column: column), 5); - }); - - test('condition 이 있는 경우 조건에 맞는 아이템이 있다면 조건에 맞는 아이템 개수가 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###.###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), - ]; - - expect( - PlutoAggregateHelper.count( - rows: rows, - column: column, - filter: (PlutoCell cell) => cell.value >= 10.003, - ), - 3, - ); - }); - - test('condition 이 있는 경우 조건에 맞는 아이템이 없다면 0 이 리턴 되어야 한다.', () { - final column = PlutoColumn( - title: 'column', - field: 'column', - type: PlutoColumnType.number(format: '#,###.###'), - ); - - final rows = [ - PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), - PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), - ]; - - expect( - PlutoAggregateHelper.count( - rows: rows, - column: column, - filter: (PlutoCell cell) => cell.value >= 10.006, - ), - 0, - ); - }); - }); -} +import 'package:flutter_test/flutter_test.dart'; +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; + +void main() { + group('sum', () { + test('숫자 컬럼이 아닌경우 0이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.text(), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: '10.001')}), + PlutoRow(cells: {'column': PlutoCell(value: '10.001')}), + PlutoRow(cells: {'column': PlutoCell(value: '10.001')}), + PlutoRow(cells: {'column': PlutoCell(value: '10.001')}), + PlutoRow(cells: {'column': PlutoCell(value: '10.001')}), + ]; + + expect(PlutoAggregateHelper.sum(rows: rows, column: column), 0); + }); + + test('[양수] condition 이 없이 sum 을 호출 한 경우 전체 합계 값이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10)}), + PlutoRow(cells: {'column': PlutoCell(value: 20)}), + PlutoRow(cells: {'column': PlutoCell(value: 30)}), + PlutoRow(cells: {'column': PlutoCell(value: 40)}), + PlutoRow(cells: {'column': PlutoCell(value: 50)}), + ]; + + expect(PlutoAggregateHelper.sum(rows: rows, column: column), 150); + }); + + test('[음수] condition 이 없이 sum 을 호출 한 경우 전체 합계 값이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: -10)}), + PlutoRow(cells: {'column': PlutoCell(value: -20)}), + PlutoRow(cells: {'column': PlutoCell(value: -30)}), + PlutoRow(cells: {'column': PlutoCell(value: -40)}), + PlutoRow(cells: {'column': PlutoCell(value: -50)}), + ]; + + expect(PlutoAggregateHelper.sum(rows: rows, column: column), -150); + }); + + test('[소수] condition 이 없이 sum 을 호출 한 경우 전체 합계 값이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###.###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + ]; + + expect(PlutoAggregateHelper.sum(rows: rows, column: column), 50.005); + }); + + test('condition 이 있는 경우 조건에 맞는 아이템의 합계 값이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###.###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + ]; + + expect( + PlutoAggregateHelper.sum( + rows: rows, + column: column, + filter: (PlutoCell cell) => cell.value == 10.001, + ), + 30.003, + ); + }); + + test('condition 이 있는 경우 조건에 맞는 아이템이 없다면 0이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###.###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + ]; + + expect( + PlutoAggregateHelper.sum( + rows: rows, + column: column, + filter: (PlutoCell cell) => cell.value == 10.003, + ), + null, + ); + }); + }); + + group('average', () { + test('[양수] condition 이 없이 average 을 호출 한 경우 전체 합계 값이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10)}), + PlutoRow(cells: {'column': PlutoCell(value: 20)}), + PlutoRow(cells: {'column': PlutoCell(value: 30)}), + PlutoRow(cells: {'column': PlutoCell(value: 40)}), + PlutoRow(cells: {'column': PlutoCell(value: 50)}), + ]; + + expect(PlutoAggregateHelper.average(rows: rows, column: column), 30); + }); + + test('[음수] condition 이 없이 average 을 호출 한 경우 전체 합계 값이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: -10)}), + PlutoRow(cells: {'column': PlutoCell(value: -20)}), + PlutoRow(cells: {'column': PlutoCell(value: -30)}), + PlutoRow(cells: {'column': PlutoCell(value: -40)}), + PlutoRow(cells: {'column': PlutoCell(value: -50)}), + ]; + + expect(PlutoAggregateHelper.average(rows: rows, column: column), -30); + }); + + test('[소수] condition 이 없이 average 을 호출 한 경우 전체 합계 값이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###.###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), + ]; + + expect(PlutoAggregateHelper.average(rows: rows, column: column), 10.003); + }); + }); + + group('min', () { + test('[양수] condition 이 없이 min 을 호출 한 경우 최소 값이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 101)}), + PlutoRow(cells: {'column': PlutoCell(value: 102)}), + PlutoRow(cells: {'column': PlutoCell(value: 103)}), + PlutoRow(cells: {'column': PlutoCell(value: 104)}), + PlutoRow(cells: {'column': PlutoCell(value: 105)}), + ]; + + expect(PlutoAggregateHelper.min(rows: rows, column: column), 101); + }); + + test('[음수] condition 이 없이 min 을 호출 한 경우 최소 값이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: -101)}), + PlutoRow(cells: {'column': PlutoCell(value: -102)}), + PlutoRow(cells: {'column': PlutoCell(value: -103)}), + PlutoRow(cells: {'column': PlutoCell(value: -104)}), + PlutoRow(cells: {'column': PlutoCell(value: -105)}), + ]; + + expect(PlutoAggregateHelper.min(rows: rows, column: column), -105); + }); + + test('[소수] condition 이 없이 min 을 호출 한 경우 최소 값이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###.###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), + ]; + + expect(PlutoAggregateHelper.min(rows: rows, column: column), 10.001); + }); + + test('condition 이 있는 경우 조건에 맞는 아이템이 있다면 조건내에서 최소값이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###.###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), + ]; + + expect( + PlutoAggregateHelper.min( + rows: rows, + column: column, + filter: (PlutoCell cell) => cell.value >= 10.003, + ), + 10.003, + ); + }); + + test('condition 이 있는 경우 조건에 맞는 아이템이 없다면 null 이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###.###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + ]; + + expect( + PlutoAggregateHelper.min( + rows: rows, + column: column, + filter: (PlutoCell cell) => cell.value == 10.003, + ), + null, + ); + }); + }); + + group('max', () { + test('condition 이 있는 경우 조건에 맞는 아이템이 있다면 조건내에서 최대값이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###.###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), + ]; + + expect( + PlutoAggregateHelper.max( + rows: rows, + column: column, + filter: (PlutoCell cell) => cell.value >= 10.003, + ), + 10.005, + ); + }); + + test('condition 이 있는 경우 조건에 맞는 아이템이 없다면 null 이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###.###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), + ]; + + expect( + PlutoAggregateHelper.max( + rows: rows, + column: column, + filter: (PlutoCell cell) => cell.value >= 10.006, + ), + null, + ); + }); + }); + + group('count', () { + test('condition 이 없는 경우 전체 리스트 개수가 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###.###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), + ]; + + expect(PlutoAggregateHelper.count(rows: rows, column: column), 5); + }); + + test('condition 이 있는 경우 조건에 맞는 아이템이 있다면 조건에 맞는 아이템 개수가 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###.###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), + ]; + + expect( + PlutoAggregateHelper.count( + rows: rows, + column: column, + filter: (PlutoCell cell) => cell.value >= 10.003, + ), + 3, + ); + }); + + test('condition 이 있는 경우 조건에 맞는 아이템이 없다면 0 이 리턴 되어야 한다.', () { + final column = PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(format: '#,###.###'), + ); + + final rows = [ + PlutoRow(cells: {'column': PlutoCell(value: 10.001)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.002)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.003)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.004)}), + PlutoRow(cells: {'column': PlutoCell(value: 10.005)}), + ]; + + expect( + PlutoAggregateHelper.count( + rows: rows, + column: column, + filter: (PlutoCell cell) => cell.value >= 10.006, + ), + 0, + ); + }); + }); +} From f0005781eb1a4c83af618468723ceb6754cbaafa Mon Sep 17 00:00:00 2001 From: Stan Persoons <147701137+stan-at-work@users.noreply.github.com> Date: Fri, 6 Dec 2024 20:09:34 +0100 Subject: [PATCH 75/80] Added tests on pull_req --- .github/workflows/tests.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 000000000..f72b9453d --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,13 @@ +name: Tests +on: + pull_request: + branches: + - master +jobs: + tests: + runs-on: ubuntu-latest + steps: + - name: Install Flutter Dependencies + run: flutter pub get + - name: Run Flutter Tests + run: flutter test From 64f470498fd60c475d5982a2fb456ff0893c510a Mon Sep 17 00:00:00 2001 From: spe Date: Sat, 7 Dec 2024 15:00:54 +0100 Subject: [PATCH 76/80] Add vs-code formatting restrictions --- .vscode/settings.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..8d4d525e8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dart.lineLength": 80, +} \ No newline at end of file From 80764b3b632610a11f8642b44732673eed86ab1b Mon Sep 17 00:00:00 2001 From: spe Date: Sat, 7 Dec 2024 15:37:54 +0100 Subject: [PATCH 77/80] Added empty screen to homepage --- demo/lib/screen/home_screen.dart | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/demo/lib/screen/home_screen.dart b/demo/lib/screen/home_screen.dart index e84c7aada..8daa879fc 100644 --- a/demo/lib/screen/home_screen.dart +++ b/demo/lib/screen/home_screen.dart @@ -1,5 +1,6 @@ import 'dart:math'; +import 'package:demo/screen/empty_screen.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -114,7 +115,8 @@ class HomeScreen extends StatelessWidget { icon: const FaIcon(FontAwesomeIcons.link), color: Colors.white, onPressed: () { - launchUrl('https://pub.dev/packages/pluto_grid_plus'); + launchUrl( + 'https://pub.dev/packages/pluto_grid_plus'); }, ), const Text( @@ -145,7 +147,8 @@ class HomeScreen extends StatelessWidget { icon: const FaIcon(FontAwesomeIcons.github), color: Colors.white, onPressed: () { - launchUrl('https://github.com/doonfrs/pluto_grid_plus'); + launchUrl( + 'https://github.com/doonfrs/pluto_grid_plus'); }, ), const Text( @@ -489,6 +492,14 @@ class PlutoFeatures extends StatelessWidget { Navigator.pushNamed(context, DarkModeScreen.routeName); }, ), + PlutoListTile.amber( + title: 'Empty', + description: + 'This screen is used during development, this is a template to test issues', + onTapLiveDemo: () { + Navigator.pushNamed(context, EmptyScreen.routeName); + }, + ), PlutoListTile.amber( title: 'Development', description: From aec6708e328b1ef69e0b6066dd771a6704114f45 Mon Sep 17 00:00:00 2001 From: spe Date: Sat, 7 Dec 2024 17:52:04 +0100 Subject: [PATCH 78/80] Added clear columns filter event --- demo/lib/main.dart | 1 + ...pluto_grid_clear_columns_filter_event.dart | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 lib/src/manager/event/pluto_grid_clear_columns_filter_event.dart diff --git a/demo/lib/main.dart b/demo/lib/main.dart index 7508fe929..82070b82c 100644 --- a/demo/lib/main.dart +++ b/demo/lib/main.dart @@ -53,6 +53,7 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( + debugShowCheckedModeBanner: false, initialRoute: kReleaseMode ? HomeScreen.routeName : DevelopmentScreen.routeName, routes: { diff --git a/lib/src/manager/event/pluto_grid_clear_columns_filter_event.dart b/lib/src/manager/event/pluto_grid_clear_columns_filter_event.dart new file mode 100644 index 000000000..c873b7e9f --- /dev/null +++ b/lib/src/manager/event/pluto_grid_clear_columns_filter_event.dart @@ -0,0 +1,24 @@ +import 'package:pluto_grid_plus/pluto_grid_plus.dart'; + +/// Event to clear the provided columns there filter +class PlutoGridClearColumnsFilterEvent extends PlutoGridEvent { + final Iterable? columns; + final int? debounceMilliseconds; + final PlutoGridEventType? eventType; + + PlutoGridClearColumnsFilterEvent({ + this.columns, + this.debounceMilliseconds, + this.eventType, + }) : super( + type: eventType ?? PlutoGridEventType.normal, + duration: Duration( + milliseconds: debounceMilliseconds?.abs() ?? + PlutoGridSettings.debounceMillisecondsForColumnFilter), + ); + + @override + void handler(PlutoGridStateManager stateManager) { + stateManager.setFilterWithFilterRows([]); + } +} From 0191c585740d0492a1ce693cc3989c6283e7145c Mon Sep 17 00:00:00 2001 From: spe Date: Sat, 7 Dec 2024 17:53:05 +0100 Subject: [PATCH 79/80] FIX for https://github.com/doonfrs/pluto_grid_plus/issues/105 --- lib/pluto_grid_plus.dart | 1 + .../event/pluto_grid_change_column_filter_event.dart | 12 +++++------- lib/src/ui/columns/pluto_column_filter.dart | 1 + 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/pluto_grid_plus.dart b/lib/pluto_grid_plus.dart index 04ed11a9f..daa732cd3 100644 --- a/lib/pluto_grid_plus.dart +++ b/lib/pluto_grid_plus.dart @@ -17,6 +17,7 @@ export './src/manager/event/pluto_grid_cannot_move_current_cell_event.dart'; export './src/manager/event/pluto_grid_cell_gesture_event.dart'; export './src/manager/event/pluto_grid_change_column_filter_event.dart'; export './src/manager/event/pluto_grid_change_column_sort_event.dart'; +export './src/manager/event/pluto_grid_clear_columns_filter_event.dart'; export './src/manager/event/pluto_grid_drag_rows_event.dart'; export './src/manager/event/pluto_grid_event.dart'; export './src/manager/event/pluto_grid_scroll_update_event.dart'; diff --git a/lib/src/manager/event/pluto_grid_change_column_filter_event.dart b/lib/src/manager/event/pluto_grid_change_column_filter_event.dart index bc4623d54..432f92b0e 100644 --- a/lib/src/manager/event/pluto_grid_change_column_filter_event.dart +++ b/lib/src/manager/event/pluto_grid_change_column_filter_event.dart @@ -7,21 +7,19 @@ class PlutoGridChangeColumnFilterEvent extends PlutoGridEvent { final PlutoFilterType filterType; final String filterValue; final int? debounceMilliseconds; + final PlutoGridEventType? eventType; PlutoGridChangeColumnFilterEvent({ required this.column, required this.filterType, required this.filterValue, this.debounceMilliseconds, + this.eventType, }) : super( - type: PlutoGridEventType.debounce, + type: eventType ?? PlutoGridEventType.normal, duration: Duration( - milliseconds: debounceMilliseconds == null - ? PlutoGridSettings.debounceMillisecondsForColumnFilter - : debounceMilliseconds < 0 - ? 0 - : debounceMilliseconds, - ), + milliseconds: debounceMilliseconds?.abs() ?? + PlutoGridSettings.debounceMillisecondsForColumnFilter), ); List _getFilterRows(PlutoGridStateManager? stateManager) { diff --git a/lib/src/ui/columns/pluto_column_filter.dart b/lib/src/ui/columns/pluto_column_filter.dart index 19e5b22a9..e669d5152 100644 --- a/lib/src/ui/columns/pluto_column_filter.dart +++ b/lib/src/ui/columns/pluto_column_filter.dart @@ -227,6 +227,7 @@ class PlutoColumnFilterState extends PlutoStateWithChange { column: widget.column, filterType: widget.column.defaultFilter, filterValue: changed, + eventType: PlutoGridEventType.debounce, debounceMilliseconds: stateManager.configuration.columnFilter.debounceMilliseconds, ), From 9f207328d599a5ba22e3e6e111b272256e58ab4c Mon Sep 17 00:00:00 2001 From: "ciocca@gmail.com" Date: Thu, 12 Dec 2024 22:31:37 -0300 Subject: [PATCH 80/80] Add optional width to column in PlutoColumnType.select --- lib/src/model/pluto_column_type.dart | 9 +++++++-- lib/src/ui/cells/pluto_select_cell.dart | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/src/model/pluto_column_type.dart b/lib/src/model/pluto_column_type.dart index 68256a852..01cb713cf 100644 --- a/lib/src/model/pluto_column_type.dart +++ b/lib/src/model/pluto_column_type.dart @@ -99,6 +99,7 @@ abstract class PlutoColumnType { bool enableColumnFilter = false, IconData? popupIcon = Icons.arrow_drop_down, Widget Function(dynamic item)? builder, + double? width, }) { return PlutoColumnTypeSelect( onItemSelected: onItemSelected ?? (event) {}, @@ -106,7 +107,8 @@ abstract class PlutoColumnType { items: items, enableColumnFilter: enableColumnFilter, popupIcon: popupIcon, - builder: builder); + builder: builder, + width: width); } /// Set as a date column. @@ -367,6 +369,8 @@ class PlutoColumnTypeSelect final bool enableColumnFilter; final Function(PlutoGridOnSelectedEvent event) onItemSelected; + final double? width; + @override final IconData? popupIcon; @@ -376,7 +380,8 @@ class PlutoColumnTypeSelect required this.items, required this.enableColumnFilter, this.popupIcon, - this.builder}); + this.builder, + this.width}); @override bool isValid(dynamic value) => items.contains(value) == true; diff --git a/lib/src/ui/cells/pluto_select_cell.dart b/lib/src/ui/cells/pluto_select_cell.dart index c31e454ac..f96f649a7 100644 --- a/lib/src/ui/cells/pluto_select_cell.dart +++ b/lib/src/ui/cells/pluto_select_cell.dart @@ -64,6 +64,7 @@ class PlutoSelectCellState extends State popupColumns = [ PlutoColumn( + width: widget.column.type.select.width ?? PlutoGridSettings.columnWidth, title: widget.column.title, field: widget.column.title, readOnly: true,