diff --git a/.codecov.yml b/.codecov.yml index 40964a5c7..4dc453a0f 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -4,17 +4,24 @@ codecov: coverage: precision: 2 round: down - range: "70...100" + range: "0...100" + status: + project: + default: + enabled: false + patch: + default: + enabled: false parsers: gcov: branch_detection: conditional: yes loop: yes - method: nod + method: no macro: no comment: layout: "reach,diff,flags,files,footer" behavior: default - require_changes: false + require_changes: false \ No newline at end of file diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index d4212fb89..9ca1884c0 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -8,13 +8,11 @@ on: jobs: build: runs-on: ubuntu-latest - env: - CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} steps: # Without this, there are no files in the directory. - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # using flutter - - uses: subosito/flutter-action@v2.4.0 + - uses: subosito/flutter-action@v2 with: channel: 'stable' - run: dart --version @@ -22,6 +20,7 @@ jobs: - run: flutter pub get - run: flutter test --coverage # codecov.io - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v5 with: - file: ./coverage/lcov.info \ No newline at end of file + files: ./coverage/lcov.info + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a7fafa2ae..3881abdae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [8.1.0] - 2025. 12. 12 + +* Updated for flutter 3.38 version. + +## [8.0.0] - 2024. 3. 1 + +* Updated for flutter 3.19 version. + ## [7.0.2] - 2023. 5. 13 * Add Japanese, Turkish languages. @@ -75,11 +83,11 @@ ## [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 @@ -90,7 +98,8 @@ * 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. + 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. ## [5.3.2] - 2022. 11. 2 @@ -138,7 +147,8 @@ * Add support for countries that use comma as Decimal separator. * Breaking change - Only available for flutter 3.3, - otherwise it'll show this error on console: "Error: No named parameter with the name 'disabledForegroundColor'" + otherwise it'll show this error on console: "Error: No named parameter with the name ' + disabledForegroundColor'" ## [5.0.5] - 2022. 8. 30 @@ -169,21 +179,24 @@ ## [5.0.0] - 2022. 7. 11 * 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. + 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` - Tap the column menu to display the context menu. Drag left or right to adjust the column width. - - Activate only `PlutoColumn.enableContextMenu` - You cannot adjust the column width by dragging the column menu. - - Only enable `PlutoColumn.enableDropToResize` - You cannot call the context menu by tapping the column menu. + - 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` + You cannot adjust the column width by dragging the column menu. + - 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. + 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, 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 @@ -191,23 +204,32 @@ * Display a scroll bar when moving the horizontal axis with the keyboard. * Changing the way columns are moved by dragging them. Previously, it was changed immediately in the onDragUpdate state. - Changed in onDragEnd state in the changed version. Change the background color of the column to be moved instead. + Changed in onDragEnd state in the changed version. Change the background color of the column to be + moved instead. (`PlutoGridStateManager.dragTargetColumnColor`) * 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 - 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. + - 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. Changed behavior: It does not move while dragging, but moves only when you mouse-up or tap-up. * Changed logic for scrolling when dragging rows, column or selecting rows or cells. - `Previous version`: Scrolling continues only when the pointer is moved continuously so that the move event of the mouse (tab) continues to occur - `Changed version`: If the move event of the mouse (tab) occurs only once, the scroll event continues in the scroll direction. The scroll animation continues to the end of the scroll direction even if the move event is not triggered by continuously moving the pointer. - The scroll animation stops when the pointer enters a grid that does not require scrolling or when a MouseUp(PointerUp) event is fired. + `Previous version`: Scrolling continues only when the pointer is moved continuously so that the + move event of the mouse (tab) continues to occur + `Changed version`: If the move event of the mouse (tab) occurs only once, the scroll event + continues in the scroll direction. The scroll animation continues to the end of the scroll + direction even if the move event is not triggered by continuously moving the pointer. + The scroll animation stops when the pointer enters a grid that does not require scrolling or when + a MouseUp(PointerUp) event is fired. * Expand Columns to cover the parent Container Width. * Support RTL. Changed left and right of `PlutoColumn.frozen` to start and end. @@ -215,7 +237,8 @@ `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`. + Settings such as color, size, icon, border, and text style have been moved + to `PlutoGridConfiguration.style`. * Even/Odd Color. Add `PlutoGridConfiguration.style.oddRowColor`, `PlutoGridConfiguration.style.evenRowColor`. * Set default row color. @@ -318,13 +341,15 @@ ## [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 * Added to be able to set the left and right padding of the cell. * Added option to automatically enter edit state when selecting a cell. -* Added keyboard move option with left and right arrow keys when reaching the left and right ends of text in edit state. +* Added keyboard move option with left and right arrow keys when reaching the left and right ends of + text in edit state. * Added titleSpan property to custom text or icon in column title. * Removed readOnly property of PlutoColumnType and added to PlutoColumn. * Added checkReadOnly callback to dynamically manipulate readOnly property. @@ -332,7 +357,8 @@ ## [2.6.1] - 2021. 11. 22 -* Fixed so that the onChanged callback is not called when text is entered while the cell is not in the edit state. +* Fixed so that the onChanged callback is not called when text is entered while the cell is not in + the edit state. ## [2.6.0] - 2021. 11. 19 @@ -358,7 +384,7 @@ ## [2.4.0] - 2021. 7. 31 -* Added pagination. +* Added pagination. * Added debounce on keyboard input in filter. ## [2.3.0] - 2021. 7. 7 @@ -368,7 +394,8 @@ ## [2.2.1] - 2021. 6. 26 -* Added enableDropToResize option when creating a column. (enables an icon for adjusting the width of a column when there is no context menu) +* Added enableDropToResize option when creating a column. (enables an icon for adjusting the width + of a column when there is no context menu) * Fix scroll bar drag behavior ## [2.2.0] - 2021. 5. 29 @@ -382,7 +409,7 @@ ## [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 @@ -421,10 +448,11 @@ ## [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... +* Class name change. Just like changing PlutoConfiguration to PlutoGridConfiguration, the word Grid + was added in the middle. + - PlutoStateManager > PlutoGridStateManager + - PlutoOnLoadedEvent > PlutoGridOnLoadedEvent + - Many other classes... ## [1.0.0-pre.10] - 2020. 12. 21 @@ -432,9 +460,11 @@ ## [1.0.0-pre.9] - 2020. 12. 20 -* The method of setting the filter has changed. columnFilters in configuration changed to columnFilterConfig. +* The method of setting the filter has changed. columnFilters in configuration changed to + columnFilterConfig. * Different default filters can be set for each column. -* Modified to close the popup if there is no filter to clear when clicking the clear button in the filter popup. +* Modified to close the popup if there is no filter to clear when clicking the clear button in the + filter popup. * Rename DatetimeHelper to DateTimeHelper. ## [1.0.0-pre.8] - 2020. 12. 16 @@ -459,9 +489,9 @@ ## [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 @@ -490,13 +520,16 @@ 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 @@ -505,7 +538,8 @@ ## [0.1.20] - 2020. 10. 28 -* Add textAlign to column property.(PlutoColumnTextAlign.Left, or Right) [#49](https://github.com/bosskmk/pluto_grid/issues/49) +* Add textAlign to column property.(PlutoColumnTextAlign.Left, or + Right) [#49](https://github.com/bosskmk/pluto_grid/issues/49) ## [0.1.19] - 2020. 10. 23 @@ -525,13 +559,15 @@ * Fixed column problem when adjusting column width. * When the date is MM/dd/yyyy, the initial value of the pop-up is incorrect. -* When startDate, endDate are present, the initial value of the popup is not filled or scrolling fails. +* When startDate, endDate are present, the initial value of the popup is not filled or scrolling + fails. * When the date is MM/dd/yyyy, misalignment error. * Modify to operate the sorting criteria in the order of items in the Select Type Column. ## [0.1.15] - 2020. 09. 28 -* Modified so that the Grid does not force focus and works properly according to the situation in which focus get received or taken away. +* Modified so that the Grid does not force focus and works properly according to the situation in + which focus get received or taken away. ## [0.1.14] - 2020. 09. 27 @@ -564,7 +600,8 @@ * Add None Selecting mode for states that do not require multi-selection. * Add selecting-mode for selecting date range. -* Difference in Enter key in TextField when using RawKeyboardListener overlapping. [https://github.com/flutter/flutter/issues/65170](https://github.com/flutter/flutter/issues/65170) +* Difference in Enter key in TextField when using RawKeyboardListener + overlapping. [https://github.com/flutter/flutter/issues/65170](https://github.com/flutter/flutter/issues/65170) ## [0.1.8] - 2020. 9. 3 @@ -572,7 +609,8 @@ ## [0.1.7] - 2020. 9. 3 -* Change the way to move between grids in dual grid mode. When moving the arrow keys, the focus moves when reaching the left and right ends. +* Change the way to move between grids in dual grid mode. When moving the arrow keys, the focus + moves when reaching the left and right ends. * Update Demo. ## [0.1.6] - 2020. 9. 2 @@ -612,8 +650,10 @@ * Column shift : Change the order of the columns by dragging the column title. * Column sort : Sort the list by clicking on the column heading. * Column width : Change the column width by dragging the icon to the right of the column title. -* Column action : Click the icon to the right of the column title, you can control the column with the column action menu. +* Column action : Click the icon to the right of the column title, you can control the column with + the column action menu. * Multi selection : By long tapping or clicking and moving. * Copy & paste : Ctrl(macos : Meta) + C or V. -* Select Row Popup : Same as the grid, a selection popup that can be used when selecting an item from a list. +* Select Row Popup : Same as the grid, a selection popup that can be used when selecting an item + from a list. * Keyboard support : Arrow keys, Enter(Shift + Enter), Tab(Shift +Tab), Esc... diff --git a/README.md b/README.md index 3def278a3..16f1aee1c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## PlutoGrid for flutter - v7.0.2 +## PlutoGrid for flutter - v8.1.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) @@ -6,7 +6,8 @@
-`PlutoGrid` is a `DataGrid` that can be operated with the keyboard in various situations such as moving cells. +`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. @@ -14,27 +15,32 @@ If you comment on an issue, mobile improvements can be made quickly.
### [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) + > Check out how to install from the official distribution site.
### [Documentation](https://pluto.weblaze.dev/series/pluto-grid) + > The documentation has more details.
### [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) + > Report any questions or errors.
@@ -50,59 +56,71 @@ If you comment on an issue, mobile improvements can be made quickly. ### 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. + ![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. + ![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. + ![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. + ![PlutoGrid Multi select](https://bosskmk.github.io/images/pluto_grid/2.8.0/pluto_grid_2.8.0_05.png)
### Example + Generate the data to be used in the grid. + ```dart List columns = [ + /// Text Column definition PlutoColumn( title: 'text column', field: 'text_field', type: PlutoColumnType.text(), ), + /// Number Column definition PlutoColumn( title: 'number column', field: 'number_field', type: PlutoColumnType.number(), ), + /// Select Column definition PlutoColumn( title: 'select column', field: 'select_field', type: PlutoColumnType.select(['item1', 'item2', 'item3']), ), + /// Datetime Column definition PlutoColumn( title: 'date column', field: 'date_field', type: PlutoColumnType.date(), ), + /// Time Column definition PlutoColumn( title: 'time column', @@ -143,6 +161,7 @@ List rows = [ ``` Create a grid with the data created above. + ```dart @override Widget build(BuildContext context) { @@ -173,6 +192,8 @@ Widget build(BuildContext context) { | Flutter | PlutoGrid | |------------------|-----------------------| +| 3.38.0 or higher | 8.1.0 or higher | +| 3.19.0 or higher | 8.0.0 or higher | | 3.10.0 or higher | 7.0.0 or higher | | 3.7.0 or higher | 6.0.0 or higher | | 3.3.0 or higher | 5.0.6 or higher | @@ -184,7 +205,9 @@ For other versions, contact the issue
### 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) diff --git a/demo/ios/Flutter/ephemeral/flutter_lldb_helper.py b/demo/ios/Flutter/ephemeral/flutter_lldb_helper.py new file mode 100644 index 000000000..a88caf99d --- /dev/null +++ b/demo/ios/Flutter/ephemeral/flutter_lldb_helper.py @@ -0,0 +1,32 @@ +# +# Generated file, do not edit. +# + +import lldb + +def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict): + """Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages.""" + base = frame.register["x0"].GetValueAsAddress() + page_len = frame.register["x1"].GetValueAsUnsigned() + + # Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the + # first page to see if handled it correctly. This makes diagnosing + # misconfiguration (e.g. missing breakpoint) easier. + data = bytearray(page_len) + data[0:8] = b'IHELPED!' + + error = lldb.SBError() + frame.GetThread().GetProcess().WriteMemory(base, data, error) + if not error.Success(): + print(f'Failed to write into {base}[+{page_len}]', error) + return + +def __lldb_init_module(debugger: lldb.SBDebugger, _): + target = debugger.GetDummyTarget() + # Caveat: must use BreakpointCreateByRegEx here and not + # BreakpointCreateByName. For some reasons callback function does not + # get carried over from dummy target for the later. + bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$") + bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__)) + bp.SetAutoContinue(True) + print("-- LLDB integration loaded --") diff --git a/demo/ios/Flutter/ephemeral/flutter_lldbinit b/demo/ios/Flutter/ephemeral/flutter_lldbinit new file mode 100644 index 000000000..e3ba6fbed --- /dev/null +++ b/demo/ios/Flutter/ephemeral/flutter_lldbinit @@ -0,0 +1,5 @@ +# +# Generated file, do not edit. +# + +command script import --relative-to-command-file flutter_lldb_helper.py diff --git a/demo/lib/main.dart b/demo/lib/main.dart index 3c5d5cbd3..7508fe929 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) { @@ -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/development_screen.dart b/demo/lib/screen/development_screen.dart index 87d7b5088..15f7ac7e9 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' hide Color, Image; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; @@ -13,14 +13,16 @@ enum _Test { c; bool get isA => this == _Test.a; + bool get isB => this == _Test.b; + bool get isC => this == _Test.c; } 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 +359,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 +409,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 +658,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: PlutoMenuItemStyle( + textStyle: const 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..2c81e49a3 100644 --- a/demo/lib/screen/empty_screen.dart +++ b/demo/lib/screen/empty_screen.dart @@ -6,7 +6,7 @@ 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..816f66cd4 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' hide Color; import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.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..57918d854 100644 --- a/demo/lib/screen/feature/add_rows_asynchronously.dart +++ b/demo/lib/screen/feature/add_rows_asynchronously.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..7e3a46dbd 100644 --- a/demo/lib/screen/feature/cell_renderer_screen.dart +++ b/demo/lib/screen/feature/cell_renderer_screen.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..380566b74 100644 --- a/demo/lib/screen/feature/cell_selection_screen.dart +++ b/demo/lib/screen/feature/cell_selection_screen.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..aea6ac5d7 100644 --- a/demo/lib/screen/feature/column_filtering_screen.dart +++ b/demo/lib/screen/feature/column_filtering_screen.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..cb462da9e 100644 --- a/demo/lib/screen/feature/column_footer_screen.dart +++ b/demo/lib/screen/feature/column_footer_screen.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..075e517eb 100644 --- a/demo/lib/screen/feature/column_freezing_screen.dart +++ b/demo/lib/screen/feature/column_freezing_screen.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..491fd5922 100644 --- a/demo/lib/screen/feature/column_group_screen.dart +++ b/demo/lib/screen/feature/column_group_screen.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..d1504dd55 100644 --- a/demo/lib/screen/feature/column_hiding_screen.dart +++ b/demo/lib/screen/feature/column_hiding_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..98934c05c 100644 --- a/demo/lib/screen/feature/column_menu_screen.dart +++ b/demo/lib/screen/feature/column_menu_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..855c276a2 100644 --- a/demo/lib/screen/feature/column_moving_screen.dart +++ b/demo/lib/screen/feature/column_moving_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..9ac95507e 100644 --- a/demo/lib/screen/feature/column_resizing_screen.dart +++ b/demo/lib/screen/feature/column_resizing_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..07de5f2f5 100644 --- a/demo/lib/screen/feature/column_sorting_screen.dart +++ b/demo/lib/screen/feature/column_sorting_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..517807349 100644 --- a/demo/lib/screen/feature/copy_and_paste_screen.dart +++ b/demo/lib/screen/feature/copy_and_paste_screen.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..dea59ab1c 100644 --- a/demo/lib/screen/feature/currency_type_column_screen.dart +++ b/demo/lib/screen/feature/currency_type_column_screen.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..653fae3fa 100644 --- a/demo/lib/screen/feature/dark_mode_screen.dart +++ b/demo/lib/screen/feature/dark_mode_screen.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..4cdbd978f 100644 --- a/demo/lib/screen/feature/date_type_column_screen.dart +++ b/demo/lib/screen/feature/date_type_column_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..f45cd265e 100644 --- a/demo/lib/screen/feature/dual_mode_screen.dart +++ b/demo/lib/screen/feature/dual_mode_screen.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..2600d0729 100644 --- a/demo/lib/screen/feature/editing_state_screen.dart +++ b/demo/lib/screen/feature/editing_state_screen.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..117bc8aaf 100644 --- a/demo/lib/screen/feature/export_screen.dart +++ b/demo/lib/screen/feature/export_screen.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..89b437643 100644 --- a/demo/lib/screen/feature/grid_as_popup_screen.dart +++ b/demo/lib/screen/feature/grid_as_popup_screen.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..72ca456b3 100644 --- a/demo/lib/screen/feature/listing_mode_screen.dart +++ b/demo/lib/screen/feature/listing_mode_screen.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(); @@ -115,7 +115,7 @@ class _ListingModeScreenState extends State { }, style: ButtonStyle( backgroundColor: - MaterialStateProperty.all( + WidgetStateProperty.all( Colors.blue, ), ), @@ -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( @@ -204,7 +202,7 @@ class _ListingModeScreenState extends State { }, style: ButtonStyle( backgroundColor: - MaterialStateProperty.all( + WidgetStateProperty.all( Colors.blue, ), ), diff --git a/demo/lib/screen/feature/moving_screen.dart b/demo/lib/screen/feature/moving_screen.dart index 459558d4d..1e75596f7 100644 --- a/demo/lib/screen/feature/moving_screen.dart +++ b/demo/lib/screen/feature/moving_screen.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..a63865e4b 100644 --- a/demo/lib/screen/feature/number_type_column_screen.dart +++ b/demo/lib/screen/feature/number_type_column_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..ab4b362d8 100644 --- a/demo/lib/screen/feature/row_color_screen.dart +++ b/demo/lib/screen/feature/row_color_screen.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..b2e77d901 100644 --- a/demo/lib/screen/feature/row_group_screen.dart +++ b/demo/lib/screen/feature/row_group_screen.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..e46f57c5f 100644 --- a/demo/lib/screen/feature/row_infinity_scroll_screen.dart +++ b/demo/lib/screen/feature/row_infinity_scroll_screen.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..9648bbd00 100644 --- a/demo/lib/screen/feature/row_lazy_pagination_screen.dart +++ b/demo/lib/screen/feature/row_lazy_pagination_screen.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..1c9daa332 100644 --- a/demo/lib/screen/feature/row_moving_screen.dart +++ b/demo/lib/screen/feature/row_moving_screen.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..686844366 100644 --- a/demo/lib/screen/feature/row_pagination_screen.dart +++ b/demo/lib/screen/feature/row_pagination_screen.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..332d44ced 100644 --- a/demo/lib/screen/feature/row_selection_screen.dart +++ b/demo/lib/screen/feature/row_selection_screen.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..b14a5f992 100644 --- a/demo/lib/screen/feature/row_with_checkbox_screen.dart +++ b/demo/lib/screen/feature/row_with_checkbox_screen.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..1ea106712 100644 --- a/demo/lib/screen/feature/rtl_screen.dart +++ b/demo/lib/screen/feature/rtl_screen.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..66162f8db 100644 --- a/demo/lib/screen/feature/selection_type_column_screen.dart +++ b/demo/lib/screen/feature/selection_type_column_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..4e9fbf7e6 100644 --- a/demo/lib/screen/feature/text_type_column_screen.dart +++ b/demo/lib/screen/feature/text_type_column_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..1a676ef32 100644 --- a/demo/lib/screen/feature/time_type_column_screen.dart +++ b/demo/lib/screen/feature/time_type_column_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..6d6bc0068 100644 --- a/demo/lib/screen/feature/value_formatter_screen.dart +++ b/demo/lib/screen/feature/value_formatter_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..5ce794577 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/manek/AppData/Local/Pub/Cache/hosted/pub.dev/url_launcher_linux-3.2.2/ \ No newline at end of file diff --git a/demo/pubspec.yaml b/demo/pubspec.yaml index 1353d10e3..fc7f7b93c 100644 --- a/demo/pubspec.yaml +++ b/demo/pubspec.yaml @@ -25,20 +25,20 @@ dependencies: sdk: flutter pluto_grid: path: ../ - faker: ^2.0.0 - url_launcher: ^6.1.6 - font_awesome_flutter: ^10.2.1 + faker: ^2.2.0 + url_launcher: ^6.3.2 + font_awesome_flutter: ^10.12.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.8 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.1 + flutter_lints: ^6.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/demo/web/index.html b/demo/web/index.html index 1460b5e9b..4d3e26048 100644 --- a/demo/web/index.html +++ b/demo/web/index.html @@ -1,45 +1,35 @@ - + - - + Fore more details: + * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base + --> + - - - + + + - - - - - + + + + + - - + + - example - + example + - - - + 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/example/.gitignore b/example/.gitignore index 6d47c6f34..952722ca3 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -33,7 +33,6 @@ pubspec.lock # Web related -lib/generated_plugin_registrant.dart # Symbolication related app.*.symbols diff --git a/example/lib/main.dart b/example/lib/main.dart index 260b5266f..b47787d75 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -6,7 +6,7 @@ void main() { } 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..f3ba8d8fb 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -35,7 +35,7 @@ dependencies: # 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.8 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: ^6.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/web/index.html b/example/web/index.html index b6b9dd234..9d98d4b66 100644 --- a/example/web/index.html +++ b/example/web/index.html @@ -1,104 +1,38 @@ - - + This is a placeholder for base href that will be replaced by the value of + the `--base-href` argument provided to `flutter build`. + --> + - - - + + + - - - - - + + + + + - - + + - example - + example + - - + diff --git a/lib/src/helper/filter_helper.dart b/lib/src/helper/filter_helper.dart index 9a47632ba..fb98c127a 100644 --- a/lib/src/helper/filter_helper.dart +++ b/lib/src/helper/filter_helper.dart @@ -111,7 +111,7 @@ class FilterHelper { }; } - /// Converts List type with filtering information to Map type. + /// Converts List<PlutoRow> type with filtering information to Map type. /// /// [allField] determines the key value of the filter applied to the entire scope. /// Default is all. @@ -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_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/helper/show_column_menu.dart b/lib/src/helper/show_column_menu.dart index 878eab54c..060088a60 100644 --- a/lib/src/helper/show_column_menu.dart +++ b/lib/src/helper/show_column_menu.dart @@ -104,7 +104,7 @@ List> _getDefaultColumnMenuItems({ }) { final Color textColor = stateManager.style.cellTextStyle.color!; - final Color disableTextColor = textColor.withOpacity(0.5); + final Color disableTextColor = textColor.withValues(alpha: 0.5); final bool enoughFrozenColumnsWidth = stateManager.enoughFrozenColumnsWidth( stateManager.maxWidth! - column.width, @@ -182,7 +182,7 @@ PopupMenuItem _buildMenuItem({ child: Text( text, style: TextStyle( - color: enabled ? textColor : textColor!.withOpacity(0.5), + color: enabled ? textColor : textColor!.withValues(alpha: 0.5), fontSize: 13, ), ), diff --git a/lib/src/manager/pluto_grid_event_manager.dart b/lib/src/manager/pluto_grid_event_manager.dart index f448fd7a5..296afeadd 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), + (s) => TimerStream(s, s.duration as Duration), trailing: false, leading: true, ), @@ -42,7 +42,7 @@ class PlutoGridEventManager { .where((event) => event.type.isThrottleTrailing) .transform( ThrottleStreamTransformer( - (_) => TimerStream(_, _.duration as Duration), + (s) => TimerStream(s, s.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), + (s) => TimerStream(s, s.duration as Duration), ), ); diff --git a/lib/src/manager/pluto_grid_key_manager.dart b/lib/src/manager/pluto_grid_key_manager.dart index ba952c790..e5d230845 100644 --- a/lib/src/manager/pluto_grid_key_manager.dart +++ b/lib/src/manager/pluto_grid_key_manager.dart @@ -66,7 +66,8 @@ class PlutoGridKeyManager { final movingStream = _subject.stream.where((event) => event.needsThrottle).transform( ThrottleStreamTransformer( - (_) => TimerStream(_, const Duration(milliseconds: 1)), + (s) => TimerStream( + s, const Duration(milliseconds: 1)), ), ); @@ -79,7 +80,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/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index 5e0a6f031..f4c2eb7ca 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, @@ -297,7 +297,7 @@ class PlutoGridStateManager extends PlutoGridStateChangeNotifier { /// [PlutoGridStateManager.initializeRowsAsync] repeats [Timer] every [duration], /// Process the setting of [refRows] by the size of [chunkSize]. /// [Isolate] is a good way to handle CPU heavy work, but - /// The condition that List cannot be passed to Isolate + /// The condition that List<PlutoRow> cannot be passed to Isolate /// solves the problem of UI freezing by dividing the work with Timer. /// /// {@macro initialize_rows_params} diff --git a/lib/src/manager/shortcut/pluto_grid_shortcut.dart b/lib/src/manager/shortcut/pluto_grid_shortcut.dart index 57907ab4d..a4511413f 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 26110d358..6e3233c7a 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 + HardwareKeyboard.instance.isShiftPressed ? _moveCellPrevious(stateManager) : _moveCellNext(stateManager); @@ -408,7 +408,7 @@ class PlutoGridActionDefaultEnterKey extends PlutoGridShortcutAction { } if (enterKeyAction.isEditingAndMoveDown) { - if (keyEvent.event.isShiftPressed) { + if (HardwareKeyboard.instance.isShiftPressed) { stateManager.moveCurrentCell( PlutoMoveDirection.up, notify: false, @@ -420,7 +420,7 @@ class PlutoGridActionDefaultEnterKey extends PlutoGridShortcutAction { ); } } else if (enterKeyAction.isEditingAndMoveRight) { - if (keyEvent.event.isShiftPressed) { + if (HardwareKeyboard.instance.isShiftPressed) { stateManager.moveCurrentCell( PlutoMoveDirection.left, force: true, diff --git a/lib/src/manager/state/column_state.dart b/lib/src/manager/state/column_state.dart index 77109320d..2bbbbc7f7 100644 --- a/lib/src/manager/state/column_state.dart +++ b/lib/src/manager/state/column_state.dart @@ -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/row_state.dart b/lib/src/manager/state/row_state.dart index c8a8c53c9..eeee4ebe6 100644 --- a/lib/src/manager/state/row_state.dart +++ b/lib/src/manager/state/row_state.dart @@ -5,7 +5,7 @@ import 'package:pluto_grid/pluto_grid.dart'; abstract class IRowState { List get rows; - /// [refRows] is a List type and holds the entire row data. + /// [refRows] is a List<PlutoRow> type and holds the entire row data. /// /// [refRows] returns a list of final results /// according to pagination and filtering status. diff --git a/lib/src/model/pluto_cell.dart b/lib/src/model/pluto_cell.dart index 072ef58b5..ce1f327ae 100644 --- a/lib/src/model/pluto_cell.dart +++ b/lib/src/model/pluto_cell.dart @@ -102,7 +102,7 @@ class PlutoCell { } } -_assertUnInitializedCell(bool flag) { +void _assertUnInitializedCell(bool flag) { assert( flag, 'PlutoCell is not initialized.' diff --git a/lib/src/plugin/pluto_lazy_pagination.dart b/lib/src/plugin/pluto_lazy_pagination.dart index 3e25dbea2..d659320a0 100644 --- a/lib/src/plugin/pluto_lazy_pagination.dart +++ b/lib/src/plugin/pluto_lazy_pagination.dart @@ -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..5c830ada0 100644 --- a/lib/src/plugin/pluto_pagination.dart +++ b/lib/src/plugin/pluto_pagination.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..03b262c73 100644 --- a/lib/src/pluto_dual_grid.dart +++ b/lib/src/pluto_dual_grid.dart @@ -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; @@ -78,7 +78,7 @@ class PlutoDualGrid extends StatefulWidget { } class PlutoDualGridResizeNotifier extends ChangeNotifier { - resize() { + void resize() { notifyListeners(); } } @@ -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_grid.dart b/lib/src/pluto_grid.dart index 54d8e96ee..98e52a71c 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.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. @@ -337,7 +337,7 @@ class PlutoGrid extends PlutoStatefulWidget { /// initializeDateFormatting(); /// ``` /// {@endtemplate} - static setDefaultLocale(String locale) { + static void setDefaultLocale(String locale) { Intl.defaultLocale = locale; } @@ -345,7 +345,7 @@ class PlutoGrid extends PlutoStatefulWidget { /// when you need to set date format when changing locale. /// /// {@macro intl_default_locale} - static initializeDateFormat() { + static void initializeDateFormat() { initializeDateFormatting(); } @@ -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( @@ -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/ui/cells/pluto_currency_cell.dart b/lib/src/ui/cells/pluto_currency_cell.dart index 8a23b1a46..921e454e6 100644 --- a/lib/src/ui/cells/pluto_currency_cell.dart +++ b/lib/src/ui/cells/pluto_currency_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..8e4921c36 100644 --- a/lib/src/ui/cells/pluto_date_cell.dart +++ b/lib/src/ui/cells/pluto_date_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..f74e5a111 100644 --- a/lib/src/ui/cells/pluto_default_cell.dart +++ b/lib/src/ui/cells/pluto_default_cell.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..a9e86670e 100644 --- a/lib/src/ui/cells/pluto_number_cell.dart +++ b/lib/src/ui/cells/pluto_number_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..4ac034337 100644 --- a/lib/src/ui/cells/pluto_select_cell.dart +++ b/lib/src/ui/cells/pluto_select_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..53d8d0806 100644 --- a/lib/src/ui/cells/pluto_text_cell.dart +++ b/lib/src/ui/cells/pluto_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..2c4f6b556 100644 --- a/lib/src/ui/cells/pluto_time_cell.dart +++ b/lib/src/ui/cells/pluto_time_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..25a5ce1b4 100644 --- a/lib/src/ui/cells/popup_cell.dart +++ b/lib/src/ui/cells/popup_cell.dart @@ -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 { @@ -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 b007e4f35..1bb589444 100644 --- a/lib/src/ui/cells/text_cell.dart +++ b/lib/src/ui/cells/text_cell.dart @@ -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 { @@ -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 da1749122..486785ece 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/lib/src/ui/columns/pluto_column_title.dart b/lib/src/ui/columns/pluto_column_title.dart index a9d46cd0f..e6f735cf0 100644 --- a/lib/src/ui/columns/pluto_column_title.dart +++ b/lib/src/ui/columns/pluto_column_title.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 ?? @@ -357,17 +354,16 @@ class _ColumnWidget extends StatelessWidget { @override Widget build(BuildContext context) { return DragTarget( - onWillAccept: (PlutoColumn? columnToDrag) { - return columnToDrag != null && - columnToDrag.key != column.key && + onWillAcceptWithDetails: (DragTargetDetails details) { + return details.data.key != column.key && !stateManager.limitMoveColumn( - column: columnToDrag, + column: details.data, targetColumn: column, ); }, - onAccept: (PlutoColumn columnToMove) { - if (columnToMove.key != column.key) { - stateManager.moveColumn(column: columnToMove, targetColumn: column); + onAcceptWithDetails: (DragTargetDetails details) { + if (details.data.key != column.key) { + stateManager.moveColumn(column: details.data, targetColumn: column); } }, builder: (dragContext, candidate, rejected) { @@ -419,8 +415,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 +491,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_state_with_change.dart b/lib/src/ui/miscellaneous/pluto_state_with_change.dart index 7e214deda..ae937770c 100644 --- a/lib/src/ui/miscellaneous/pluto_state_with_change.dart +++ b/lib/src/ui/miscellaneous/pluto_state_with_change.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:pluto_grid/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..e498cf655 100644 --- a/lib/src/ui/miscellaneous/pluto_visibility_layout.dart +++ b/lib/src/ui/miscellaneous/pluto_visibility_layout.dart @@ -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..c15c408c6 100644 --- a/lib/src/ui/pluto_base_cell.dart +++ b/lib/src/ui/pluto_base_cell.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_row.dart b/lib/src/ui/pluto_base_row.dart index 598098294..216659357 100644 --- a/lib/src/ui/pluto_base_row.dart +++ b/lib/src/ui/pluto_base_row.dart @@ -41,18 +41,14 @@ class PlutoBaseRow extends StatelessWidget { return true; } - bool _handleOnWillAccept(PlutoRow? draggingRow) { - if (draggingRow == null) { - return false; - } - - return !_checkSameDragRows(draggingRow); + bool _handleOnWillAccept(DragTargetDetails details) { + return !_checkSameDragRows(details.data); } - void _handleOnAccept(PlutoRow draggingRow) async { + void _handleOnAccept(DragTargetDetails details) async { final draggingRows = stateManager.currentSelectingRows.isNotEmpty ? stateManager.currentSelectingRows - : [draggingRow]; + : [details.data]; stateManager.eventManager!.addEvent( PlutoGridDragRowsEvent( @@ -76,7 +72,7 @@ class PlutoBaseRow extends StatelessWidget { ); } - Widget _dragTargetBuilder(dragContext, candidate, rejected) { + Widget _dragTargetBuilder(BuildContext dragContext, candidate, rejected) { return _RowContainerWidget( stateManager: stateManager, rowIdx: rowIdx, @@ -111,8 +107,8 @@ class PlutoBaseRow extends StatelessWidget { @override Widget build(BuildContext context) { return DragTarget( - onWillAccept: _handleOnWillAccept, - onAccept: _handleOnAccept, + onWillAcceptWithDetails: _handleOnWillAccept, + onAcceptWithDetails: _handleOnAccept, builder: _dragTargetBuilder, ); } @@ -192,8 +188,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 +357,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/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_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..5ed0ec96b 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; @@ -678,6 +677,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// [Color] of the thumb. Mustn't be null. Color get color => _color; Color _color; + set color(Color value) { if (color == value) return; @@ -688,6 +688,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// [Color] of the track. Mustn't be null. Color get trackColor => _trackColor; Color _trackColor; + set trackColor(Color value) { if (trackColor == value) return; @@ -698,6 +699,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// [Color] of the track border. Mustn't be null. Color get trackBorderColor => _trackBorderColor; Color _trackBorderColor; + set trackBorderColor(Color value) { if (trackBorderColor == value) return; @@ -710,6 +712,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// Scrollbar's track will be rectangular if [trackRadius] is null. Radius? get trackRadius => _trackRadius; Radius? _trackRadius; + set trackRadius(Radius? value) { if (trackRadius == value) return; @@ -722,6 +725,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// calling paint. TextDirection? get textDirection => _textDirection; TextDirection? _textDirection; + set textDirection(TextDirection? value) { assert(value != null); if (textDirection == value) return; @@ -733,6 +737,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// Thickness of the scrollbar in its cross-axis in logical pixels. Mustn't be null. double get thickness => _thickness; double _thickness; + set thickness(double value) { if (thickness == value) return; @@ -751,6 +756,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// Mustn't be null and defaults to 0. double get mainAxisMargin => _mainAxisMargin; double _mainAxisMargin; + set mainAxisMargin(double value) { if (mainAxisMargin == value) return; @@ -764,6 +770,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// Must not be null and defaults to 0. double get crossAxisMargin => _crossAxisMargin; double _crossAxisMargin; + set crossAxisMargin(double value) { if (crossAxisMargin == value) return; @@ -776,6 +783,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// Scrollbar will be rectangular if [radius] is null. Radius? get radius => _radius; Radius? _radius; + set radius(Radius? value) { assert(shape == null || value == null); if (radius == value) return; @@ -796,6 +804,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// OutlinedBorder? get shape => _shape; OutlinedBorder? _shape; + set shape(OutlinedBorder? value) { assert(radius == null || value == null); if (shape == value) return; @@ -815,6 +824,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// directions must be greater than or equal to zero. EdgeInsets get padding => _padding; EdgeInsets _padding; + set padding(EdgeInsets value) { if (padding == value) return; @@ -835,6 +845,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// [minOverscrollLength], which in turn is >= 0. Defaults to 18.0. double get minLength => _minLength; double _minLength; + set minLength(double value) { if (minLength == value) return; @@ -854,6 +865,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// When null, it will default to the value of [minLength]. double get minOverscrollLength => _minOverscrollLength; double _minOverscrollLength; + set minOverscrollLength(double value) { if (minOverscrollLength == value) return; @@ -881,6 +893,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// {@endtemplate} ScrollbarOrientation? get scrollbarOrientation => _scrollbarOrientation; ScrollbarOrientation? _scrollbarOrientation; + set scrollbarOrientation(ScrollbarOrientation? value) { if (scrollbarOrientation == value) return; @@ -891,6 +904,7 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// Whether the painter will be ignored during hit testing. bool get ignorePointer => _ignorePointer; bool _ignorePointer; + set ignorePointer(bool value) { if (ignorePointer == value) return; @@ -983,20 +997,20 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { Paint get _paintThumb { return Paint() ..color = - color.withOpacity(color.opacity * fadeoutOpacityAnimation.value); + color.withValues(alpha: color.a * fadeoutOpacityAnimation.value); } Paint _paintTrack({bool isBorder = false}) { if (isBorder) { return Paint() - ..color = trackBorderColor.withOpacity( - trackBorderColor.opacity * fadeoutOpacityAnimation.value) + ..color = trackBorderColor.withValues( + alpha: trackBorderColor.a * fadeoutOpacityAnimation.value) ..style = PaintingStyle.stroke ..strokeWidth = 1.0; } return Paint() - ..color = trackColor - .withOpacity(trackColor.opacity * fadeoutOpacityAnimation.value); + ..color = trackColor.withValues( + alpha: trackColor.a * fadeoutOpacityAnimation.value); } void _paintScrollbar( @@ -1148,17 +1162,22 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { bool get _isVertical => _lastAxisDirection == AxisDirection.down || _lastAxisDirection == AxisDirection.up; + bool get _isReversed => _lastAxisDirection == AxisDirection.up || _lastAxisDirection == AxisDirection.left; + // The amount of scroll distance before and after the current position. double get _beforeExtent => _isReversed ? _lastMetrics!.extentAfter : _lastMetrics!.extentBefore; + double get _afterExtent => _isReversed ? _lastMetrics!.extentBefore : _lastMetrics!.extentAfter; + // Padding of the thumb track. double get _mainAxisPadding => _isVertical ? padding.vertical : padding.horizontal; + // The size of the thumb track. double get _trackExtent => _lastMetrics!.viewportDimension - 2 * mainAxisMargin - _mainAxisPadding; @@ -1201,7 +1220,9 @@ class _ScrollbarPainter extends ChangeNotifier implements CustomPainter { void paint(Canvas canvas, Size size) { if (_lastAxisDirection == null || _lastMetrics == null || - _lastMetrics!.maxScrollExtent <= _lastMetrics!.minScrollExtent) return; + _lastMetrics!.maxScrollExtent <= _lastMetrics!.minScrollExtent) { + return; + } // Skip painting if there's not enough space. if (_lastMetrics!.viewportDimension <= _mainAxisPadding || @@ -1384,19 +1405,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; @@ -1442,6 +1455,8 @@ enum _HoverAxis { none; bool get isVertical => this == _HoverAxis.vertical; + bool get isHorizontal => this == _HoverAxis.horizontal; + bool get isNone => this == _HoverAxis.none; } diff --git a/lib/src/widgets/pluto_shadow_container.dart b/lib/src/widgets/pluto_shadow_container.dart index 3b003a0b5..fae54a6cb 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) { @@ -41,7 +41,7 @@ class PlutoShadowContainer extends StatelessWidget { ), boxShadow: [ BoxShadow( - color: Colors.grey.withOpacity(0.5), + color: Colors.grey.withValues(alpha: 0.5), spreadRadius: 5, blurRadius: 7, offset: const Offset(0, 3), // changes position of shadow diff --git a/lib/src/widgets/pluto_shadow_line.dart b/lib/src/widgets/pluto_shadow_line.dart index d314037fd..2a0c34183 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) { @@ -25,7 +25,7 @@ class PlutoShadowLine extends StatelessWidget { boxShadow: shadow == true ? [ BoxShadow( - color: Colors.grey.withOpacity(0.15), + color: Colors.grey.withValues(alpha: 0.15), spreadRadius: 1, blurRadius: 3, offset: reverse == true diff --git a/packages/pluto_grid_export/CHANGELOG.md b/packages/pluto_grid_export/CHANGELOG.md index 29f86e551..03f3cdf2f 100644 --- a/packages/pluto_grid_export/CHANGELOG.md +++ b/packages/pluto_grid_export/CHANGELOG.md @@ -1,3 +1,16 @@ +## [1.0.5] - 2023. 5. 17 + +* Bump PlutoGrid. +* Removed ternary operator bug. (https://github.com/bosskmk/pluto_grid/pull/834) + +## [1.0.4] - 2023. 1. 26 + +* Bump PlutoGrid. + +## [1.0.3] - 2022. 7. 12 + +* Bump PlutoGrid. + ## [1.0.2] - 2022. 6. 8 * Export of required classes. diff --git a/packages/pluto_grid_export/README.md b/packages/pluto_grid_export/README.md index 656747fc8..1a69150cc 100644 --- a/packages/pluto_grid_export/README.md +++ b/packages/pluto_grid_export/README.md @@ -1,4 +1,4 @@ -## PlutoGridExport for PlutoGrid - v1.0.2 +## 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_export/lib/src/abstract_text_export.dart b/packages/pluto_grid_export/lib/src/abstract_text_export.dart index da07cd77a..35698ccdc 100644 --- a/packages/pluto_grid_export/lib/src/abstract_text_export.dart +++ b/packages/pluto_grid_export/lib/src/abstract_text_export.dart @@ -41,8 +41,7 @@ abstract class AbstractTextExport { // Order is important, so we iterate over columns for (PlutoColumn column in visibleColumns(state)) { dynamic value = plutoRow.cells[column.field]?.value; - serializedRow - .add(value != null ? column.formattedValueForDisplay(value) : null); + serializedRow.add(column.formattedValueForDisplay(value)); } return serializedRow; 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/pdf_controller.dart b/packages/pluto_grid_export/lib/src/pdf/pdf_controller.dart index b2bc5f320..ab319d572 100644 --- a/packages/pluto_grid_export/lib/src/pdf/pdf_controller.dart +++ b/packages/pluto_grid_export/lib/src/pdf/pdf_controller.dart @@ -26,19 +26,27 @@ abstract class PdfController { return doc.save(); } + /// It should return the page format of the PDF to be created. PdfPageFormat getPageFormat(); + /// The title of the PDF to be created should be returned. String getDocumentTitle(); + /// The name of the creator of the PDF to be created should be returned. String getDocumentCreator(); + /// The header widget of the PDF to be created should be implemented and returned. Widget getHeader(Context context); + /// It should implement and return the footer widget of the PDF to be generated. Widget getFooter(Context context); + /// Implement and return a list of PDFs to be created. List exportInternal(Context context); + /// The PageOrientation of the PDF to be created should be returned. PageOrientation getPageOrientation(); + /// The ThemeData of the PDF to be created should be returned. ThemeData getThemeData(); } diff --git a/packages/pluto_grid_export/pubspec.yaml b/packages/pluto_grid_export/pubspec.yaml index 5f1c94844..92a7dfe4e 100644 --- a/packages/pluto_grid_export/pubspec.yaml +++ b/packages/pluto_grid_export/pubspec.yaml @@ -1,6 +1,6 @@ name: pluto_grid_export description: PlutoGridExport converts PlutoGrid's metadata to CSV or PDF. Used with PlutoGrid. -version: 1.0.2 +version: 1.0.5 homepage: https://bosskmk.github.io repository: https://github.com/bosskmk/pluto_grid/tree/master/packages/pluto_grid_export publish_to: none @@ -15,8 +15,8 @@ dependencies: pluto_grid: path: ../.. csv: ^5.0.1 - pdf: ^3.8.3 - printing: ^5.9.3 + pdf: ^3.10.3 + printing: ^5.10.4 dev_dependencies: flutter_test: diff --git a/pubspec.yaml b/pubspec.yaml index 9ff0f667c..736b37c7a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,11 +1,11 @@ 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 +version: 8.1.0 homepage: https://pluto.weblaze.dev repository: https://github.com/bosskmk/pluto_grid environment: - sdk: ">=2.17.0 <3.0.0" + sdk: '>=2.17.0 <4.0.0' flutter: ">=2.5.0" dependencies: @@ -13,13 +13,13 @@ 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 - rxdart: ^0.27.7 - collection: ^1.17.1 + intl: ^0.20.2 + rxdart: ^0.28.0 + collection: ^1.19.1 dev_dependencies: flutter_test: sdk: flutter - mockito: ^5.4.0 - build_runner: ^2.4.2 - flutter_lints: ^2.0.1 + mockito: ^5.6.1 + build_runner: ^2.10.4 + flutter_lints: ^6.0.0 diff --git a/test/mock/shared_mocks.mocks.dart b/test/mock/shared_mocks.mocks.dart index e52394865..ba46e8b29 100644 --- a/test/mock/shared_mocks.mocks.dart +++ b/test/mock/shared_mocks.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.4.6 from annotations // in pluto_grid/test/mock/shared_mocks.dart. // Do not manually edit this file. @@ -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/pluto_grid.dart' as _i2; import 'package:rxdart/rxdart.dart' as _i4; @@ -20,12 +21,16 @@ 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: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeFilteredList_0 extends _i1.SmartFake implements _i2.FilteredList { @@ -183,8 +188,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 +348,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 +424,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 +438,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 +451,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 +464,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#gridFocusNode), ), ) as _i3.FocusNode); + @override _i2.PlutoGridScrollController get scroll => (super.noSuchMethod( Invocation.getter(#scroll), @@ -468,6 +477,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#scroll), ), ) as _i2.PlutoGridScrollController); + @override _i2.PlutoColumnMenuDelegate get columnMenuDelegate => (super.noSuchMethod( @@ -481,6 +491,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#columnMenuDelegate), ), ) as _i2.PlutoColumnMenuDelegate); + @override _i2.PlutoChangeNotifierFilterResolver get notifierFilterResolver => (super.noSuchMethod( @@ -494,6 +505,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 +520,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 +535,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 +576,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 +785,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 +805,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#localeText), ), ) as _i2.PlutoGridLocaleText); + @override _i2.PlutoGridStyleConfig get style => (super.noSuchMethod( Invocation.getter(#style), @@ -768,18 +818,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 +845,7 @@ class MockPlutoGridStateManager extends _i1.Mock Invocation.getter(#keyPressed), ), ) as _i2.PlutoGridKeyPressed); + @override _i3.ChangeNotifier get resizingChangeNotifier => (super.noSuchMethod( Invocation.getter(#resizingChangeNotifier), @@ -804,378 +858,441 @@ 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 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 +1305,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 +1327,34 @@ 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 set headerHeight(double? value) => super.noSuchMethod( Invocation.setter( @@ -1233,6 +1363,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override set footerHeight(double? value) => super.noSuchMethod( Invocation.setter( @@ -1241,6 +1372,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override set columnFooterHeight(double? value) => super.noSuchMethod( Invocation.setter( @@ -1249,6 +1381,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i2.PlutoChangeNotifierFilter resolveNotifierFilter() => (super.noSuchMethod( @@ -1271,6 +1404,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), ), ) as _i2.PlutoChangeNotifierFilter); + @override void dispose() => super.noSuchMethod( Invocation.method( @@ -1279,6 +1413,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void notifyListeners([ bool? notify = true, @@ -1294,6 +1429,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void notifyListenersOnPostFrame([ bool? notify = true, @@ -1309,6 +1445,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void addNotifier(int? hash) => super.noSuchMethod( Invocation.method( @@ -1317,6 +1454,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -1325,6 +1463,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -1333,6 +1472,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setCurrentCellPosition( _i2.PlutoGridCellPosition? cellPosition, { @@ -1346,6 +1486,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( Invocation.method( @@ -1355,6 +1496,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override int? columnIdxByCellKeyAndRowIdx( _i3.Key? cellKey, @@ -1370,6 +1512,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ) as int?); + @override void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( Invocation.method( @@ -1379,6 +1522,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setCurrentCell( _i2.PlutoCell? cell, @@ -1396,6 +1540,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool canMoveCell( _i2.PlutoGridCellPosition? cellPosition, @@ -1412,6 +1557,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool canNotMoveCell( _i2.PlutoGridCellPosition? cellPosition, @@ -1428,6 +1574,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool canChangeCellValue({ required _i2.PlutoCell? cell, @@ -1447,6 +1594,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool canNotChangeCellValue({ required _i2.PlutoCell? cell, @@ -1466,6 +1614,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override dynamic filteredCellValue({ required _i2.PlutoColumn? column, @@ -1484,6 +1633,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool isCurrentCell(_i2.PlutoCell? cell) => (super.noSuchMethod( Invocation.method( @@ -1493,6 +1643,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isInvalidCellPosition(_i2.PlutoGridCellPosition? cellPosition) => (super.noSuchMethod( @@ -1503,6 +1654,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void setShowColumnGroups( bool? flag, { @@ -1516,6 +1668,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override List<_i2.PlutoColumnGroupPair> separateLinkedGroup({ required List<_i2.PlutoColumnGroup>? columnGroupList, @@ -1533,6 +1686,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 +1697,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override void removeColumnsInColumnGroup( List<_i2.PlutoColumn>? columns, { @@ -1556,6 +1711,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setGroupToColumn() => super.noSuchMethod( Invocation.method( @@ -1564,6 +1720,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void activateColumnsAutoSize() => super.noSuchMethod( Invocation.method( @@ -1572,6 +1729,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void deactivateColumnsAutoSize() => super.noSuchMethod( Invocation.method( @@ -1580,6 +1738,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i2.PlutoAutoSize getColumnsAutoSizeHelper({ required Iterable<_i2.PlutoColumn>? columns, @@ -1617,6 +1776,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), ), ) as _i2.PlutoAutoSize); + @override _i2.PlutoResize getColumnsResizeHelper({ required List<_i2.PlutoColumn>? columns, @@ -1658,6 +1818,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), ), ) as _i2.PlutoResize); + @override void setColumnSizeConfig(_i2.PlutoGridColumnSizeConfig? config) => super.noSuchMethod( @@ -1667,6 +1828,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void toggleFrozenColumn( _i2.PlutoColumn? column, @@ -1682,6 +1844,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void toggleSortColumn(_i2.PlutoColumn? column) => super.noSuchMethod( Invocation.method( @@ -1690,6 +1853,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override int? columnIndex(_i2.PlutoColumn? column) => (super.noSuchMethod( Invocation.method( @@ -1698,6 +1862,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ) as int?); + @override void insertColumns( int? columnIdx, @@ -1713,6 +1878,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeColumns(List<_i2.PlutoColumn>? columns) => super.noSuchMethod( Invocation.method( @@ -1721,6 +1887,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveColumn({ required _i2.PlutoColumn? column, @@ -1737,6 +1904,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resizeColumn( _i2.PlutoColumn? column, @@ -1752,6 +1920,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void autoFitColumn( _i3.BuildContext? context, @@ -1767,6 +1936,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void hideColumn( _i2.PlutoColumn? column, @@ -1784,6 +1954,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void hideColumns( List<_i2.PlutoColumn>? columns, @@ -1801,6 +1972,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void sortAscending( _i2.PlutoColumn? column, { @@ -1814,6 +1986,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void sortDescending( _i2.PlutoColumn? column, { @@ -1827,6 +2000,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void sortBySortIdx( _i2.PlutoColumn? column, { @@ -1840,6 +2014,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void showSetColumnsPopup(_i3.BuildContext? context) => super.noSuchMethod( Invocation.method( @@ -1848,6 +2023,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool limitResizeColumn( _i2.PlutoColumn? column, @@ -1864,6 +2040,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool limitMoveColumn({ required _i2.PlutoColumn? column, @@ -1881,6 +2058,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool limitToggleFrozenColumn( _i2.PlutoColumn? column, @@ -1897,6 +2075,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool limitHideColumn( _i2.PlutoColumn? column, @@ -1915,6 +2094,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void setIsDraggingRow( bool? flag, { @@ -1928,6 +2108,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setDragRows( List<_i2.PlutoRow>? rows, { @@ -1941,6 +2122,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setDragTargetRowIdx( int? rowIdx, { @@ -1954,6 +2136,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool isRowIdxDragTarget(int? rowIdx) => (super.noSuchMethod( Invocation.method( @@ -1963,6 +2146,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isRowIdxTopDragTarget(int? rowIdx) => (super.noSuchMethod( Invocation.method( @@ -1972,6 +2156,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( Invocation.method( @@ -1981,6 +2166,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isRowBeingDragged(_i3.Key? rowKey) => (super.noSuchMethod( Invocation.method( @@ -1990,6 +2176,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isEditableCell(_i2.PlutoCell? cell) => (super.noSuchMethod( Invocation.method( @@ -1999,6 +2186,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void setEditing( bool? flag, { @@ -2012,6 +2200,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setAutoEditing( bool? flag, { @@ -2025,6 +2214,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setTextEditingController( _i3.TextEditingController? textEditingController) => @@ -2035,6 +2225,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void toggleEditing({bool? notify = true}) => super.noSuchMethod( Invocation.method( @@ -2044,6 +2235,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void pasteCellValue(List>? textList) => super.noSuchMethod( Invocation.method( @@ -2052,6 +2244,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override dynamic castValueByColumnType( dynamic value, @@ -2067,6 +2260,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void changeCellValue( _i2.PlutoCell? cell, @@ -2090,6 +2284,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setFilter( _i2.FilteredListFilter<_i2.PlutoRow>? filter, { @@ -2103,6 +2298,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setFilterWithFilterRows( List<_i2.PlutoRow>? rows, { @@ -2116,6 +2312,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setFilterRows(List<_i2.PlutoRow>? rows) => super.noSuchMethod( Invocation.method( @@ -2124,6 +2321,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override List<_i2.PlutoRow> filterRowsByField(String? columnField) => (super.noSuchMethod( @@ -2134,6 +2332,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 +2342,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void removeColumnsInFilterRows( List<_i2.PlutoColumn>? columns, { @@ -2156,6 +2356,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void showFilterPopup( _i3.BuildContext? context, { @@ -2173,6 +2374,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setKeepFocus( bool? flag, { @@ -2186,6 +2388,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void nextFocusOfColumnFilter( _i2.PlutoColumn? column, { @@ -2199,6 +2402,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setKeyManager(_i2.PlutoGridKeyManager? keyManager) => super.noSuchMethod( Invocation.method( @@ -2207,6 +2411,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setEventManager(_i2.PlutoGridEventManager? eventManager) => super.noSuchMethod( @@ -2216,6 +2421,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setConfiguration( _i2.PlutoGridConfiguration? configuration, { @@ -2233,6 +2439,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setGridMode(_i2.PlutoGridMode? mode) => super.noSuchMethod( Invocation.method( @@ -2241,6 +2448,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resetCurrentState({bool? notify = true}) => super.noSuchMethod( Invocation.method( @@ -2250,6 +2458,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void handleOnSelected() => super.noSuchMethod( Invocation.method( @@ -2258,6 +2467,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setSortOnlyEvent(bool? flag) => super.noSuchMethod( Invocation.method( @@ -2266,6 +2476,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setFilterOnlyEvent(bool? flag) => super.noSuchMethod( Invocation.method( @@ -2274,6 +2485,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i2.PlutoGridCellPosition cellPositionToMove( _i2.PlutoGridCellPosition? cellPosition, @@ -2308,6 +2520,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), ), ) as _i2.PlutoGridCellPosition); + @override void moveCurrentCell( _i2.PlutoMoveDirection? direction, { @@ -2325,6 +2538,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveCurrentCellToEdgeOfColumns( _i2.PlutoMoveDirection? direction, { @@ -2342,6 +2556,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveCurrentCellToEdgeOfRows( _i2.PlutoMoveDirection? direction, { @@ -2359,6 +2574,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveCurrentCellByRowIdx( int? rowIdx, @@ -2376,6 +2592,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveSelectingCell(_i2.PlutoMoveDirection? direction) => super.noSuchMethod( @@ -2385,6 +2602,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveSelectingCellToEdgeOfColumns( _i2.PlutoMoveDirection? direction, { @@ -2402,6 +2620,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveSelectingCellToEdgeOfRows( _i2.PlutoMoveDirection? direction, { @@ -2419,6 +2638,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveSelectingCellByRowIdx( int? rowIdx, @@ -2436,6 +2656,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setLayout(_i3.BoxConstraints? size) => super.noSuchMethod( Invocation.method( @@ -2444,6 +2665,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setShowColumnTitle( bool? flag, { @@ -2457,6 +2679,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setShowColumnFooter( bool? flag, { @@ -2470,6 +2693,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setShowColumnFilter( bool? flag, { @@ -2483,6 +2707,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setShowLoading( bool? flag, { @@ -2500,6 +2725,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resetShowFrozenColumn() => super.noSuchMethod( Invocation.method( @@ -2508,6 +2734,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool shouldShowFrozenColumns(double? width) => (super.noSuchMethod( Invocation.method( @@ -2517,6 +2744,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool enoughFrozenColumnsWidth(double? width) => (super.noSuchMethod( Invocation.method( @@ -2526,6 +2754,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void notifyResizingListeners() => super.noSuchMethod( Invocation.method( @@ -2534,6 +2763,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void notifyChangedShowFrozenColumn() => super.noSuchMethod( Invocation.method( @@ -2542,6 +2772,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setTextDirection(_i5.TextDirection? textDirection) => super.noSuchMethod( Invocation.method( @@ -2550,6 +2781,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setGridGlobalOffset(_i5.Offset? offset) => super.noSuchMethod( Invocation.method( @@ -2558,6 +2790,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setPageSize( int? pageSize, { @@ -2571,6 +2804,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setPage( int? page, { @@ -2588,6 +2822,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resetPage({ bool? resetCurrentState = true, @@ -2604,6 +2839,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool isMainRow(_i2.PlutoRow? row) => (super.noSuchMethod( Invocation.method( @@ -2613,6 +2849,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isNotMainGroupedRow(_i2.PlutoRow? row) => (super.noSuchMethod( Invocation.method( @@ -2622,6 +2859,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isExpandedGroupedRow(_i2.PlutoRow? row) => (super.noSuchMethod( Invocation.method( @@ -2631,6 +2869,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void setRowGroup( _i2.PlutoRowGroupDelegate? delegate, { @@ -2644,6 +2883,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void toggleExpandedRowGroup({ required _i2.PlutoRow? rowGroup, @@ -2660,6 +2900,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setRowGroupFilter(_i2.FilteredListFilter<_i2.PlutoRow>? filter) => super.noSuchMethod( @@ -2669,6 +2910,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void sortRowGroup({ required _i2.PlutoColumn? column, @@ -2688,6 +2930,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void insertRowGroup( int? index, @@ -2703,6 +2946,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeRowAndGroupByKey(Iterable<_i3.Key>? keys) => super.noSuchMethod( Invocation.method( @@ -2711,6 +2955,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeColumnsInRowGroupByColumn( List<_i2.PlutoColumn>? columns, { @@ -2724,6 +2969,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updateRowGroupByHideColumn(List<_i2.PlutoColumn>? columns) => super.noSuchMethod( @@ -2733,6 +2979,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override int? getRowIdxByOffset(double? offset) => (super.noSuchMethod( Invocation.method( @@ -2741,6 +2988,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ) as int?); + @override _i2.PlutoRow getNewRow() => (super.noSuchMethod( Invocation.method( @@ -2762,6 +3010,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), ), ) as _i2.PlutoRow); + @override List<_i2.PlutoRow> getNewRows({int? count = 1}) => (super.noSuchMethod( Invocation.method( @@ -2772,6 +3021,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: <_i2.PlutoRow>[], returnValueForMissingStub: <_i2.PlutoRow>[], ) as List<_i2.PlutoRow>); + @override void setRowChecked( _i2.PlutoRow? row, @@ -2789,6 +3039,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void insertRows( int? rowIdx, @@ -2806,6 +3057,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void prependNewRows({int? count = 1}) => super.noSuchMethod( Invocation.method( @@ -2815,6 +3067,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void prependRows(List<_i2.PlutoRow>? rows) => super.noSuchMethod( Invocation.method( @@ -2823,6 +3076,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void appendNewRows({int? count = 1}) => super.noSuchMethod( Invocation.method( @@ -2832,6 +3086,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void appendRows(List<_i2.PlutoRow>? rows) => super.noSuchMethod( Invocation.method( @@ -2840,6 +3095,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeCurrentRow() => super.noSuchMethod( Invocation.method( @@ -2848,6 +3104,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeRows( List<_i2.PlutoRow>? rows, { @@ -2861,6 +3118,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeAllRows({bool? notify = true}) => super.noSuchMethod( Invocation.method( @@ -2870,6 +3128,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveRowsByOffset( List<_i2.PlutoRow>? rows, @@ -2887,6 +3146,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveRowsByIndex( List<_i2.PlutoRow>? rows, @@ -2904,6 +3164,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void toggleAllRowChecked( bool? flag, { @@ -2917,6 +3178,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i5.Offset toDirectionalOffset(_i5.Offset? offset) => (super.noSuchMethod( Invocation.method( @@ -2938,6 +3200,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), ), ) as _i5.Offset); + @override void scrollByDirection( _i2.PlutoMoveDirection? direction, @@ -2953,6 +3216,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool canHorizontalCellScrollByDirection( _i2.PlutoMoveDirection? direction, @@ -2969,6 +3233,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void moveScrollByRow( _i2.PlutoMoveDirection? direction, @@ -2984,6 +3249,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void moveScrollByColumn( _i2.PlutoMoveDirection? direction, @@ -2999,6 +3265,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool needMovingScroll( _i5.Offset? offset, @@ -3015,6 +3282,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void updateCorrectScrollOffset() => super.noSuchMethod( Invocation.method( @@ -3023,6 +3291,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updateScrollViewport() => super.noSuchMethod( Invocation.method( @@ -3031,6 +3300,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resetScrollToZero() => super.noSuchMethod( Invocation.method( @@ -3039,6 +3309,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setSelecting( bool? flag, { @@ -3052,6 +3323,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setSelectingMode( _i2.PlutoGridSelectingMode? selectingMode, { @@ -3065,6 +3337,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setAllCurrentSelecting() => super.noSuchMethod( Invocation.method( @@ -3073,6 +3346,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setCurrentSelectingPosition({ _i2.PlutoGridCellPosition? cellPosition, @@ -3089,6 +3363,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setCurrentSelectingPositionByCellKey( _i3.Key? cellKey, { @@ -3102,6 +3377,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => super.noSuchMethod( @@ -3111,6 +3387,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setCurrentSelectingRowsByRange( int? from, @@ -3128,6 +3405,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( Invocation.method( @@ -3137,6 +3415,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void toggleSelectingRow( int? rowIdx, { @@ -3150,6 +3429,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override bool isSelectingInteraction() => (super.noSuchMethod( Invocation.method( @@ -3159,6 +3439,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isSelectedRow(_i3.Key? rowKey) => (super.noSuchMethod( Invocation.method( @@ -3168,6 +3449,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool isSelectedCell( _i2.PlutoCell? cell, @@ -3186,6 +3468,7 @@ class MockPlutoGridStateManager extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void handleAfterSelectingRow( _i2.PlutoCell? cell, @@ -3201,6 +3484,7 @@ class MockPlutoGridStateManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( Invocation.method( @@ -3229,6 +3513,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 +3526,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 +3539,7 @@ class MockPlutoGridEventManager extends _i1.Mock Invocation.getter(#subscription), ), ) as _i6.StreamSubscription); + @override void dispose() => super.noSuchMethod( Invocation.method( @@ -3261,6 +3548,7 @@ class MockPlutoGridEventManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void init() => super.noSuchMethod( Invocation.method( @@ -3269,6 +3557,7 @@ class MockPlutoGridEventManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void addEvent(_i2.PlutoGridEvent? event) => super.noSuchMethod( Invocation.method( @@ -3277,6 +3566,7 @@ class MockPlutoGridEventManager extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i6.StreamSubscription<_i2.PlutoGridEvent> listener( void Function(_i2.PlutoGridEvent)? onData) => @@ -3309,47 +3599,51 @@ class MockPlutoGridEventManager extends _i1.Mock class MockPlutoGridScrollController extends _i1.Mock implements _i2.PlutoGridScrollController { @override - set vertical(_i2.LinkedScrollControllerGroup? _vertical) => - super.noSuchMethod( - Invocation.setter( - #vertical, - _vertical, - ), - returnValueForMissingStub: null, - ); - @override - set horizontal(_i2.LinkedScrollControllerGroup? _horizontal) => - super.noSuchMethod( - Invocation.setter( - #horizontal, - _horizontal, - ), - 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 + set vertical(_i2.LinkedScrollControllerGroup? value) => super.noSuchMethod( + Invocation.setter( + #vertical, + value, + ), + returnValueForMissingStub: null, + ); + + @override + set horizontal(_i2.LinkedScrollControllerGroup? value) => super.noSuchMethod( + Invocation.setter( + #horizontal, + value, + ), + returnValueForMissingStub: null, + ); + @override void setBodyRowsHorizontal(_i3.ScrollController? scrollController) => super.noSuchMethod( @@ -3359,6 +3653,7 @@ class MockPlutoGridScrollController extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void setBodyRowsVertical(_i3.ScrollController? scrollController) => super.noSuchMethod( @@ -3381,6 +3676,7 @@ class MockPlutoGridKeyPressed extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get ctrl => (super.noSuchMethod( Invocation.getter(#ctrl), @@ -3400,6 +3696,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + @override _i3.ScrollController addAndGet() => (super.noSuchMethod( Invocation.method( @@ -3421,6 +3718,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock ), ), ) as _i3.ScrollController); + @override void addOffsetChangedListener(_i5.VoidCallback? onChanged) => super.noSuchMethod( @@ -3430,6 +3728,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void removeOffsetChangedListener(_i5.VoidCallback? listener) => super.noSuchMethod( @@ -3439,6 +3738,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock ), returnValueForMissingStub: null, ); + @override _i6.Future animateTo( double? offset, { @@ -3457,6 +3757,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 +3766,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resetScroll() => super.noSuchMethod( Invocation.method( @@ -3473,6 +3775,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void applyViewportDimension(double? value) => super.noSuchMethod( Invocation.method( @@ -3481,6 +3784,7 @@ class MockLinkedScrollControllerGroup extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void notifyListeners() => super.noSuchMethod( Invocation.method( @@ -3496,29 +3800,33 @@ class MockLinkedScrollControllerGroup extends _i1.Mock /// See the documentation for Mockito's code generation for more information. class MockScrollController extends _i1.Mock implements _i3.ScrollController { @override - bool get keepScrollOffset => (super.noSuchMethod( - Invocation.getter(#keepScrollOffset), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - @override double get initialScrollOffset => (super.noSuchMethod( Invocation.getter(#initialScrollOffset), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + + @override + bool get keepScrollOffset => (super.noSuchMethod( + Invocation.getter(#keepScrollOffset), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @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 +3839,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 +3872,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 +3881,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override void attach(_i3.ScrollPosition? position) => super.noSuchMethod( Invocation.method( @@ -3577,6 +3890,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override void detach(_i3.ScrollPosition? position) => super.noSuchMethod( Invocation.method( @@ -3585,6 +3899,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override void dispose() => super.noSuchMethod( Invocation.method( @@ -3593,6 +3908,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override _i3.ScrollPosition createScrollPosition( _i3.ScrollPhysics? physics, @@ -3631,6 +3947,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), ), ) as _i3.ScrollPosition); + @override void debugFillDescription(List? description) => super.noSuchMethod( Invocation.method( @@ -3639,6 +3956,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -3647,6 +3965,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -3655,6 +3974,7 @@ class MockScrollController extends _i1.Mock implements _i3.ScrollController { ), returnValueForMissingStub: null, ); + @override void notifyListeners() => super.noSuchMethod( Invocation.method( @@ -3681,6 +4001,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,138 +4014,174 @@ 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), - returnValue: _FakeValueNotifier_25( - this, - Invocation.getter(#isScrollingNotifier), - ), - returnValueForMissingStub: _FakeValueNotifier_25( - this, - 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 + bool get shouldIgnorePointer => (super.noSuchMethod( + Invocation.getter(#shouldIgnorePointer), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override double get devicePixelRatio => (super.noSuchMethod( Invocation.getter(#devicePixelRatio), returnValue: 0.0, returnValueForMissingStub: 0.0, ) as double); + + @override + _i3.ValueNotifier get isScrollingNotifier => (super.noSuchMethod( + Invocation.getter(#isScrollingNotifier), + returnValue: _FakeValueNotifier_25( + this, + Invocation.getter(#isScrollingNotifier), + ), + returnValueForMissingStub: _FakeValueNotifier_25( + this, + Invocation.getter(#isScrollingNotifier), + ), + ) as _i3.ValueNotifier); + @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 +4190,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override double setPixels(double? newPixels) => (super.noSuchMethod( Invocation.method( @@ -3842,6 +4200,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 +4209,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void correctBy(double? correction) => super.noSuchMethod( Invocation.method( @@ -3858,6 +4218,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void forcePixels(double? value) => super.noSuchMethod( Invocation.method( @@ -3866,6 +4227,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void saveScrollOffset() => super.noSuchMethod( Invocation.method( @@ -3874,6 +4236,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void restoreScrollOffset() => super.noSuchMethod( Invocation.method( @@ -3882,6 +4245,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void restoreOffset( double? offset, { @@ -3895,6 +4259,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void saveOffset() => super.noSuchMethod( Invocation.method( @@ -3903,6 +4268,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override double applyBoundaryConditions(double? value) => (super.noSuchMethod( Invocation.method( @@ -3912,6 +4278,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 +4288,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool applyContentDimensions( double? minScrollExtent, @@ -3937,6 +4305,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool correctForNewDimensions( _i3.ScrollMetrics? oldPosition, @@ -3953,6 +4322,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void applyNewDimensions() => super.noSuchMethod( Invocation.method( @@ -3961,6 +4331,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override _i6.Future ensureVisible( _i3.RenderObject? object, { @@ -3986,6 +4357,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 +4376,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 +4385,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void pointerScroll(double? delta) => super.noSuchMethod( Invocation.method( @@ -4020,6 +4394,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override _i6.Future moveTo( double? to, { @@ -4040,6 +4415,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 +4424,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override _i3.ScrollHoldController hold(_i5.VoidCallback? holdCancelCallback) => (super.noSuchMethod( @@ -4070,6 +4447,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), ), ) as _i3.ScrollHoldController); + @override _i7.Drag drag( _i3.DragStartDetails? details, @@ -4104,6 +4482,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), ), ) as _i7.Drag); + @override void beginActivity(_i3.ScrollActivity? newActivity) => super.noSuchMethod( Invocation.method( @@ -4112,6 +4491,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void didStartScroll() => super.noSuchMethod( Invocation.method( @@ -4120,6 +4500,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void didUpdateScrollPositionBy(double? delta) => super.noSuchMethod( Invocation.method( @@ -4128,6 +4509,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void didEndScroll() => super.noSuchMethod( Invocation.method( @@ -4136,6 +4518,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void didOverscrollBy(double? value) => super.noSuchMethod( Invocation.method( @@ -4144,8 +4527,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 +4537,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void didUpdateScrollMetrics() => super.noSuchMethod( Invocation.method( @@ -4161,6 +4546,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override bool recommendDeferredLoading(_i3.BuildContext? context) => (super.noSuchMethod( @@ -4171,6 +4557,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void dispose() => super.noSuchMethod( Invocation.method( @@ -4179,6 +4566,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void notifyListeners() => super.noSuchMethod( Invocation.method( @@ -4187,6 +4575,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void debugFillDescription(List? description) => super.noSuchMethod( Invocation.method( @@ -4195,6 +4584,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -4203,6 +4593,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -4211,6 +4602,7 @@ class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { ), returnValueForMissingStub: null, ); + @override _i3.ScrollMetrics copyWith({ double? minScrollExtent, @@ -4277,6 +4669,7 @@ class MockStreamSubscription extends _i1.Mock returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i6.Future cancel() => (super.noSuchMethod( Invocation.method( @@ -4286,6 +4679,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 +4688,7 @@ class MockStreamSubscription extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void onError(Function? handleError) => super.noSuchMethod( Invocation.method( @@ -4302,6 +4697,7 @@ class MockStreamSubscription extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void onDone(void Function()? handleDone) => super.noSuchMethod( Invocation.method( @@ -4310,6 +4706,7 @@ class MockStreamSubscription extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void pause([_i6.Future? resumeSignal]) => super.noSuchMethod( Invocation.method( @@ -4318,6 +4715,7 @@ class MockStreamSubscription extends _i1.Mock ), returnValueForMissingStub: null, ); + @override void resume() => super.noSuchMethod( Invocation.method( @@ -4326,26 +4724,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); } @@ -4354,134 +4773,89 @@ class MockStreamSubscription extends _i1.Mock /// See the documentation for Mockito's code generation for more information. class MockFocusNode extends _i1.Mock implements _i3.FocusNode { @override - set onKey(_i3.FocusOnKeyCallback? _onKey) => super.noSuchMethod( - Invocation.setter( - #onKey, - _onKey, - ), - returnValueForMissingStub: null, - ); - @override - set onKeyEvent(_i3.FocusOnKeyEventCallback? _onKeyEvent) => - super.noSuchMethod( - Invocation.setter( - #onKeyEvent, - _onKeyEvent, - ), - 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( - #skipTraversal, - value, - ), - 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( - #canRequestFocus, - value, - ), - 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( - #descendantsAreFocusable, - value, - ), - 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( - #descendantsAreTraversable, - value, - ), - 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( - #debugLabel, - value, - ), - 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 +4868,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 +4881,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 +4894,77 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { Invocation.getter(#rect), ), ) as _i5.Rect); + + @override + set skipTraversal(bool? value) => super.noSuchMethod( + Invocation.setter( + #skipTraversal, + value, + ), + returnValueForMissingStub: null, + ); + + @override + set canRequestFocus(bool? value) => super.noSuchMethod( + Invocation.setter( + #canRequestFocus, + value, + ), + returnValueForMissingStub: null, + ); + + @override + set descendantsAreFocusable(bool? value) => super.noSuchMethod( + Invocation.setter( + #descendantsAreFocusable, + value, + ), + returnValueForMissingStub: null, + ); + + @override + set descendantsAreTraversable(bool? value) => super.noSuchMethod( + Invocation.setter( + #descendantsAreTraversable, + value, + ), + returnValueForMissingStub: null, + ); + + @override + set onKey(_i3.FocusOnKeyCallback? value) => super.noSuchMethod( + Invocation.setter( + #onKey, + value, + ), + returnValueForMissingStub: null, + ); + + @override + set onKeyEvent(_i3.FocusOnKeyEventCallback? value) => super.noSuchMethod( + Invocation.setter( + #onKeyEvent, + value, + ), + returnValueForMissingStub: null, + ); + + @override + set debugLabel(String? value) => super.noSuchMethod( + Invocation.setter( + #debugLabel, + value, + ), + returnValueForMissingStub: null, + ); + @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override void unfocus( {_i3.UnfocusDisposition? disposition = @@ -4536,6 +4977,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override bool consumeKeyboardToken() => (super.noSuchMethod( Invocation.method( @@ -4545,6 +4987,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i3.FocusAttachment attach( _i3.BuildContext? context, { @@ -4583,6 +5026,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), ), ) as _i3.FocusAttachment); + @override void dispose() => super.noSuchMethod( Invocation.method( @@ -4591,6 +5035,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override void requestFocus([_i3.FocusNode? node]) => super.noSuchMethod( Invocation.method( @@ -4599,6 +5044,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override bool nextFocus() => (super.noSuchMethod( Invocation.method( @@ -4608,6 +5054,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool previousFocus() => (super.noSuchMethod( Invocation.method( @@ -4617,6 +5064,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 +5075,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 +5085,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override List<_i3.DiagnosticsNode> debugDescribeChildren() => (super.noSuchMethod( Invocation.method( @@ -4645,21 +5095,36 @@ 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', ', + String? joiner = ', ', _i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.debug, }) => (super.noSuchMethod( @@ -4671,14 +5136,36 @@ 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'', + String? prefixLineOne = '', String? prefixOtherLines, _i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.debug, + int? wrapWidth = 65, }) => (super.noSuchMethod( Invocation.method( @@ -4688,15 +5175,41 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { #prefixLineOne: prefixLineOne, #prefixOtherLines: prefixOtherLines, #minLevel: minLevel, + #wrapWidth: wrapWidth, }, ), - returnValue: '', - returnValueForMissingStub: '', + returnValue: _i9.dummyValue( + this, + Invocation.method( + #toStringDeep, + [], + { + #prefixLineOne: prefixLineOne, + #prefixOtherLines: prefixOtherLines, + #minLevel: minLevel, + #wrapWidth: wrapWidth, + }, + ), + ), + returnValueForMissingStub: _i9.dummyValue( + this, + Invocation.method( + #toStringDeep, + [], + { + #prefixLineOne: prefixLineOne, + #prefixOtherLines: prefixOtherLines, + #minLevel: minLevel, + #wrapWidth: wrapWidth, + }, + ), + ), ) as String); + @override _i3.DiagnosticsNode toDiagnosticsNode({ String? name, - _i11.DiagnosticsTreeStyle? style, + _i12.DiagnosticsTreeStyle? style, }) => (super.noSuchMethod( Invocation.method( @@ -4730,6 +5243,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), ), ) as _i3.DiagnosticsNode); + @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -4738,6 +5252,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( @@ -4746,6 +5261,7 @@ class MockFocusNode extends _i1.Mock implements _i3.FocusNode { ), returnValueForMissingStub: null, ); + @override void notifyListeners() => super.noSuchMethod( Invocation.method( diff --git a/test/src/helper/pluto_key_manager_event_test.dart b/test/src/helper/pluto_key_manager_event_test.dart index f0907a12d..b7a0e4ada 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, @@ -28,12 +28,12 @@ void main() { 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 +62,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, @@ -134,9 +134,9 @@ void main() { await buildWidget(tester: tester, callback: callback); const key = LogicalKeyboardKey.control; - await tester.sendKeyDownEvent(key); + await simulateKeyDownEvent(key); expect(keyManagerEvent!.isControl, true); - await tester.sendKeyUpEvent(key); + await simulateKeyUpEvent(key); }, ); @@ -146,10 +146,11 @@ void main() { await buildWidget(tester: tester, callback: callback); const key = LogicalKeyboardKey.control; - await tester.sendKeyDownEvent(key); - await tester.sendKeyUpEvent(LogicalKeyboardKey.keyC); + await simulateKeyDownEvent(key); + await simulateKeyDownEvent(LogicalKeyboardKey.keyC); expect(keyManagerEvent!.isCtrlC, true); - await tester.sendKeyUpEvent(key); + await simulateKeyUpEvent(LogicalKeyboardKey.keyC); + await simulateKeyUpEvent(key); }, ); @@ -159,10 +160,11 @@ void main() { await buildWidget(tester: tester, callback: callback); const key = LogicalKeyboardKey.control; - await tester.sendKeyDownEvent(key); - await tester.sendKeyUpEvent(LogicalKeyboardKey.keyV); + await simulateKeyDownEvent(key); + await simulateKeyDownEvent(LogicalKeyboardKey.keyV); expect(keyManagerEvent!.isCtrlV, true); - await tester.sendKeyUpEvent(key); + await simulateKeyUpEvent(LogicalKeyboardKey.keyV); + await simulateKeyUpEvent(key); }, ); @@ -173,8 +175,9 @@ void main() { const key = LogicalKeyboardKey.control; await tester.sendKeyDownEvent(key); - await tester.sendKeyUpEvent(LogicalKeyboardKey.keyA); + await tester.sendKeyDownEvent(LogicalKeyboardKey.keyA); expect(keyManagerEvent!.isCtrlA, true); + await tester.sendKeyUpEvent(LogicalKeyboardKey.keyA); 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 57634f5e1..7e88553cd 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, diff --git a/test/src/ui/miscellaneous/pluto_visibility_layout_test.dart b/test/src/ui/miscellaneous/pluto_visibility_layout_test.dart index cda05eef4..e5da57870 100644 --- a/test/src/ui/miscellaneous/pluto_visibility_layout_test.dart +++ b/test/src/ui/miscellaneous/pluto_visibility_layout_test.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; @@ -41,9 +40,9 @@ class _TestWidgetWrapperState extends State<_TestWidgetWrapper> { class _TestLayoutChild extends Container implements PlutoVisibilityLayoutChild { _TestLayoutChild({ this.width = defaultChildWidth, - // ignore: unused_element + // ignore: unused_element_parameter this.startPosition = 0, - // ignore: unused_element + // ignore: unused_element_parameter this.keepAlive = false, }) : super(width: width, height: childHeight);