diff --git a/.pubignore b/.pubignore index 6924ba804..e9763c865 100644 --- a/.pubignore +++ b/.pubignore @@ -6,5 +6,6 @@ /example/windows /example/linux /example/build +/coverage /test pubspec.lock \ No newline at end of file diff --git a/demo/lib/dummy_data/development.dart b/demo/lib/dummy_data/development.dart index 720729c46..624e70aac 100644 --- a/demo/lib/dummy_data/development.dart +++ b/demo/lib/dummy_data/development.dart @@ -32,9 +32,21 @@ class DummyData { } else if (i == 3) { return PlutoColumnType.text(); } else if (i == 4) { - return PlutoColumnType.select(['One', 'Two', 'Three']); + return PlutoColumnType.select([ + 'One', + 'Two', + 'Three', + 'Four', + 'Five', + ]); } else if (i == 5) { - return PlutoColumnType.select(['One', 'Two', 'Three']); + return PlutoColumnType.select([ + 'One', + 'Two', + 'Three', + 'Four', + 'Five', + ]); } else if (i == 6) { return PlutoColumnType.date(); } else if (i == 7) { @@ -78,15 +90,7 @@ class DummyData { } static PlutoRow rowByColumns(List columns) { - final cells = {}; - - for (var column in columns) { - cells[column.field] = PlutoCell( - value: valueByColumnType(column), - ); - } - - return PlutoRow(cells: cells); + return PlutoRow(cells: _cellsByColumn(columns)); } static dynamic valueByColumnType(PlutoColumn column) { @@ -146,4 +150,113 @@ class DummyData { return completer.future; } + + static List treeRowsByColumn({ + required List columns, + int count = 100, + int? depth, + List? childCount, + }) { + assert(depth == null || depth >= 0); + assert(childCount == null || childCount.length == depth); + + const defaultRandomDepth = 5; + const defaultRandomChildCount = 10; + + PlutoRowType? generateType(int maxDepth, List countOfChildren) { + if (maxDepth < 1) return null; + + final PlutoRowType type = PlutoRowType.group( + children: FilteredList( + initialList: [], + ), + ); + List? currentChildren = type.group.children; + List> childrenStack = []; + List> childrenStackTemp = []; + int currentDepth = 0; + bool next = true; + + while (currentDepth < maxDepth || currentChildren != null) { + bool isMax = currentDepth + 1 == maxDepth; + next = childrenStack.isEmpty; + + if (currentChildren != null) { + for (final _ + in List.generate(countOfChildren[currentDepth], (i) => i)) { + final children = []; + currentChildren.add(PlutoRow( + cells: _cellsByColumn(columns), + type: isMax + ? null + : PlutoRowType.group( + children: FilteredList( + initialList: children, + ), + ), + )); + + if (!isMax) childrenStackTemp.add(children); + } + } + + if (next) { + childrenStack = [...childrenStackTemp]; + childrenStackTemp = []; + } + + currentChildren = childrenStack.isNotEmpty ? childrenStack.last : null; + if (currentChildren != null) childrenStack.removeLast(); + + if (next) ++currentDepth; + } + + return type; + } + + final rows = []; + + for (final _ in List.generate(count, (index) => index)) { + PlutoRowType? type; + + final depthOrRandom = depth ?? + faker.randomGenerator.integer( + defaultRandomDepth, + min: 0, + ); + + final countOfChildren = childCount ?? + List.generate(depthOrRandom, (index) { + return faker.randomGenerator.integer( + defaultRandomChildCount, + min: 0, + ); + }); + + type = depthOrRandom == 0 + ? null + : generateType(depthOrRandom, countOfChildren); + + rows.add( + PlutoRow( + cells: _cellsByColumn(columns), + type: type, + ), + ); + } + + return rows; + } + + static Map _cellsByColumn(List columns) { + final cells = {}; + + for (var column in columns) { + cells[column.field] = PlutoCell( + value: valueByColumnType(column), + ); + } + + return cells; + } } diff --git a/demo/lib/main.dart b/demo/lib/main.dart index 539495cba..dbec25349 100644 --- a/demo/lib/main.dart +++ b/demo/lib/main.dart @@ -29,6 +29,7 @@ import 'screen/feature/listing_mode_screen.dart'; import 'screen/feature/moving_screen.dart'; import 'screen/feature/number_type_column_screen.dart'; import 'screen/feature/row_color_screen.dart'; +import 'screen/feature/row_group_screen.dart'; import 'screen/feature/row_moving_screen.dart'; import 'screen/feature/row_pagination_screen.dart'; import 'screen/feature/row_selection_screen.dart'; @@ -88,6 +89,7 @@ class MyApp extends StatelessWidget { NumberTypeColumnScreen.routeName: (context) => const NumberTypeColumnScreen(), RowColorScreen.routeName: (context) => const RowColorScreen(), + RowGroupScreen.routeName: (context) => const RowGroupScreen(), RowMovingScreen.routeName: (context) => const RowMovingScreen(), RowPaginationScreen.routeName: (context) => const RowPaginationScreen(), RowSelectionScreen.routeName: (context) => const RowSelectionScreen(), diff --git a/demo/lib/screen/development_screen.dart b/demo/lib/screen/development_screen.dart index c29bc8e53..bde2822c2 100644 --- a/demo/lib/screen/development_screen.dart +++ b/demo/lib/screen/development_screen.dart @@ -1,4 +1,5 @@ import 'package:faker/faker.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_menu_bar/pluto_menu_bar.dart'; @@ -6,6 +7,16 @@ import 'package:pluto_menu_bar/pluto_menu_bar.dart'; import '../dummy_data/development.dart'; import 'home_screen.dart'; +enum _Test { + a, + b, + 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'; @@ -26,63 +37,138 @@ class _DevelopmentScreenState extends State { Color Function(PlutoRowColorContext)? rowColorCallback; + PlutoRowGroupDelegate? rowGroupDelegate; + TextDirection textDirection = TextDirection.ltr; @override void initState() { super.initState(); + const _Test test = _Test.c; + + // PlutoChangeNotifierFilter.debug = true; + // PlutoChangeNotifierFilter.debugWidgets = [ + // 'CheckboxAllSelectionWidget', + // ]; + + // PlutoGrid.setDefaultLocale('ko'); + // PlutoGrid.initializeDateFormat(); + /// Test A - // columns.addAll(testColumnsA); - // columnGroups.addAll(testColumnGroupsA); - // rows.addAll(DummyData.rowsByColumns(length: 10000, columns: columns)); - // rowColorCallback = (PlutoRowColorContext rowColorContext) { - // return rowColorContext.row.cells['column2']?.value == 'green' - // ? const Color(0xFFE2F6DF) - // : Colors.white; - // }; + if (test.isA) { + columns.addAll(testColumnsA); + columnGroups.addAll(testColumnGroupsA); + rows.addAll(DummyData.rowsByColumns(length: 10000, columns: columns)); + rowColorCallback = (PlutoRowColorContext rowColorContext) { + return rowColorContext.row.cells['column2']?.value == 'green' + ? const Color(0xFFE2F6DF) + : Colors.white; + }; + } /// Test B - columns.addAll(DummyData(10, 0).columns); - columnGroups.addAll(testColumnGroupsB); - DummyData.fetchRows( - columns, - chunkSize: 100, - chunkCount: 10, - ).then((fetchedRows) { - PlutoGridStateManager.initializeRowsAsync(columns, fetchedRows) - .then((initializedRows) { - stateManager.refRows.addAll(FilteredList(initialList: initializedRows)); - stateManager.notifyListeners(); + if (test.isB) { + columns.addAll(DummyData(10, 0).columns); + columnGroups.addAll(testColumnGroupsB); + DummyData.fetchRows( + columns, + chunkSize: 100, + chunkCount: 10, + ).then((fetchedRows) { + PlutoGridStateManager.initializeRowsAsync(columns, fetchedRows) + .then((initializedRows) { + stateManager.refRows.addAll(initializedRows); + stateManager.setRowGroup(PlutoRowGroupByColumnDelegate( + columns: [ + stateManager.columns[3], + stateManager.columns[4], + ], + showFirstExpandableIcon: false, + )); + stateManager.moveColumn( + column: columns[5], + targetColumn: columns[0], + ); + stateManager.setPage(1); + }); }); - }); - columns[0].enableRowDrag = true; - columns[0].enableRowChecked = true; - columns[0].footerRenderer = (c) { - return PlutoAggregateColumnFooter( - rendererContext: c, - type: PlutoAggregateColumnType.count, - format: 'CheckedCount : #,###', - alignment: Alignment.center, - filter: (cell) => cell.row.checked == true, - ); - }; - columns[1].footerRenderer = (c) { - return PlutoAggregateColumnFooter( - rendererContext: c, - type: PlutoAggregateColumnType.sum, - format: '#,###', - alignment: Alignment.center, - formatAsCurrency: true, - filter: (cell) => cell.row.checked == true, - titleSpanBuilder: (text) { - return [ - const TextSpan(text: 'CheckedSum : '), - TextSpan(text: text), - ]; - }, + columns[0].footerRenderer = (c) { + return PlutoAggregateColumnFooter( + rendererContext: c, + type: PlutoAggregateColumnType.count, + groupedRowType: PlutoAggregateColumnGroupedRowType.rows, + format: 'CheckedCount : #,###', + alignment: Alignment.center, + filter: (cell) => cell.row.checked == true, + ); + }; + columns[1].footerRenderer = (c) { + return PlutoAggregateColumnFooter( + rendererContext: c, + type: PlutoAggregateColumnType.sum, + groupedRowType: PlutoAggregateColumnGroupedRowType.rows, + format: '#,###', + alignment: Alignment.center, + formatAsCurrency: true, + filter: (cell) => cell.row.checked == true, + titleSpanBuilder: (text) { + return [ + const TextSpan(text: 'CheckedSum : '), + TextSpan(text: text), + ]; + }, + ); + }; + columns[3].enableRowDrag = true; + columns[3].enableRowChecked = true; + columns[3].frozen = PlutoColumnFrozen.start; + columns[4].frozen = PlutoColumnFrozen.start; + } + + /// Test C + if (test.isC) { + columns.addAll(DummyData(10, 0).columns); + columns[0].enableRowChecked = true; + columns[0].footerRenderer = (c) { + return PlutoAggregateColumnFooter( + rendererContext: c, + type: PlutoAggregateColumnType.count, + groupedRowType: PlutoAggregateColumnGroupedRowType.all, + format: 'CheckedCount : #,###', + alignment: Alignment.center, + filter: (cell) => cell.row.checked == true, + ); + }; + columns[1].footerRenderer = (c) { + return PlutoAggregateColumnFooter( + rendererContext: c, + type: PlutoAggregateColumnType.sum, + groupedRowType: PlutoAggregateColumnGroupedRowType.all, + format: '#,###', + alignment: Alignment.center, + formatAsCurrency: true, + filter: (cell) => cell.row.checked == true, + titleSpanBuilder: (text) { + return [ + const TextSpan(text: 'CheckedSum : '), + TextSpan(text: text), + ]; + }, + ); + }; + rows.addAll(DummyData.treeRowsByColumn( + columns: columns, + count: 100, + // depth: 3, + // childCount: [1, 1, 1], + )); + rowGroupDelegate = PlutoRowGroupTreeDelegate( + resolveColumnDepth: (column) => stateManager.columnIndex(column), + showText: (cell) => true, + showFirstExpandableIcon: true, ); - }; + } } void handleOnRowChecked(PlutoGridOnRowCheckedEvent event) { @@ -104,113 +190,123 @@ class _DevelopmentScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - body: Container( - padding: const EdgeInsets.all(15), - child: Directionality( - textDirection: textDirection, - child: PlutoGrid( - columns: columns, - rows: rows, - columnGroups: columnGroups, - // mode: PlutoGridMode.selectWithOneTap, - onChanged: (PlutoGridOnChangedEvent event) { - print(event); - }, - onLoaded: (PlutoGridOnLoadedEvent event) { - stateManager = event.stateManager; - }, - onSorted: (PlutoGridOnSortedEvent event) { - print(event); - }, - // onSelected: (event) { - // print(event.cell!.value); - // }, - // onRowChecked: handleOnRowChecked, - // onRowsMoved: (event) { - // print(event.idx); - // print(event.rows); - // }, - // onRowDoubleTap: (e) { - // print('Double click A Row.'); - // print(e.row?.cells['column1']?.value); - // }, - // onRowSecondaryTap: (e) { - // print('Secondary click A Row.(${e.offset})'); - // print(e.row?.cells['column1']?.value); - // }, - createHeader: (PlutoGridStateManager stateManager) { - // stateManager.headerHeight = 200; - return _Header( - stateManager: stateManager, - columns: columns, - textDirection: textDirection, - setTextDirection: setTextDirection, - ); - }, - // createFooter: (stateManager) { - // stateManager.setPageSize(30, notify: false); - // return PlutoPagination(stateManager); - // }, - rowColorCallback: rowColorCallback, - configuration: PlutoGridConfiguration( - // columnHeight: 30.0, - // columnFilterHeight: 30.0, - // rowHeight: 30.0, - // defaultCellPadding: 15, - // defaultColumnTitlePadding: 15, - // iconSize: 15, - style: PlutoGridStyleConfig( - enableColumnBorderVertical: true, - enableColumnBorderHorizontal: true, - enableCellBorderVertical: true, - enableCellBorderHorizontal: true, - // oddRowColor: Colors.amber, - evenRowColor: const Color(0xFFF6F6F6), - gridBorderRadius: BorderRadius.circular(10), - gridPopupBorderRadius: BorderRadius.circular(7), - // columnAscendingIcon: const Icon( - // Icons.arrow_upward, - // color: Colors.cyan, - // ), - // columnDescendingIcon: const Icon( - // Icons.arrow_downward, - // color: Colors.pink, + body: SafeArea( + child: Container( + padding: const EdgeInsets.all(15), + child: Directionality( + textDirection: textDirection, + child: PlutoGrid( + columns: columns, + rows: rows, + columnGroups: columnGroups, + // mode: PlutoGridMode.selectWithOneTap, + onChanged: (PlutoGridOnChangedEvent event) { + print(event); + }, + onLoaded: (PlutoGridOnLoadedEvent event) { + stateManager = event.stateManager; + + stateManager.setShowColumnFilter(true); + + if (rowGroupDelegate != null) { + stateManager.setRowGroup(rowGroupDelegate); + } + }, + onSorted: (PlutoGridOnSortedEvent event) { + print(event); + }, + // onSelected: (event) { + // print(event.cell!.value); + // }, + // onRowChecked: handleOnRowChecked, + // onRowsMoved: (event) { + // print(event.idx); + // print(event.rows); + // }, + // onRowDoubleTap: (e) { + // print('Double click A Row.'); + // print(e.row?.cells['column1']?.value); + // }, + // onRowSecondaryTap: (e) { + // print('Secondary click A Row.(${e.offset})'); + // print(e.row?.cells['column1']?.value); + // }, + createHeader: (PlutoGridStateManager stateManager) { + // stateManager.headerHeight = 200; + return _Header( + stateManager: stateManager, + columns: columns, + textDirection: textDirection, + setTextDirection: setTextDirection, + ); + }, + createFooter: (stateManager) { + stateManager.setPageSize(20, notify: false); + return PlutoPagination(stateManager); + }, + rowColorCallback: rowColorCallback, + configuration: PlutoGridConfiguration( + // columnHeight: 30.0, + // columnFilterHeight: 30.0, + // rowHeight: 30.0, + // defaultCellPadding: 15, + // defaultColumnTitlePadding: 15, + // iconSize: 15, + style: PlutoGridStyleConfig( + enableColumnBorderVertical: true, + enableColumnBorderHorizontal: true, + enableCellBorderVertical: true, + enableCellBorderHorizontal: true, + // oddRowColor: Colors.amber, + // evenRowColor: const Color(0xFFF6F6F6), + cellColorGroupedRow: const Color(0x80F6F6F6), + gridBorderRadius: BorderRadius.circular(10), + gridPopupBorderRadius: BorderRadius.circular(7), + // columnAscendingIcon: const Icon( + // Icons.arrow_upward, + // color: Colors.cyan, + // ), + // columnDescendingIcon: const Icon( + // Icons.arrow_downward, + // color: Colors.pink, + // ), + ), + // enableGridBorderShadow: true, + enableMoveHorizontalInEditing: true, + // enableRowColorAnimation: false, + // columnSizeConfig: const PlutoGridColumnSizeConfig( + // autoSizeMode: PlutoAutoSizeMode.equal, + // resizeMode: PlutoResizeMode.pushAndPull, + // restoreAutoSizeAfterHideColumn: true, + // restoreAutoSizeAfterFrozenColumn: false, + // restoreAutoSizeAfterMoveColumn: false, + // restoreAutoSizeAfterInsertColumn: false, + // restoreAutoSizeAfterRemoveColumn: false, // ), - ), - // enableGridBorderShadow: true, - enableMoveHorizontalInEditing: true, - // enableRowColorAnimation: false, - // columnSizeConfig: const PlutoGridColumnSizeConfig( - // autoSizeMode: PlutoAutoSizeMode.equal, - // resizeMode: PlutoResizeMode.pushAndPull, - // restoreAutoSizeAfterHideColumn: true, - // restoreAutoSizeAfterFrozenColumn: false, - // restoreAutoSizeAfterMoveColumn: false, - // restoreAutoSizeAfterInsertColumn: false, - // restoreAutoSizeAfterRemoveColumn: false, - // ), - // checkedColor: const Color(0x876FB0FF), - enterKeyAction: PlutoGridEnterKeyAction.toggleEditing, - enableMoveDownAfterSelecting: false, - scrollbar: const PlutoGridScrollbarConfig( - isAlwaysShown: false, - scrollbarThickness: 8, - scrollbarThicknessWhileDragging: 10, - ), - // localeText: const PlutoGridLocaleText.korean(), - columnFilter: PlutoGridColumnFilterConfig( - filters: const [ - ...FilterHelper.defaultFilters, - ClassYouImplemented(), - ], - resolveDefaultColumnFilter: (column, resolver) { - if (column.field == 'column3') { - return resolver() + // checkedColor: const Color(0x876FB0FF), + enterKeyAction: PlutoGridEnterKeyAction.toggleEditing, + enableMoveDownAfterSelecting: false, + scrollbar: const PlutoGridScrollbarConfig( + isAlwaysShown: false, + scrollbarThickness: 8, + scrollbarThicknessWhileDragging: 10, + ), + // localeText: const PlutoGridLocaleText.korean(), + columnFilter: PlutoGridColumnFilterConfig( + filters: const [ + ...FilterHelper.defaultFilters, + ClassYouImplemented(), + ], + resolveDefaultColumnFilter: (column, resolver) { + if (column.field == 'column3') { + return resolver() + as PlutoFilterType; + } + + return resolver() as PlutoFilterType; - } - - return resolver() as PlutoFilterType; - }, + }, + ), ), ), ), @@ -709,6 +805,49 @@ class _HeaderState extends State<_Header> { ), ], ), + if (!kReleaseMode) + PlutoMenuItem( + title: 'Test', + onTap: () { + widget.stateManager.setShowLoading( + !widget.stateManager.showLoading, + level: PlutoGridLoadingLevel.rows, + ); + // Insert column to row group by + // widget.stateManager.insertColumns(0, [ + // PlutoColumn( + // title: 'new', + // field: 'new', + // type: PlutoColumnType.text(), + // ), + // ]); + // widget.stateManager + // .setRowGroup(PlutoRowGroupByColumnDelegate(columns: [ + // ...(widget.stateManager.rowGroupDelegate + // as PlutoRowGroupByColumnDelegate) + // .columns, + // widget.stateManager.columns[0], + // ])); + // widget.stateManager.updateVisibilityLayout(); + + // Reset row group by columns + // for (final column in widget.stateManager.columns) { + // column.enableRowDrag = false; + // column.enableRowChecked = false; + // column.frozen = PlutoColumnFrozen.none; + // } + // widget.stateManager.columns[6].enableRowDrag = true; + // widget.stateManager.columns[6].enableRowChecked = true; + // widget.stateManager.columns[6].frozen = PlutoColumnFrozen.start; + // widget.stateManager + // .setRowGroup(PlutoRowGroupByColumnDelegate(columns: [ + // widget.stateManager.columns[6], + // widget.stateManager.columns[7], + // widget.stateManager.columns[8], + // ])); + // widget.stateManager.updateVisibilityLayout(); + }, + ), ], ); } diff --git a/demo/lib/screen/empty_screen.dart b/demo/lib/screen/empty_screen.dart index b1b6b4738..e999794e5 100644 --- a/demo/lib/screen/empty_screen.dart +++ b/demo/lib/screen/empty_screen.dart @@ -47,18 +47,20 @@ class _EmptyScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - body: Container( - padding: const EdgeInsets.all(15), - child: PlutoGrid( - columns: columns, - rows: rows, - onChanged: (PlutoGridOnChangedEvent event) { - print(event); - }, - onLoaded: (PlutoGridOnLoadedEvent event) { - stateManager = event.stateManager; - }, - configuration: const PlutoGridConfiguration(), + body: SafeArea( + child: Container( + padding: const EdgeInsets.all(15), + child: PlutoGrid( + columns: columns, + rows: rows, + onChanged: (PlutoGridOnChangedEvent event) { + print(event); + }, + onLoaded: (PlutoGridOnLoadedEvent event) { + stateManager = event.stateManager; + }, + configuration: const PlutoGridConfiguration(), + ), ), ), ); 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 855b39a4b..7e1e588a2 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 @@ -354,7 +354,7 @@ class _HeaderState extends State<_Header> { DropdownButtonHideUnderline( child: DropdownButton( value: gridSelectingMode, - items: PlutoGridStateManager.selectingModes + items: PlutoGridSelectingMode.values .map>( (PlutoGridSelectingMode item) { final color = gridSelectingMode == item ? Colors.blue : null; diff --git a/demo/lib/screen/feature/add_rows_asynchronously.dart b/demo/lib/screen/feature/add_rows_asynchronously.dart index 1b03073a5..78faa54d9 100644 --- a/demo/lib/screen/feature/add_rows_asynchronously.dart +++ b/demo/lib/screen/feature/add_rows_asynchronously.dart @@ -41,7 +41,7 @@ class _AddRowsAsynchronouslyScreenState columns, fetchedRows, ).then((value) { - stateManager.refRows.addAll(FilteredList(initialList: value)); + stateManager.refRows.addAll(value); /// In this example, /// the loading screen is activated in the onLoaded callback when the grid is created. diff --git a/demo/lib/screen/feature/row_group_screen.dart b/demo/lib/screen/feature/row_group_screen.dart new file mode 100644 index 000000000..6340d9fa4 --- /dev/null +++ b/demo/lib/screen/feature/row_group_screen.dart @@ -0,0 +1,190 @@ +import 'package:flutter/material.dart'; +import 'package:pluto_grid/pluto_grid.dart'; + +import '../../dummy_data/development.dart'; +import '../../widget/pluto_example_button.dart'; +import '../../widget/pluto_example_screen.dart'; + +class RowGroupScreen extends StatefulWidget { + static const routeName = 'feature/row-group'; + + const RowGroupScreen({Key? key}) : super(key: key); + + @override + _RowGroupScreenState createState() => _RowGroupScreenState(); +} + +class _RowGroupScreenState extends State { + final List columnsA = []; + + final List rowsA = []; + + final List columnsB = []; + + final List rowsB = []; + + late PlutoGridStateManager stateManager; + + @override + void initState() { + super.initState(); + + columnsA.addAll([ + PlutoColumn( + title: 'Planets', + field: 'planets', + type: PlutoColumnType.select([ + 'Mercury', + 'Venus', + 'Earth', + 'Mars', + 'Jupiter', + 'Saturn', + 'Uranus', + 'Neptune', + 'Pluto', + ]), + ), + PlutoColumn(title: 'Users', field: 'users', type: PlutoColumnType.text()), + PlutoColumn(title: 'Date', field: 'date', type: PlutoColumnType.date()), + PlutoColumn(title: 'Time', field: 'time', type: PlutoColumnType.time()), + ]); + + rowsA.addAll(DummyData.rowsByColumns(length: 100, columns: columnsA)); + + columnsB.addAll([ + PlutoColumn( + title: 'Files', + field: 'files', + type: PlutoColumnType.text(), + renderer: (c) { + IconData icon = + c.row.type.isGroup ? Icons.folder : Icons.file_present; + return Row( + children: [ + Icon(icon, size: 18, color: Colors.grey), + const SizedBox(width: 10), + Text(c.cell.value), + ], + ); + }, + ), + ]); + + rowsB.addAll([ + PlutoRow( + cells: {'files': PlutoCell(value: 'PlutoGrid')}, + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow( + cells: {'files': PlutoCell(value: 'lib')}, + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow( + cells: {'files': PlutoCell(value: 'src')}, + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow(cells: { + 'files': PlutoCell(value: 'pluto_grid.dart') + }), + PlutoRow(cells: { + 'files': PlutoCell(value: 'pluto_dual_grid.dart') + }), + ], + )), + ), + ], + ), + ), + ), + PlutoRow( + cells: {'files': PlutoCell(value: 'test')}, + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow( + cells: { + 'files': PlutoCell(value: 'pluto_grid_test.dart') + }, + ), + ], + ), + ), + ), + ], + )), + ), + PlutoRow( + cells: {'files': PlutoCell(value: 'PlutoMenuBar')}, + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow( + cells: {'files': PlutoCell(value: 'pluto_menu_bar.dart')}, + ), + ], + )), + ), + ]); + } + + @override + Widget build(BuildContext context) { + return PlutoExampleScreen( + title: 'Row group', + topTitle: 'Row group', + topContents: const [ + Text('Grouping rows in a column or tree structure.'), + ], + topButtons: [ + PlutoExampleButton( + url: + 'https://github.com/bosskmk/pluto_grid/blob/master/demo/lib/screen/feature/row_group_screen.dart', + ), + ], + body: PlutoDualGrid( + gridPropsA: PlutoDualGridProps( + columns: columnsA, + rows: rowsA, + configuration: const PlutoGridConfiguration( + style: PlutoGridStyleConfig( + cellColorGroupedRow: Color(0x80F6F6F6), + ), + ), + onLoaded: (e) => e.stateManager.setRowGroup( + PlutoRowGroupByColumnDelegate( + columns: [ + columnsA[0], + columnsA[1], + ], + showFirstExpandableIcon: false, + ), + ), + ), + gridPropsB: PlutoDualGridProps( + columns: columnsB, + rows: rowsB, + configuration: const PlutoGridConfiguration( + style: PlutoGridStyleConfig( + cellColorGroupedRow: Color(0x80F6F6F6), + ), + columnSize: PlutoGridColumnSizeConfig( + autoSizeMode: PlutoAutoSizeMode.equal, + ), + ), + onLoaded: (e) { + e.stateManager.setRowGroup(PlutoRowGroupTreeDelegate( + resolveColumnDepth: (column) => + e.stateManager.columnIndex(column), + showText: (cell) => true, + showFirstExpandableIcon: true, + )); + }, + ), + ), + ); + } +} diff --git a/demo/lib/screen/home_screen.dart b/demo/lib/screen/home_screen.dart index 32b00bb84..13ab18054 100644 --- a/demo/lib/screen/home_screen.dart +++ b/demo/lib/screen/home_screen.dart @@ -35,6 +35,7 @@ import 'feature/listing_mode_screen.dart'; import 'feature/moving_screen.dart'; import 'feature/number_type_column_screen.dart'; import 'feature/row_color_screen.dart'; +import 'feature/row_group_screen.dart'; import 'feature/row_moving_screen.dart'; import 'feature/row_pagination_screen.dart'; import 'feature/row_selection_screen.dart'; @@ -53,134 +54,137 @@ class HomeScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - body: LayoutBuilder( - builder: (ctx, size) { - return Stack( - children: [ - Positioned.fill( - top: 0, - bottom: 0, - left: 0, - right: 0, - child: Container( - decoration: const BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [ - Color(0xFF2E4370), - Color(0xFF33C1E8), - ], + body: SafeArea( + child: LayoutBuilder( + builder: (ctx, size) { + return Stack( + children: [ + Positioned.fill( + top: 0, + bottom: 0, + left: 0, + right: 0, + child: Container( + decoration: const BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + Color(0xFF2E4370), + Color(0xFF33C1E8), + ], + ), ), - ), - child: SingleChildScrollView( - scrollDirection: Axis.vertical, - child: Column( - children: [ - Padding( - padding: const EdgeInsets.fromLTRB( - 30, - 100, - 30, - 0, + child: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Column( + children: [ + Padding( + padding: const EdgeInsets.fromLTRB( + 30, + 100, + 30, + 0, + ), + child: Align( + alignment: Alignment.center, + child: PlutoGridTitle( + fontSize: max(size.maxWidth / 20, 38), + ), + ), + ), + Container( + padding: const EdgeInsets.symmetric( + horizontal: 30, + ), + child: const PlutoTextColorAnimation( + text: 'The DataGrid for Flutter.', + fontSize: 20, + ), + ), + const SizedBox( + height: 50, ), - child: Align( - alignment: Alignment.center, - child: PlutoGridTitle( - fontSize: max(size.maxWidth / 20, 38), + Center( + child: Column( + children: [ + IconButton( + icon: const FaIcon(FontAwesomeIcons.link), + color: Colors.white, + onPressed: () { + launchUrl( + 'https://pub.dev/packages/pluto_grid'); + }, + ), + const Text( + 'pub.dev', + style: TextStyle(color: Colors.white), + ), + ], ), ), - ), - Container( - padding: const EdgeInsets.symmetric( - horizontal: 30, + const PlutoSection( + title: 'Features', + fontColor: Colors.white, + child: PlutoFeatures(), + // color: Colors.white, ), - child: const PlutoTextColorAnimation( - text: 'The DataGrid for Flutter.', - fontSize: 20, + const PlutoSection( + title: 'Contributors', + fontColor: Colors.white, + child: PlutoContributors(), ), - ), - const SizedBox( - height: 50, - ), - Center( - child: Column( - children: [ - IconButton( - icon: const FaIcon(FontAwesomeIcons.link), - color: Colors.white, - onPressed: () { - launchUrl( - 'https://pub.dev/packages/pluto_grid'); - }, - ), - const Text( - 'pub.dev', - style: TextStyle(color: Colors.white), - ), - ], + const SizedBox( + height: 50, ), - ), - const PlutoSection( - title: 'Features', - fontColor: Colors.white, - child: PlutoFeatures(), - // color: Colors.white, - ), - const PlutoSection( - title: 'Contributors', - fontColor: Colors.white, - child: PlutoContributors(), - ), - const SizedBox( - height: 50, - ), - Center( - child: Column( - children: [ - IconButton( - icon: const FaIcon(FontAwesomeIcons.github), - color: Colors.white, - onPressed: () { + Center( + child: Column( + children: [ + IconButton( + icon: const FaIcon(FontAwesomeIcons.github), + color: Colors.white, + onPressed: () { + launchUrl( + 'https://github.com/bosskmk/pluto_grid'); + }, + ), + const Text( + 'Github', + style: TextStyle(color: Colors.white), + ), + ], + ), + ), + const SizedBox( + height: 50, + ), + Center( + child: MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + onTap: () { launchUrl( - 'https://github.com/bosskmk/pluto_grid'); + 'https://www.buymeacoffee.com/manki'); }, - ), - const Text( - 'Github', - style: TextStyle(color: Colors.white), - ), - ], - ), - ), - const SizedBox( - height: 50, - ), - Center( - child: MouseRegion( - cursor: SystemMouseCursors.click, - child: GestureDetector( - onTap: () { - launchUrl('https://www.buymeacoffee.com/manki'); - }, - child: Image.asset( - 'assets/images/buy_me_a_coffee.png', - height: 60, + child: Image.asset( + 'assets/images/buy_me_a_coffee.png', + height: 60, + ), ), ), ), - ), - const SizedBox( - height: 100, - ), - ], + const SizedBox( + height: 100, + ), + ], + ), ), ), ), - ), - ], - ); - }, + ], + ); + }, + ), ), ); } @@ -355,6 +359,14 @@ class PlutoFeatures extends StatelessWidget { Navigator.pushNamed(context, RowPaginationScreen.routeName); }, ), + PlutoListTile( + title: 'Row group', + description: 'Grouping rows in a column or tree structure.', + onTapLiveDemo: () { + Navigator.pushNamed(context, RowGroupScreen.routeName); + }, + trailing: newIcon, + ), PlutoListTile( title: 'Row with checkbox', description: 'You can select rows with checkbox.', diff --git a/demo/lib/widget/pluto_example_screen.dart b/demo/lib/widget/pluto_example_screen.dart index fef1974e7..928c9236e 100644 --- a/demo/lib/widget/pluto_example_screen.dart +++ b/demo/lib/widget/pluto_example_screen.dart @@ -56,35 +56,37 @@ class PlutoExampleScreen extends StatelessWidget { appBar: AppBar( title: Text('$title - PlutoGrid'), ), - body: LayoutBuilder( - builder: (ctx, size) { - return SingleChildScrollView( - scrollDirection: Axis.vertical, - child: Container( - width: size.maxWidth, - height: size.maxHeight, - constraints: const BoxConstraints( - minHeight: 750, + body: SafeArea( + child: LayoutBuilder( + builder: (ctx, size) { + return SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Container( + width: size.maxWidth, + height: size.maxHeight, + constraints: const BoxConstraints( + minHeight: 750, + ), + padding: const EdgeInsets.all(30), + child: Column( + children: [ + PlutoExpansionTile( + title: topTitle!, + buttons: topButtons, + children: topContents, + ), + const SizedBox( + height: 10, + ), + Expanded( + child: body!, + ), + ], + ), ), - padding: const EdgeInsets.all(30), - child: Column( - children: [ - PlutoExpansionTile( - title: topTitle!, - buttons: topButtons, - children: topContents, - ), - const SizedBox( - height: 10, - ), - Expanded( - child: body!, - ), - ], - ), - ), - ); - }, + ); + }, + ), ), floatingActionButton: FloatingActionButton( onPressed: () { diff --git a/lib/pluto_grid.dart b/lib/pluto_grid.dart index f484ee752..8298dea72 100644 --- a/lib/pluto_grid.dart +++ b/lib/pluto_grid.dart @@ -9,9 +9,10 @@ export './src/helper/pluto_date_time_helper.dart'; export './src/helper/pluto_debounce.dart'; export './src/helper/pluto_key_manager_event.dart'; export './src/helper/pluto_move_direction.dart'; +export './src/helper/pluto_row_group_delegate.dart'; +export './src/helper/pluto_row_group_helper.dart'; export './src/helper/pluto_size_helper.dart'; export './src/helper/show_column_menu.dart'; -export './src/manager/event/pluto_grid_callback_event.dart'; export './src/manager/event/pluto_grid_cannot_move_current_cell_event.dart'; export './src/manager/event/pluto_grid_cell_gesture_event.dart'; export './src/manager/event/pluto_grid_change_column_filter_event.dart'; @@ -19,6 +20,7 @@ export './src/manager/event/pluto_grid_drag_rows_event.dart'; export './src/manager/event/pluto_grid_event.dart'; export './src/manager/event/pluto_grid_scroll_update_event.dart'; export './src/manager/pluto_change_notifier.dart'; +export './src/manager/pluto_change_notifier_filter.dart'; export './src/manager/pluto_grid_event_manager.dart'; export './src/manager/pluto_grid_key_manager.dart'; export './src/manager/pluto_grid_state_manager.dart'; @@ -27,6 +29,7 @@ export './src/model/pluto_column.dart'; export './src/model/pluto_column_group.dart'; export './src/model/pluto_column_type.dart'; export './src/model/pluto_row.dart'; +export './src/model/pluto_row_type.dart'; export './src/plugin/pluto_aggregate_column_footer.dart'; export './src/plugin/pluto_pagination.dart'; export './src/pluto_dual_grid.dart'; diff --git a/lib/src/helper/filter_helper.dart b/lib/src/helper/filter_helper.dart index d7c78bc2a..acd412519 100644 --- a/lib/src/helper/filter_helper.dart +++ b/lib/src/helper/filter_helper.dart @@ -318,6 +318,8 @@ class FilterPopupState { /// Height of filter popup final double height; + final void Function()? onClosed; + FilterPopupState({ required this.context, required this.configuration, @@ -328,6 +330,7 @@ class FilterPopupState { required this.focusFirstFilterValue, this.width = 600, this.height = 450, + this.onClosed, }) : assert(columns.isNotEmpty), _previousFilterRows = [...filterRows]; @@ -364,6 +367,10 @@ class FilterPopupState { void onSelected(PlutoGridOnSelectedEvent e) { _stateManager!.removeListener(stateListener); + + if (onClosed != null) { + onClosed!(); + } } void stateListener() { @@ -471,7 +478,7 @@ class PlutoGridFilterPopupHeader extends StatelessWidget { void handleClearButton() { if (stateManager!.rows.isEmpty) { - Navigator.of(stateManager!.gridFocusNode!.context!).pop(); + Navigator.of(stateManager!.gridFocusNode.context!).pop(); } else { stateManager!.removeRows(stateManager!.rows); } diff --git a/lib/src/helper/filtered_list.dart b/lib/src/helper/filtered_list.dart index 1a60c5891..3fe0456a5 100644 --- a/lib/src/helper/filtered_list.dart +++ b/lib/src/helper/filtered_list.dart @@ -14,6 +14,10 @@ abstract class AbstractFilteredList implements ListBase { /// Filtered list. Same as [originalList] if filter is null. List get filteredList; + /// If it is filtered, return the original list if it is not a filtered list. + /// (list before range is applied) + List get filterOrOriginalList; + /// Whether to set a filter. bool get hasFilter; @@ -133,6 +137,9 @@ class FilteredList extends ListBase implements AbstractFilteredList { @override List get filteredList => [..._filteredList]; + @override + List get filterOrOriginalList => hasFilter ? filteredList : originalList; + @override bool get hasFilter => _filter != null; @@ -145,6 +152,9 @@ class FilteredList extends ListBase implements AbstractFilteredList { /// Returns the length of all elements, regardless of filtering or ranging. int get originalLength => _list.length; + int get filterOrOriginalLength => + hasFilter ? _filteredList.length : _list.length; + @override set length(int length) { _list.length = length; @@ -425,7 +435,7 @@ class FilteredList extends ListBase implements AbstractFilteredList { } int _toOriginalIndex(int index) { - if (!hasFilter && !hasRange || _effectiveList.isEmpty) { + if (_effectiveList.isEmpty || (!hasFilter && !hasRange)) { return index; } @@ -454,17 +464,11 @@ class FilteredList extends ListBase implements AbstractFilteredList { int _toOriginalIndexForInsert(int index) { var lastIndex = _effectiveList.length - 1; - var greaterThanLast = index > lastIndex + (_range?.from ?? 0); - - var originalIndex = greaterThanLast - ? _toOriginalIndex(lastIndex + (_range?.from ?? 0)) - : _toOriginalIndex(index); + var greaterThanLast = index > lastIndex; - if (greaterThanLast) { - ++originalIndex; - } + var originalIndex = _toOriginalIndex(greaterThanLast ? lastIndex : index); - return originalIndex; + return greaterThanLast ? ++originalIndex : originalIndex; } void _updateFilteredList() { diff --git a/lib/src/helper/pluto_aggregate_helper.dart b/lib/src/helper/pluto_aggregate_helper.dart index bd22c2c61..916f1ff39 100644 --- a/lib/src/helper/pluto_aggregate_helper.dart +++ b/lib/src/helper/pluto_aggregate_helper.dart @@ -4,61 +4,53 @@ import 'package:pluto_grid/pluto_grid.dart'; class PlutoAggregateHelper { static num sum({ - required List rows, + required Iterable rows, required PlutoColumn column, PlutoAggregateFilter? filter, }) { - num sum = 0; - if (column.type is! PlutoColumnTypeWithNumberFormat || !_hasColumnField(rows: rows, column: column)) { - return sum; + return 0; } final numberColumn = column.type as PlutoColumnTypeWithNumberFormat; - sum = rows.fold(0, (p, e) { - final cell = e.cells[column.field]!; + final foundItems = filter != null + ? rows.where((row) => filter(row.cells[column.field]!)) + : rows; - if (filter == null || filter(cell)) { - return p += cell.value!; - } - return p; - }); + final Iterable numbers = foundItems.map( + (e) => e.cells[column.field]!.value, + ); - return numberColumn.toNumber(numberColumn.applyFormat(sum)); + return numberColumn.toNumber(numberColumn.applyFormat(numbers.sum)); } static num average({ - required List rows, + required Iterable rows, required PlutoColumn column, PlutoAggregateFilter? filter, }) { - num sum = 0; - if (column.type is! PlutoColumnTypeWithNumberFormat || !_hasColumnField(rows: rows, column: column)) { - return sum; + return 0; } - int itemCount = 0; - - sum = rows.fold(0, (p, e) { - final cell = e.cells[column.field]!; + final numberColumn = column.type as PlutoColumnTypeWithNumberFormat; - if (filter == null || filter(cell)) { - ++itemCount; - return p += cell.value!; - } + final foundItems = filter != null + ? rows.where((row) => filter(row.cells[column.field]!)) + : rows; - return p; - }); + final Iterable numbers = foundItems.map( + (e) => e.cells[column.field]!.value, + ); - return sum / itemCount; + return numberColumn.toNumber(numberColumn.applyFormat(numbers.average)); } static num? min({ - required List rows, + required Iterable rows, required PlutoColumn column, PlutoAggregateFilter? filter, }) { @@ -71,14 +63,15 @@ class PlutoAggregateHelper { ? rows.where((row) => filter(row.cells[column.field]!)) : rows; - final Iterable mapValues = - foundItems.map((e) => e.cells[column.field]!.value); + final Iterable mapValues = foundItems.map( + (e) => e.cells[column.field]!.value, + ); return mapValues.minOrNull; } static num? max({ - required List rows, + required Iterable rows, required PlutoColumn column, PlutoAggregateFilter? filter, }) { @@ -91,14 +84,15 @@ class PlutoAggregateHelper { ? rows.where((row) => filter(row.cells[column.field]!)) : rows; - final Iterable mapValues = - foundItems.map((e) => e.cells[column.field]!.value); + final Iterable mapValues = foundItems.map( + (e) => e.cells[column.field]!.value, + ); return mapValues.maxOrNull; } static int count({ - required List rows, + required Iterable rows, required PlutoColumn column, PlutoAggregateFilter? filter, }) { @@ -114,7 +108,7 @@ class PlutoAggregateHelper { } static bool _hasColumnField({ - required List rows, + required Iterable rows, required PlutoColumn column, }) { return rows.firstOrNull?.cells.containsKey(column.field) == true; diff --git a/lib/src/helper/pluto_key_manager_event.dart b/lib/src/helper/pluto_key_manager_event.dart index 04cf5ae3f..cc656a5e4 100644 --- a/lib/src/helper/pluto_key_manager_event.dart +++ b/lib/src/helper/pluto_key_manager_event.dart @@ -59,6 +59,8 @@ class PlutoKeyManagerEvent { bool get isF3 => event.logicalKey.keyId == LogicalKeyboardKey.f3.keyId; + bool get isF4 => event.logicalKey.keyId == LogicalKeyboardKey.f4.keyId; + bool get isBackspace => event.logicalKey.keyId == LogicalKeyboardKey.backspace.keyId; diff --git a/lib/src/helper/pluto_row_group_delegate.dart b/lib/src/helper/pluto_row_group_delegate.dart new file mode 100644 index 000000000..ba926128d --- /dev/null +++ b/lib/src/helper/pluto_row_group_delegate.dart @@ -0,0 +1,439 @@ +import 'package:collection/collection.dart'; +import 'package:flutter/foundation.dart'; +import 'package:intl/intl.dart'; +import 'package:pluto_grid/pluto_grid.dart'; + +/// {@template pluto_row_group_delegate_type} +/// Determines the grouping type of the row. +/// +/// [tree] groups rows into an unformatted tree. +/// +/// [byColumn] groups rows by a specified column. +/// {@endtemplate} +enum PlutoRowGroupDelegateType { + tree, + byColumn; + + bool get isTree => this == PlutoRowGroupDelegateType.tree; + + bool get isByColumn => this == PlutoRowGroupDelegateType.byColumn; +} + +/// Abstract class that defines a base interface for grouping rows. +/// +/// [PlutoRowGroupTreeDelegate] or [PlutoRowGroupByColumnDelegate] +/// class implements this abstract class. +abstract class PlutoRowGroupDelegate { + final countFormat = NumberFormat.compact(); + + /// {@macro pluto_row_group_delegate_type} + PlutoRowGroupDelegateType get type; + + /// {@template pluto_row_group_delegate_enabled} + /// Returns whether the grouping function is activated. + /// + /// It is enabled by default, + /// In the case of [PlutoRowGroupDelegateType.byColumn], + /// the column is hidden and temporarily deactivated when there is no column to group. + /// {@endtemplate} + bool get enabled; + + /// {@template pluto_row_group_delegate_showCount} + /// Decide whether to display the number of child rows in the cell + /// where the expand icon is displayed in the grouped state. + /// {@endtemplate} + bool get showCount; + + /// {@template pluto_row_group_delegate_enableCompactCount} + /// Decide whether to simply display the number of child rows when [showCount] is true. + /// + /// ex) 1,234,567 > 1.2M + /// {@endtemplate} + bool get enableCompactCount; + + /// {@template pluto_row_group_delegate_showFirstExpandableIon} + /// Decide whether to force the expand button to be displayed in the first cell. + /// {@endtemplate} + bool get showFirstExpandableIcon; + + /// {@template pluto_row_group_delegate_isEditableCell} + /// Determines whether the cell is editable. + /// {@endtemplate} + bool isEditableCell(PlutoCell cell); + + /// {@template pluto_row_group_delegate_isExpandableCell} + /// Decide whether to show the extended button. + /// {@endtemplate} + bool isExpandableCell(PlutoCell cell); + + /// {@template pluto_row_group_delegate_toGroup} + /// Handling for grouping rows. + /// {@endtemplate} + List toGroup({required Iterable rows}); + + /// {@template pluto_row_group_delegate_sort} + /// Handle sorting of grouped rows. + /// {@endtemplate} + void sort({ + required PlutoColumn column, + required FilteredList rows, + required int Function(PlutoRow, PlutoRow) compare, + }); + + /// {@template pluto_row_group_delegate_filter} + /// Handle filtering of grouped rows. + /// {@endtemplate} + void filter({ + required FilteredList rows, + required FilteredListFilter? filter, + }); + + /// {@template pluto_row_group_delegate_compactNumber} + /// Brief summary of numbers. + /// {@endtemplate} + String compactNumber(num count) { + return countFormat.format(count); + } +} + +class PlutoRowGroupTreeDelegate extends PlutoRowGroupDelegate { + /// Determine the depth based on the cell column. + /// + /// ```dart + /// // Determine the depth according to the column order. + /// resolveColumnDepth: (column) => stateManager.columnIndex(column), + /// ``` + final int? Function(PlutoColumn column) resolveColumnDepth; + + /// Decide whether to display the text in the cell. + /// + /// ```dart + /// // Display the text in all cells. + /// showText: (cell) => true, + /// ``` + final bool Function(PlutoCell cell) showText; + + /// {@macro pluto_row_group_delegate_showFirstExpandableIon} + @override + final bool showFirstExpandableIcon; + + /// {@macro pluto_row_group_delegate_showCount} + @override + final bool showCount; + + /// {@macro pluto_row_group_delegate_enableCompactCount} + @override + final bool enableCompactCount; + + PlutoRowGroupTreeDelegate({ + required this.resolveColumnDepth, + required this.showText, + this.showFirstExpandableIcon = false, + this.showCount = true, + this.enableCompactCount = true, + }); + + /// {@macro pluto_row_group_delegate_type} + @override + PlutoRowGroupDelegateType get type => PlutoRowGroupDelegateType.tree; + + /// {@macro pluto_row_group_delegate_enabled} + @override + bool get enabled => true; + + /// {@macro pluto_row_group_delegate_isEditableCell} + @override + bool isEditableCell(PlutoCell cell) => showText(cell); + + /// {@macro pluto_row_group_delegate_isExpandableCell} + @override + bool isExpandableCell(PlutoCell cell) { + if (!cell.row.type.isGroup) return false; + final int checkDepth = showFirstExpandableIcon ? 0 : cell.row.depth; + return cell.row.type.isGroup && + resolveColumnDepth(cell.column) == checkDepth; + } + + /// {@macro pluto_row_group_delegate_toGroup} + @override + List toGroup({ + required Iterable rows, + }) { + if (rows.isEmpty) return rows.toList(); + + final children = PlutoRowGroupHelper.iterateWithFilter( + rows, + filter: (r) => r.type.isGroup, + ); + + for (final child in children) { + setParent(PlutoRow r) => r.setParent(child); + child.type.group.children.originalList.forEach(setParent); + } + + return rows.toList(); + } + + /// {@macro pluto_row_group_delegate_sort} + @override + void sort({ + required PlutoColumn column, + required FilteredList rows, + required int Function(PlutoRow, PlutoRow) compare, + }) { + if (rows.originalList.isEmpty) return; + + rows.sort(compare); + + final children = PlutoRowGroupHelper.iterateWithFilter( + rows.originalList, + filter: (r) => r.type.isGroup, + ); + + for (final child in children) { + child.type.group.children.sort(compare); + } + } + + /// {@macro pluto_row_group_delegate_filter} + @override + void filter({ + required FilteredList rows, + required FilteredListFilter? filter, + }) { + if (rows.originalList.isEmpty) return; + + PlutoRowGroupHelper.applyFilter(rows: rows, filter: filter); + } +} + +class PlutoRowGroupByColumnDelegate extends PlutoRowGroupDelegate { + /// Column to group by. + final List columns; + + /// {@macro pluto_row_group_delegate_showFirstExpandableIon} + @override + final bool showFirstExpandableIcon; + + /// {@macro pluto_row_group_delegate_showCount} + @override + final bool showCount; + + /// {@macro pluto_row_group_delegate_enableCompactCount} + @override + final bool enableCompactCount; + + PlutoRowGroupByColumnDelegate({ + required this.columns, + this.showFirstExpandableIcon = false, + this.showCount = true, + this.enableCompactCount = true, + }); + + /// {@macro pluto_row_group_delegate_type} + @override + PlutoRowGroupDelegateType get type => PlutoRowGroupDelegateType.byColumn; + + /// {@macro pluto_row_group_delegate_enabled} + @override + bool get enabled => visibleColumns.isNotEmpty; + + /// Returns a non-hidden column from the column to be grouped. + List get visibleColumns => + columns.where((e) => !e.hide).toList(); + + /// {@macro pluto_row_group_delegate_isEditableCell} + @override + bool isEditableCell(PlutoCell cell) => + cell.row.type.isNormal && !isRowGroupColumn(cell.column); + + /// {@macro pluto_row_group_delegate_isExpandableCell} + @override + bool isExpandableCell(PlutoCell cell) { + if (cell.row.type.isNormal) return false; + final int checkDepth = showFirstExpandableIcon ? 0 : cell.row.depth; + return _columnDepth(cell.column) == checkDepth; + } + + /// Returns whether the column is a grouping column. + bool isRowGroupColumn(PlutoColumn column) { + return visibleColumns.firstWhereOrNull((e) => e.field == column.field) != + null; + } + + /// {@macro pluto_row_group_delegate_toGroup} + @override + List toGroup({ + required Iterable rows, + }) { + if (rows.isEmpty) return rows.toList(); + assert(visibleColumns.isNotEmpty); + + final List groups = []; + final List> groupStack = []; + final List parentStack = []; + final List groupFields = + visibleColumns.map((e) => e.field).toList(); + final List groupKeyStack = []; + final maxDepth = groupFields.length; + + List? currentGroups = groups; + PlutoRow? currentParent; + int depth = 0; + int sortIdx = 0; + List>>> stack = []; + Iterator>>? currentIter; + currentIter = groupBy( + rows, + (r) => r.cells[groupFields[depth]]!.value.toString(), + ).entries.iterator; + + while (currentIter != null || stack.isNotEmpty) { + if (currentIter != null && depth < maxDepth && currentIter.moveNext()) { + groupKeyStack.add(currentIter.current.key); + final groupKeys = [ + visibleColumns[depth].field, + groupKeyStack.join('_'), + 'rowGroup', + ]; + + final row = _createRowGroup( + groupKeys: groupKeys, + sortIdx: ++sortIdx, + sampleRow: currentIter.current.value.first, + ); + + currentParent = parentStack.lastOrNull; + if (currentParent != null) row.setParent(currentParent); + + parentStack.add(row); + currentGroups!.add(row); + stack.add(currentIter); + groupStack.add(currentGroups); + currentGroups = row.type.group.children; + + if (depth + 1 < maxDepth) { + currentIter = groupBy( + currentIter.current.value, + (r) => r.cells[groupFields[depth + 1]]!.value.toString(), + ).entries.iterator; + } + + ++depth; + } else { + --depth; + if (depth < 0) break; + + groupKeyStack.removeLast(); + currentParent = parentStack.lastOrNull; + if (currentParent != null) parentStack.removeLast(); + currentIter = stack.lastOrNull; + if (currentIter != null) stack.removeLast(); + + if (depth + 1 == maxDepth) { + int sortIdx = 0; + for (final child in currentIter!.current.value) { + currentGroups!.add(child); + child.setParent(currentParent); + child.sortIdx = ++sortIdx; + } + } + + currentGroups = groupStack.lastOrNull; + if (currentGroups != null) groupStack.removeLast(); + } + + if (depth == 0) groupKeyStack.clear(); + } + + return groups; + } + + /// {@macro pluto_row_group_delegate_sort} + @override + void sort({ + required PlutoColumn column, + required FilteredList rows, + required int Function(PlutoRow, PlutoRow) compare, + }) { + if (rows.originalList.isEmpty) return; + + final depth = _columnDepth(column); + + if (depth == 0) { + rows.sort(compare); + return; + } + + final children = PlutoRowGroupHelper.iterateWithFilter( + rows.originalList, + filter: (r) => r.type.isGroup, + childrenFilter: (r) => _isFirstChildGroup(r) + ? r.type.group.children.originalList.iterator + : null, + ); + + for (final child in children) { + if (_firstChildDepth(child) == depth) { + child.type.group.children.sort(compare); + } + } + } + + /// {@macro pluto_row_group_delegate_filter} + @override + void filter({ + required FilteredList rows, + required FilteredListFilter? filter, + }) { + if (rows.originalList.isEmpty) return; + + PlutoRowGroupHelper.applyFilter(rows: rows, filter: filter); + } + + int _columnDepth(PlutoColumn column) => visibleColumns.indexOf(column); + + int _firstChildDepth(PlutoRow row) { + if (!row.type.group.children.originalList.first.type.isGroup) { + return -1; + } + + return row.type.group.children.originalList.first.depth; + } + + bool _isFirstChildGroup(PlutoRow row) { + return row.type.group.children.originalList.first.type.isGroup; + } + + PlutoRow _createRowGroup({ + required List groupKeys, + required int sortIdx, + required PlutoRow sampleRow, + }) { + final cells = {}; + + final groupKey = groupKeys.join('_'); + + final row = PlutoRow( + key: ValueKey(groupKey), + cells: cells, + sortIdx: sortIdx, + type: PlutoRowType.group( + children: FilteredList(initialList: []), + ), + ); + + for (var e in sampleRow.cells.entries) { + cells[e.key] = PlutoCell( + value: visibleColumns.firstWhereOrNull((c) => c.field == e.key) != null + ? e.value.value + : null, + key: ValueKey('${groupKey}_${e.key}_cell'), + ) + ..setColumn(e.value.column) + ..setRow(row); + } + + return row; + } +} diff --git a/lib/src/helper/pluto_row_group_helper.dart b/lib/src/helper/pluto_row_group_helper.dart new file mode 100644 index 000000000..fb70069b8 --- /dev/null +++ b/lib/src/helper/pluto_row_group_helper.dart @@ -0,0 +1,103 @@ +import 'package:collection/collection.dart'; +import 'package:pluto_grid/pluto_grid.dart'; + +/// Helper class for grouping rows. +class PlutoRowGroupHelper { + /// Traversing the group rows of [rows] according to the [filter] condition. + /// + /// If [childrenFilter] is passed, the traversal condition of child rows is applied. + /// + /// If [iterateAll] is true, + /// the filtering condition applied to the child row of each group is ignored and + /// Iterate through the entire row. + static Iterable iterateWithFilter( + Iterable rows, { + bool Function(PlutoRow)? filter, + Iterator? Function(PlutoRow)? childrenFilter, + bool iterateAll = true, + }) sync* { + if (rows.isEmpty) return; + + final List> stack = []; + + Iterator? currentIter = rows.iterator; + + Iterator? defaultChildrenFilter(PlutoRow row) { + return row.type.isGroup + ? iterateAll + ? row.type.group.children.originalList.iterator + : row.type.group.children.iterator + : null; + } + + final filterChildren = childrenFilter ?? defaultChildrenFilter; + + while (currentIter != null || stack.isNotEmpty) { + bool hasChildren = false; + + if (currentIter != null) { + while (currentIter!.moveNext()) { + if (filter == null || filter(currentIter.current)) { + yield currentIter.current; + } + + final Iterator? children = filterChildren( + currentIter.current, + ); + + if (children != null) { + stack.add(currentIter); + currentIter = children; + hasChildren = true; + break; + } + } + } + + if (!hasChildren) { + currentIter = stack.lastOrNull; + if (currentIter != null) stack.removeLast(); + } + } + } + + /// Apply [filter] condition to all groups in [rows]. + static void applyFilter({ + required FilteredList rows, + required FilteredListFilter? filter, + }) { + if (rows.originalList.isEmpty) return; + + isGroup(PlutoRow row) => row.type.isGroup; + + if (filter == null) { + rows.setFilter(null); + + final children = PlutoRowGroupHelper.iterateWithFilter( + rows.originalList, + filter: isGroup, + ); + + for (final child in children) { + child.type.group.children.setFilter(null); + } + } else { + isNotEmptyGroup(PlutoRow row) => + row.type.isGroup && + row.type.group.children.filterOrOriginalList.isNotEmpty; + + filterOrHasChildren(PlutoRow row) => filter(row) || isNotEmptyGroup(row); + + final children = PlutoRowGroupHelper.iterateWithFilter( + rows.originalList, + filter: isGroup, + ); + + for (final child in children.toList().reversed) { + child.type.group.children.setFilter(filterOrHasChildren); + } + + rows.setFilter(filterOrHasChildren); + } + } +} diff --git a/lib/src/helper/show_column_menu.dart b/lib/src/helper/show_column_menu.dart index 91ab1f262..9f1e745b7 100644 --- a/lib/src/helper/show_column_menu.dart +++ b/lib/src/helper/show_column_menu.dart @@ -16,9 +16,9 @@ abstract class PlutoColumnMenuDelegate { }); } -class PlutoDefaultColumnMenuDelegate +class PlutoColumnMenuDelegateDefault implements PlutoColumnMenuDelegate { - const PlutoDefaultColumnMenuDelegate(); + const PlutoColumnMenuDelegateDefault(); @override List> buildMenuItems({ diff --git a/lib/src/manager/event/pluto_grid_callback_event.dart b/lib/src/manager/event/pluto_grid_callback_event.dart deleted file mode 100644 index 2f4d8b39f..000000000 --- a/lib/src/manager/event/pluto_grid_callback_event.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:pluto_grid/pluto_grid.dart'; - -/// [callback] This is an event that calls the function. -/// Usually used to debounce and throttle a specific function. -class PlutoGridCallbackEvent extends PlutoGridEvent { - PlutoGridCallbackEvent({ - required this.callback, - super.type, - super.duration, - }); - - final void Function() callback; - - @override - void handler(PlutoGridStateManager stateManager) { - callback(); - } -} diff --git a/lib/src/manager/event/pluto_grid_scroll_update_event.dart b/lib/src/manager/event/pluto_grid_scroll_update_event.dart index 1bd010392..142a547cb 100644 --- a/lib/src/manager/event/pluto_grid_scroll_update_event.dart +++ b/lib/src/manager/event/pluto_grid_scroll_update_event.dart @@ -66,13 +66,13 @@ class PlutoGridScrollUpdateEvent extends PlutoGridEvent { PlutoGridScrollUpdateDirection scrollDirection, ) { if (scrollDirection.isHorizontal) { - final ScrollController scroll = stateManager.scroll!.bodyRowsHorizontal!; + final ScrollController scroll = stateManager.scroll.bodyRowsHorizontal!; scroll.jumpTo(scroll.offset); } if (scrollDirection.isVertical) { - final ScrollController scroll = stateManager.scroll!.bodyRowsVertical!; + final ScrollController scroll = stateManager.scroll.bodyRowsVertical!; scroll.jumpTo(scroll.offset); } @@ -125,8 +125,8 @@ class PlutoGridScrollUpdateEvent extends PlutoGridEvent { void _scroll(PlutoGridStateManager? stateManager, PlutoMoveDirection move) { final ScrollController scroll = move.horizontal - ? stateManager!.scroll!.bodyRowsHorizontal! - : stateManager!.scroll!.bodyRowsVertical!; + ? stateManager!.scroll.bodyRowsHorizontal! + : stateManager!.scroll.bodyRowsVertical!; // If scrolling is in progress, the previous scroll animation continues. if (scroll.position.isScrollingNotifier.value) { diff --git a/lib/src/manager/pluto_change_notifier.dart b/lib/src/manager/pluto_change_notifier.dart index 57050d7f0..5167dee18 100644 --- a/lib/src/manager/pluto_change_notifier.dart +++ b/lib/src/manager/pluto_change_notifier.dart @@ -5,12 +5,14 @@ class PlutoChangeNotifier extends ChangeNotifier { final PublishSubject _streamNotifier = PublishSubject(); + final Set _notifier = {}; + PublishSubject get streamNotifier => _streamNotifier; bool _disposed = false; @override - dispose() { + void dispose() { _disposed = true; _streamNotifier.close(); @@ -19,23 +21,60 @@ class PlutoChangeNotifier extends ChangeNotifier { } @override - notifyListeners() { + void notifyListeners([bool notify = true, int? notifier]) { + if (notifier != null) { + addNotifier(notifier); + } + + if (!notify) { + return; + } + if (!_disposed) { super.notifyListeners(); - _streamNotifier.add(PlutoNotifierEvent.instance); + _streamNotifier.add(PlutoNotifierEvent(_drainNotifier())); } } - void notifyListenersOnPostFrame() { + void notifyListenersOnPostFrame([bool notify = true, int? notifier]) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - notifyListeners(); + notifyListeners(notify, notifier); }); } + + @protected + void addNotifier(int hash) { + _notifier.add(hash); + } + + Set _drainNotifier() { + final drain = {..._notifier}; + _notifier.clear(); + return drain; + } } class PlutoNotifierEvent { - const PlutoNotifierEvent(); + PlutoNotifierEvent(this._notifier); - static PlutoNotifierEvent instance = const PlutoNotifierEvent(); + final Set _notifier; + + Set get notifier => {..._notifier}; + + bool any(Set hashes) { + return _notifier.isEmpty ? true : _notifier.any((e) => hashes.contains(e)); + } +} + +class PlutoNotifierEventForceUpdate extends PlutoNotifierEvent { + PlutoNotifierEventForceUpdate._() : super({}); + + static PlutoNotifierEventForceUpdate instance = + PlutoNotifierEventForceUpdate._(); + + @override + bool any(Set hashes) { + return true; + } } diff --git a/lib/src/manager/pluto_change_notifier_filter.dart b/lib/src/manager/pluto_change_notifier_filter.dart new file mode 100644 index 000000000..6c3081b0c --- /dev/null +++ b/lib/src/manager/pluto_change_notifier_filter.dart @@ -0,0 +1,296 @@ +import 'package:flutter/cupertino.dart'; +import 'package:pluto_grid/pluto_grid.dart'; + +import '../ui/ui.dart'; + +class PlutoChangeNotifierFilter { + PlutoChangeNotifierFilter(this._filter, [this._debugNotifierNames]) + : _type = T; + + static bool enabled = true; + + static bool debug = false; + + static bool get printDebug => enabled && debug; + + static List debugWidgets = []; + + final Set _filter; + + final Map? _debugNotifierNames; + + final Type _type; + + bool any(PlutoNotifierEvent event) { + printNotifierOnFilter(event); + return _filter.isEmpty ? true : event.any(_filter); + } + + void printNotifierOnFilter(PlutoNotifierEvent event) { + if (_ignoreDebugPrint()) return; + + final length = event.notifier.length; + + debugPrint('[$_type] called on $length notifier.'); + for (int i = 0; i < length; i += 1) { + final bool isLast = length - 1 == i; + final prefix = isLast ? '\u2514' : '\u251c'; + final notifier = event.notifier.elementAt(i); + debugPrint(' $prefix ${_debugNotifierNames?[notifier]}'); + } + } + + void printNotifierOnChange(PlutoNotifierEvent event, bool rebuild) { + if (_ignoreDebugPrint()) return; + + debugPrint(' ON_CHANGE - REBUILD : ${rebuild.toString().toUpperCase()}'); + } + + bool _ignoreDebugPrint() { + return !enabled || + !debug || + (debugWidgets.isNotEmpty && !debugWidgets.contains(_type.toString())); + } +} + +abstract class PlutoChangeNotifierFilterResolver { + const PlutoChangeNotifierFilterResolver(); + + Set resolve(PlutoGridStateManager stateManager, Type type); + + static Map notifierNames(PlutoGridStateManager stateManager) { + return { + /// pluto_change_notifier + stateManager.notifyListeners.hashCode: 'notifyListeners', + stateManager.notifyListenersOnPostFrame.hashCode: + 'notifyListenersOnPostFrame', + + /// cell_state + stateManager.setCurrentCellPosition.hashCode: 'setCurrentCellPosition', + stateManager.updateCurrentCellPosition.hashCode: + 'updateCurrentCellPosition', + stateManager.clearCurrentCell.hashCode: 'clearCurrentCell', + stateManager.setCurrentCell.hashCode: 'setCurrentCell', + + /// column_group_state + stateManager.setShowColumnGroups.hashCode: 'setShowColumnGroups', + stateManager.removeColumnsInColumnGroup.hashCode: + 'removeColumnsInColumnGroup', + + /// column_state + stateManager.toggleFrozenColumn.hashCode: 'toggleFrozenColumn', + stateManager.toggleSortColumn.hashCode: 'toggleSortColumn', + stateManager.insertColumns.hashCode: 'insertColumns', + stateManager.removeColumns.hashCode: 'removeColumns', + stateManager.moveColumn.hashCode: 'moveColumn', + stateManager.sortAscending.hashCode: 'sortAscending', + stateManager.sortDescending.hashCode: 'sortDescending', + stateManager.sortBySortIdx.hashCode: 'sortBySortIdx', + stateManager.hideColumn.hashCode: 'hideColumn', + + /// dragging_row_state + stateManager.setIsDraggingRow.hashCode: 'setIsDraggingRow', + stateManager.setDragRows.hashCode: 'setDragRows', + stateManager.setDragTargetRowIdx.hashCode: 'setDragTargetRowIdx', + + /// editing_state + stateManager.setEditing.hashCode: 'setEditing', + stateManager.setAutoEditing.hashCode: 'setAutoEditing', + stateManager.pasteCellValue.hashCode: 'pasteCellValue', + stateManager.changeCellValue.hashCode: 'changeCellValue', + + /// filtering_row_state + stateManager.setFilter.hashCode: 'setFilter', + + /// focus_state + stateManager.setKeepFocus.hashCode: 'setKeepFocus', + + /// grid_state + stateManager.resetCurrentState.hashCode: 'resetCurrentState', + + /// layout_state + stateManager.setShowColumnTitle.hashCode: 'setShowColumnTitle', + stateManager.setShowColumnFooter.hashCode: 'setShowColumnFooter', + stateManager.setShowColumnFilter.hashCode: 'setShowColumnFilter', + stateManager.setShowLoading.hashCode: 'setShowLoading', + stateManager.performLayoutOnPostFrame.hashCode: + 'performLayoutOnPostFrame', + + /// pagination_state + stateManager.setPageSize.hashCode: 'setPageSize', + stateManager.setPage.hashCode: 'setPage', + + /// row_group_state + stateManager.setRowGroup.hashCode: 'setRowGroup', + stateManager.toggleExpandedRowGroup.hashCode: 'toggleExpandedRowGroup', + + /// row_state + stateManager.setRowChecked.hashCode: 'setRowChecked', + stateManager.insertRows.hashCode: 'insertRows', + stateManager.prependRows.hashCode: 'prependRows', + stateManager.appendRows.hashCode: 'appendRows', + stateManager.removeCurrentRow.hashCode: 'removeCurrentRow', + stateManager.removeRows.hashCode: 'removeRows', + stateManager.removeAllRows.hashCode: 'removeAllRows', + stateManager.moveRowsByIndex.hashCode: 'moveRowsByIndex', + stateManager.toggleAllRowChecked.hashCode: 'toggleAllRowChecked', + + /// selecting_state + stateManager.setSelecting.hashCode: 'setSelecting', + stateManager.setSelectingMode.hashCode: 'setSelectingMode', + stateManager.setCurrentSelectingPosition.hashCode: + 'setCurrentSelectingPosition', + stateManager.setCurrentSelectingRowsByRange.hashCode: + 'setCurrentSelectingRowsByRange', + stateManager.clearCurrentSelecting.hashCode: 'clearCurrentSelecting', + stateManager.toggleSelectingRow.hashCode: 'toggleSelectingRow', + stateManager.handleAfterSelectingRow.hashCode: 'handleAfterSelectingRow', + }; + } +} + +class PlutoNotifierFilterResolverDefault + implements PlutoChangeNotifierFilterResolver { + const PlutoNotifierFilterResolverDefault(); + + @override + Set resolve(PlutoGridStateManager stateManager, Type type) { + switch (type) { + case PlutoGrid: + return defaultGridFilter(stateManager); + case PlutoBodyColumns: + case PlutoBodyColumnsFooter: + case PlutoLeftFrozenColumns: + case PlutoLeftFrozenColumnsFooter: + case PlutoRightFrozenColumns: + case PlutoRightFrozenColumnsFooter: + return defaultColumnsFilter(stateManager); + case PlutoBodyRows: + case PlutoLeftFrozenRows: + case PlutoRightFrozenRows: + return defaultRowsFilter(stateManager); + case PlutoAggregateColumnFooter: + return defaultAggregateColumnFooterFilter(stateManager); + case CheckboxSelectionWidget: + return defaultCheckboxFilter(stateManager); + case CheckboxAllSelectionWidget: + return defaultCheckboxAllFilter(stateManager); + } + + return {}; + } + + static Set defaultGridFilter(PlutoGridStateManager stateManager) { + return { + stateManager.setShowColumnTitle.hashCode, + stateManager.setShowColumnFilter.hashCode, + stateManager.setShowColumnFooter.hashCode, + stateManager.setShowColumnGroups.hashCode, + stateManager.setShowLoading.hashCode, + stateManager.toggleFrozenColumn.hashCode, + stateManager.performLayoutOnPostFrame.hashCode, + }; + } + + static Set defaultColumnsFilter(PlutoGridStateManager stateManager) { + return { + stateManager.toggleFrozenColumn.hashCode, + stateManager.insertColumns.hashCode, + stateManager.removeColumns.hashCode, + stateManager.moveColumn.hashCode, + stateManager.hideColumn.hashCode, + stateManager.setShowColumnGroups.hashCode, + stateManager.removeColumnsInColumnGroup.hashCode, + stateManager.performLayoutOnPostFrame.hashCode, + }; + } + + static Set defaultRowsFilter(PlutoGridStateManager stateManager) { + return { + stateManager.toggleFrozenColumn.hashCode, + stateManager.insertColumns.hashCode, + stateManager.removeColumns.hashCode, + stateManager.moveColumn.hashCode, + stateManager.hideColumn.hashCode, + stateManager.toggleSortColumn.hashCode, + stateManager.sortAscending.hashCode, + stateManager.sortDescending.hashCode, + stateManager.sortBySortIdx.hashCode, + stateManager.setShowColumnGroups.hashCode, + stateManager.setFilter.hashCode, + stateManager.removeColumnsInColumnGroup.hashCode, + stateManager.insertRows.hashCode, + stateManager.prependRows.hashCode, + stateManager.appendRows.hashCode, + stateManager.removeCurrentRow.hashCode, + stateManager.removeRows.hashCode, + stateManager.removeAllRows.hashCode, + stateManager.moveRowsByIndex.hashCode, + stateManager.setRowGroup.hashCode, + stateManager.toggleExpandedRowGroup.hashCode, + stateManager.performLayoutOnPostFrame.hashCode, + stateManager.setPage.hashCode, + stateManager.setPageSize.hashCode, + }; + } + + static Set defaultAggregateColumnFooterFilter( + PlutoGridStateManager stateManager) { + return { + stateManager.toggleAllRowChecked.hashCode, + stateManager.setRowChecked.hashCode, + stateManager.setPage.hashCode, + stateManager.setPageSize.hashCode, + stateManager.setFilter.hashCode, + stateManager.toggleSortColumn.hashCode, + stateManager.sortAscending.hashCode, + stateManager.sortDescending.hashCode, + stateManager.sortBySortIdx.hashCode, + stateManager.insertRows.hashCode, + stateManager.prependRows.hashCode, + stateManager.appendRows.hashCode, + stateManager.removeCurrentRow.hashCode, + stateManager.removeRows.hashCode, + stateManager.removeAllRows.hashCode, + stateManager.setRowGroup.hashCode, + stateManager.toggleExpandedRowGroup.hashCode, + stateManager.changeCellValue.hashCode, + stateManager.pasteCellValue.hashCode, + }; + } + + static Set defaultCheckboxFilter(PlutoGridStateManager stateManager) { + if (stateManager.enabledRowGroups) { + return PlutoNotifierFilterResolverDefault.defaultCheckboxAllFilter( + stateManager, + ); + } + + return { + stateManager.toggleAllRowChecked.hashCode, + stateManager.setRowChecked.hashCode, + }; + } + + static Set defaultCheckboxAllFilter(PlutoGridStateManager stateManager) { + return { + stateManager.toggleAllRowChecked.hashCode, + stateManager.setRowChecked.hashCode, + stateManager.setPage.hashCode, + stateManager.setPageSize.hashCode, + stateManager.setFilter.hashCode, + stateManager.toggleSortColumn.hashCode, + stateManager.sortAscending.hashCode, + stateManager.sortDescending.hashCode, + stateManager.sortBySortIdx.hashCode, + stateManager.insertRows.hashCode, + stateManager.prependRows.hashCode, + stateManager.appendRows.hashCode, + stateManager.removeCurrentRow.hashCode, + stateManager.removeRows.hashCode, + stateManager.removeAllRows.hashCode, + stateManager.setRowGroup.hashCode, + stateManager.toggleExpandedRowGroup.hashCode, + }; + } +} diff --git a/lib/src/manager/pluto_grid_key_manager.dart b/lib/src/manager/pluto_grid_key_manager.dart index 0ed9ce454..b0112b198 100644 --- a/lib/src/manager/pluto_grid_key_manager.dart +++ b/lib/src/manager/pluto_grid_key_manager.dart @@ -121,6 +121,11 @@ class PlutoGridKeyManager { return; } + if (keyEvent.isF4) { + _handleF4(keyEvent); + return; + } + if (keyEvent.isCharacter) { if (keyEvent.isCtrlC) { _handleCtrlC(keyEvent); @@ -230,6 +235,10 @@ class PlutoGridKeyManager { } if (keyEvent.isAltPressed && stateManager.isPaginated) { + final currentColumn = stateManager.currentColumn; + + final previousPosition = stateManager.currentCellPosition; + int toPage = keyEvent.isPageUp ? stateManager.page - 1 : stateManager.page + 1; @@ -241,6 +250,11 @@ class PlutoGridKeyManager { stateManager.setPage(toPage); + _restoreCurrentCellPosition( + currentColumn: currentColumn, + previousPosition: previousPosition, + ); + return; } @@ -266,6 +280,11 @@ class PlutoGridKeyManager { return; } + if (!stateManager.isEditing && _isExpandableCell()) { + stateManager.toggleExpandedRowGroup(rowGroup: stateManager.currentRow!); + return; + } + if (stateManager.configuration.enterKeyAction.isToggleEditing) { stateManager.toggleEditing(notify: false); } else { @@ -351,6 +370,23 @@ class PlutoGridKeyManager { ); } + void _handleF4(PlutoKeyManagerEvent keyEvent) { + final currentColumn = stateManager.currentColumn; + + if (currentColumn == null) { + return; + } + + final previousPosition = stateManager.currentCellPosition; + + stateManager.toggleSortColumn(currentColumn); + + _restoreCurrentCellPosition( + currentColumn: currentColumn, + previousPosition: previousPosition, + ); + } + void _handleCtrlC(PlutoKeyManagerEvent keyEvent) { if (stateManager.isEditing == true) { return; @@ -435,4 +471,32 @@ class PlutoGridKeyManager { } } } + + void _restoreCurrentCellPosition({ + PlutoColumn? currentColumn, + PlutoGridCellPosition? previousPosition, + }) { + if (currentColumn == null || previousPosition?.hasPosition != true) { + return; + } + + int rowIdx = previousPosition!.rowIdx!; + + if (rowIdx > stateManager.refRows.length - 1) { + rowIdx = stateManager.refRows.length - 1; + } + + stateManager.setCurrentCell( + stateManager.refRows.elementAt(rowIdx).cells[currentColumn.field], + rowIdx, + ); + } + + bool _isExpandableCell() { + return stateManager.currentCell != null && + stateManager.enabledRowGroups && + stateManager.rowGroupDelegate + ?.isExpandableCell(stateManager.currentCell!) == + true; + } } diff --git a/lib/src/manager/pluto_grid_state_manager.dart b/lib/src/manager/pluto_grid_state_manager.dart index bc6cd3de9..a8c3ee505 100644 --- a/lib/src/manager/pluto_grid_state_manager.dart +++ b/lib/src/manager/pluto_grid_state_manager.dart @@ -17,6 +17,7 @@ import 'state/grid_state.dart'; import 'state/keyboard_state.dart'; import 'state/layout_state.dart'; import 'state/pagination_row_state.dart'; +import 'state/row_group_state.dart'; import 'state/row_state.dart'; import 'state/scroll_state.dart'; import 'state/selecting_state.dart'; @@ -37,6 +38,7 @@ abstract class IPlutoGridState IKeyboardState, ILayoutState, IPaginationRowState, + IRowGroupState, IRowState, IScrollState, ISelectingState, @@ -56,10 +58,120 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier KeyboardState, LayoutState, PaginationRowState, + RowGroupState, RowState, ScrollState, SelectingState, - VisibilityLayoutState {} + VisibilityLayoutState { + PlutoGridStateChangeNotifier({ + required List columns, + required List rows, + required this.gridFocusNode, + required this.scroll, + List? columnGroups, + this.onChanged, + this.onSelected, + this.onSorted, + this.onRowChecked, + this.onRowDoubleTap, + this.onRowSecondaryTap, + this.onRowsMoved, + this.rowColorCallback, + this.createHeader, + this.createFooter, + PlutoColumnMenuDelegate? columnMenuDelegate, + PlutoChangeNotifierFilterResolver? notifierFilterResolver, + PlutoGridConfiguration? configuration, + PlutoGridMode? mode, + }) : refColumns = FilteredList(initialList: columns), + refRows = FilteredList(initialList: rows), + refColumnGroups = FilteredList( + initialList: columnGroups, + ), + columnMenuDelegate = + columnMenuDelegate ?? const PlutoColumnMenuDelegateDefault(), + notifierFilterResolver = notifierFilterResolver ?? + const PlutoNotifierFilterResolverDefault(), + gridKey = GlobalKey(), + mode = mode ?? PlutoGridMode.normal { + setConfiguration(configuration); + _initialize(); + } + + @override + final FilteredList refColumns; + + @override + final FilteredList refColumnGroups; + + @override + final FilteredList refRows; + + @override + final FocusNode gridFocusNode; + + @override + final PlutoGridScrollController scroll; + + @override + final PlutoOnChangedEventCallback? onChanged; + + @override + final PlutoOnSelectedEventCallback? onSelected; + + @override + final PlutoOnSortedEventCallback? onSorted; + + @override + final PlutoOnRowCheckedEventCallback? onRowChecked; + + @override + final PlutoOnRowDoubleTapEventCallback? onRowDoubleTap; + + @override + final PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap; + + @override + final PlutoOnRowsMovedEventCallback? onRowsMoved; + + @override + final PlutoRowColorCallback? rowColorCallback; + + @override + final CreateHeaderCallBack? createHeader; + + @override + final CreateFooterCallBack? createFooter; + + @override + final PlutoColumnMenuDelegate columnMenuDelegate; + + final PlutoChangeNotifierFilterResolver notifierFilterResolver; + + @override + final GlobalKey gridKey; + + @override + final PlutoGridMode mode; + + void _initialize() { + PlutoGridStateManager.initializeRows( + refColumns.originalList, + refRows.originalList, + ); + + refColumns.setFilter((element) => element.hide == false); + + setShowColumnGroups(columnGroups.isNotEmpty, notify: false); + + setShowColumnFooter( + refColumns.originalList.any((e) => e.footerRenderer != null), + notify: false, + ); + + setGroupToColumn(); + } +} /// It manages the state of the [PlutoGrid] and contains methods used by the grid. /// @@ -95,58 +207,42 @@ class PlutoGridStateChangeNotifier extends PlutoChangeNotifier /// ``` class PlutoGridStateManager extends PlutoGridStateChangeNotifier { PlutoGridStateManager({ - required List columns, - required List rows, - required FocusNode? gridFocusNode, - required PlutoGridScrollController? scroll, - List? columnGroups, - PlutoGridMode? mode, - PlutoOnChangedEventCallback? onChangedEventCallback, - PlutoOnSelectedEventCallback? onSelectedEventCallback, - PlutoOnSortedEventCallback? onSortedEventCallback, - PlutoOnRowCheckedEventCallback? onRowCheckedEventCallback, - PlutoOnRowDoubleTapEventCallback? onRowDoubleTapEventCallback, - PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTapEventCallback, - PlutoOnRowsMovedEventCallback? onRowsMovedEventCallback, - PlutoRowColorCallback? onRowColorCallback, - PlutoColumnMenuDelegate? columnMenuDelegate, - CreateHeaderCallBack? createHeader, - CreateFooterCallBack? createFooter, - PlutoGridConfiguration? configuration, - }) { - refColumns = FilteredList(initialList: columns); - refColumnGroups = FilteredList(initialList: columnGroups); - refRows = FilteredList(initialList: rows); - setGridFocusNode(gridFocusNode); - setScroll(scroll); - setGridMode(mode); - setOnChanged(onChangedEventCallback); - setOnSelected(onSelectedEventCallback); - setOnSorted(onSortedEventCallback); - setOnRowChecked(onRowCheckedEventCallback); - setOnRowDoubleTap(onRowDoubleTapEventCallback); - setOnRowSecondaryTap(onRowSecondaryTapEventCallback); - setOnRowsMoved(onRowsMovedEventCallback); - setRowColorCallback(onRowColorCallback); - setColumnMenuDelegate(columnMenuDelegate); - setCreateHeader(createHeader); - setCreateFooter(createFooter); - setConfiguration(configuration); - setShowColumnFooter( - columns.any((element) => element.footerRenderer != null), + required super.columns, + required super.rows, + required super.gridFocusNode, + required super.scroll, + super.columnGroups, + super.onChanged, + super.onSelected, + super.onSorted, + super.onRowChecked, + super.onRowDoubleTap, + super.onRowSecondaryTap, + super.onRowsMoved, + super.rowColorCallback, + super.createHeader, + super.createFooter, + super.columnMenuDelegate, + super.notifierFilterResolver, + super.configuration, + super.mode, + }); + + PlutoChangeNotifierFilter resolveNotifierFilter() { + return PlutoChangeNotifierFilter( + notifierFilterResolver.resolve(this, T), + PlutoChangeNotifierFilter.debug + ? PlutoChangeNotifierFilterResolver.notifierNames(this) + : null, ); - setGridKey(GlobalKey()); } - static List get selectingModes => - PlutoGridSelectingMode.values; - /// It handles the necessary settings when [rows] are first set or added to the [PlutoGrid]. /// /// {@template initialize_rows_params} /// [forceApplySortIdx] determines whether to force PlutoRow.sortIdx to be set. - /// [PlutoRow.sortIdx] does not reset if the value is already set. - /// Set [forceApplySortIdx] to true to reset this value. + /// + /// [increase] and [start] are valid only when [forceApplySortIdx] is true. /// /// [increase] determines whether to increment or decrement when initializing [sortIdx]. /// For example, if a row is added before an existing row, @@ -161,7 +257,7 @@ class PlutoGridStateManager extends PlutoGridStateChangeNotifier { static List initializeRows( List refColumns, List refRows, { - bool forceApplySortIdx = false, + bool forceApplySortIdx = true, bool increase = true, int start = 0, }) { @@ -171,13 +267,13 @@ class PlutoGridStateManager extends PlutoGridStateChangeNotifier { _ApplyList applyList = _ApplyList([ _ApplyCellForSetColumnRow(refColumns), - _ApplyCellForFormat(refColumns), _ApplyRowForSortIdx( forceApply: forceApplySortIdx, increase: increase, start: start, firstRow: refRows.first, ), + _ApplyRowGroup(refColumns), ]); if (!applyList.apply) { @@ -212,7 +308,7 @@ class PlutoGridStateManager extends PlutoGridStateChangeNotifier { /// /// ```dart /// PlutoGridStateManager.initializeRowsAsync(columns, fetchedRows).then((initializedRows) { - /// stateManager.refRows.addAll(FilteredList(initialList: initializedRows)); + /// stateManager.refRows.addAll(initializedRows); /// stateManager.setPage(1, notify: false); /// stateManager.notifyListeners(); /// }); @@ -222,7 +318,7 @@ class PlutoGridStateManager extends PlutoGridStateChangeNotifier { static Future> initializeRowsAsync( List refColumns, List refRows, { - bool forceApplySortIdx = false, + bool forceApplySortIdx = true, bool increase = true, int start = 0, int chunkSize = 100, @@ -334,6 +430,8 @@ class PlutoGridCellPosition { this.rowIdx, }); + bool get hasPosition => columnIdx != null && rowIdx != null; + @override bool operator ==(covariant PlutoGridCellPosition other) { return columnIdx == other.columnIdx && rowIdx == other.rowIdx; @@ -440,6 +538,10 @@ class _ApplyCellForSetColumnRow implements _Apply { @override void execute(PlutoRow row) { + if (row.initialized) { + return; + } + for (var element in refColumns) { row.cells[element.field]! ..setColumn(element) @@ -448,39 +550,6 @@ class _ApplyCellForSetColumnRow implements _Apply { } } -class _ApplyCellForFormat implements _Apply { - final List refColumns; - - _ApplyCellForFormat( - this.refColumns, - ) { - assert(refColumns.isNotEmpty); - - columnsToApply = refColumns.where( - (element) => element.type.applyFormatOnInit, - ); - } - - late Iterable columnsToApply; - - @override - bool get apply => columnsToApply.isNotEmpty; - - @override - void execute(PlutoRow row) { - for (var column in columnsToApply) { - var value = column.type.applyFormat(row.cells[column.field]!.value); - - if (column.type is PlutoColumnTypeWithNumberFormat) { - value = - (column.type as PlutoColumnTypeWithNumberFormat).toNumber(value); - } - - row.cells[column.field]!.value = value; - } - } -} - class _ApplyRowForSortIdx implements _Apply { final bool forceApply; @@ -504,12 +573,48 @@ class _ApplyRowForSortIdx implements _Apply { late int _sortIdx; @override - bool get apply => forceApply == true || firstRow!.sortIdx == null; + bool get apply => forceApply == true; @override - void execute(PlutoRow? row) { - row!.sortIdx = _sortIdx; + void execute(PlutoRow row) { + row.sortIdx = _sortIdx; _sortIdx = increase ? ++_sortIdx : --_sortIdx; } } + +class _ApplyRowGroup implements _Apply { + final List refColumns; + + _ApplyRowGroup(this.refColumns); + + @override + bool get apply => true; + + @override + void execute(PlutoRow row) { + if (_hasChildren(row)) { + _initializeChildren( + columns: refColumns, + rows: row.type.group.children.originalList, + parent: row, + ); + } + } + + void _initializeChildren({ + required List columns, + required List rows, + required PlutoRow parent, + }) { + for (final row in rows) { + row.setParent(parent); + } + + PlutoGridStateManager.initializeRows(columns, rows); + } + + bool _hasChildren(PlutoRow row) { + return row.type.isGroup && row.type.group.children.originalList.isNotEmpty; + } +} diff --git a/lib/src/manager/state/cell_state.dart b/lib/src/manager/state/cell_state.dart index 76aa0fa0d..fb71bd040 100644 --- a/lib/src/manager/state/cell_state.dart +++ b/lib/src/manager/state/cell_state.dart @@ -45,15 +45,13 @@ abstract class ICellState { /// Whether the cell is in a mutable state bool canChangeCellValue({ - required PlutoColumn column, - required PlutoRow row, + required PlutoCell cell, dynamic newValue, dynamic oldValue, }); bool canNotChangeCellValue({ - required PlutoColumn column, - required PlutoRow row, + required PlutoCell cell, dynamic newValue, dynamic oldValue, }); @@ -71,16 +69,20 @@ abstract class ICellState { bool isInvalidCellPosition(PlutoGridCellPosition? cellPosition); } -mixin CellState implements IPlutoGridState { - @override - PlutoCell? get currentCell => _currentCell; - +class _State { PlutoCell? _currentCell; + PlutoGridCellPosition? _currentCellPosition; +} + +mixin CellState implements IPlutoGridState { + final _State _state = _State(); + @override - PlutoGridCellPosition? get currentCellPosition => _currentCellPosition; + PlutoCell? get currentCell => _state._currentCell; - PlutoGridCellPosition? _currentCellPosition; + @override + PlutoGridCellPosition? get currentCellPosition => _state._currentCellPosition; @override PlutoCell? get firstCell { @@ -100,7 +102,7 @@ mixin CellState implements IPlutoGridState { PlutoGridCellPosition? cellPosition, { bool notify = true, }) { - if (_currentCellPosition == cellPosition) { + if (currentCellPosition == cellPosition) { return; } @@ -110,27 +112,23 @@ mixin CellState implements IPlutoGridState { return; } - _currentCellPosition = cellPosition; + _state._currentCellPosition = cellPosition; - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setCurrentCellPosition.hashCode); } @override void updateCurrentCellPosition({bool notify = true}) { - if (_currentCell == null) { + if (currentCell == null) { return; } setCurrentCellPosition( - cellPositionByCellKey(_currentCell!.key), + cellPositionByCellKey(currentCell!.key), notify: false, ); - if (notify) { - notifyListeners(); - } + notifyListeners(notify, updateCurrentCellPosition.hashCode); } @override @@ -174,17 +172,15 @@ mixin CellState implements IPlutoGridState { @override void clearCurrentCell({bool notify = true}) { - if (_currentCell == null) { + if (currentCell == null) { return; } - _currentCell = null; + _state._currentCell = null; - _currentCellPosition = null; + _state._currentCellPosition = null; - if (notify) { - notifyListeners(); - } + notifyListeners(notify, clearCurrentCell.hashCode); } @override @@ -201,13 +197,13 @@ mixin CellState implements IPlutoGridState { return; } - if (_currentCell != null && _currentCell!.key == cell.key) { + if (currentCell != null && currentCell!.key == cell.key) { return; } - _currentCell = cell; + _state._currentCell = cell; - _currentCellPosition = PlutoGridCellPosition( + _state._currentCellPosition = PlutoGridCellPosition( rowIdx: rowIdx, columnIdx: columnIdxByCellKeyAndRowIdx(cell.key, rowIdx), ); @@ -216,9 +212,7 @@ mixin CellState implements IPlutoGridState { setEditing(autoEditing, notify: false); - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setCurrentCell.hashCode); } @override @@ -244,17 +238,22 @@ mixin CellState implements IPlutoGridState { @override bool canChangeCellValue({ - required PlutoColumn column, - required PlutoRow row, + required PlutoCell cell, dynamic newValue, dynamic oldValue, }) { - if (column.checkReadOnly(row, row.cells[column.field]!) || - column.enableEditingMode != true) { + if (mode.isSelect) { return false; } - if (mode.isSelect) { + if (cell.column.checkReadOnly( + cell.row, + cell.row.cells[cell.column.field]!, + )) { + return false; + } + + if (!isEditableCell(cell)) { return false; } @@ -267,14 +266,12 @@ mixin CellState implements IPlutoGridState { @override bool canNotChangeCellValue({ - required PlutoColumn column, - required PlutoRow row, + required PlutoCell cell, dynamic newValue, dynamic oldValue, }) { return !canChangeCellValue( - column: column, - row: row, + cell: cell, newValue: newValue, oldValue: oldValue, ); @@ -320,7 +317,7 @@ mixin CellState implements IPlutoGridState { @override bool isCurrentCell(PlutoCell? cell) { - return _currentCell != null && _currentCell!.key == cell!.key; + return currentCell != null && currentCell!.key == cell!.key; } @override diff --git a/lib/src/manager/state/column_group_state.dart b/lib/src/manager/state/column_group_state.dart index 1aa7e994a..8fdeb1274 100644 --- a/lib/src/manager/state/column_group_state.dart +++ b/lib/src/manager/state/column_group_state.dart @@ -1,9 +1,10 @@ +import 'package:flutter/cupertino.dart'; import 'package:pluto_grid/pluto_grid.dart'; abstract class IColumnGroupState { List get columnGroups; - FilteredList? refColumnGroups; + FilteredList get refColumnGroups; bool get hasColumnGroups; @@ -22,48 +23,37 @@ abstract class IColumnGroupState { List columns, { bool notify = true, }); + + @protected + void setGroupToColumn(); +} + +class _State { + bool _showColumnGroups = false; } mixin ColumnGroupState implements IPlutoGridState { - @override - List get columnGroups => [...refColumnGroups!]; + final _State _state = _State(); @override - FilteredList? get refColumnGroups => _refColumnGroups; + List get columnGroups => [...refColumnGroups]; @override - set refColumnGroups(FilteredList? setColumnGroups) { - if (setColumnGroups != null && setColumnGroups.isNotEmpty) { - _showColumnGroups = true; - } - - _refColumnGroups = setColumnGroups; - - _setGroupToColumn(); - } - - FilteredList? _refColumnGroups; + bool get hasColumnGroups => refColumnGroups.isNotEmpty; @override - bool get hasColumnGroups => - refColumnGroups != null && refColumnGroups!.isNotEmpty; - - @override - bool get showColumnGroups => _showColumnGroups == true && hasColumnGroups; - - bool? _showColumnGroups; + bool get showColumnGroups => + _state._showColumnGroups == true && hasColumnGroups; @override void setShowColumnGroups(bool flag, {bool notify = true}) { - if (_showColumnGroups == flag) { + if (showColumnGroups == flag) { return; } - _showColumnGroups = flag; + _state._showColumnGroups = flag; - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setShowColumnGroups.hashCode); } @override @@ -89,21 +79,34 @@ mixin ColumnGroupState implements IPlutoGridState { List columns, { bool notify = true, }) { - if (refColumnGroups?.originalList.isEmpty == true) { + if (refColumnGroups.originalList.isEmpty == true) { return; } final Set columnFields = Set.from(columns.map((e) => e.field)); - refColumnGroups!.removeWhereFromOriginal((group) { + refColumnGroups.removeWhereFromOriginal((group) { return _emptyGroupAfterRemoveColumns( columnGroup: group, columnFields: columnFields, ); }); - if (notify) { - notifyListeners(); + notifyListeners(notify, removeColumnsInColumnGroup.hashCode); + } + + @override + @protected + void setGroupToColumn() { + if (hasColumnGroups == false) { + return; + } + + for (final column in refColumns.originalList) { + column.group = PlutoColumnGroupHelper.getParentGroupIfExistsFromList( + field: column.field, + columnGroupList: refColumnGroups, + ); } } @@ -125,17 +128,4 @@ mixin ColumnGroupState implements IPlutoGridState { return (columnGroup.hasFields && columnGroup.fields!.isEmpty) || (columnGroup.hasChildren && columnGroup.children!.isEmpty); } - - void _setGroupToColumn() { - if (hasColumnGroups == false) { - return; - } - - for (final column in refColumns) { - column.group = PlutoColumnGroupHelper.getParentGroupIfExistsFromList( - field: column.field, - columnGroupList: refColumnGroups!, - ); - } - } } diff --git a/lib/src/manager/state/column_sizing_state.dart b/lib/src/manager/state/column_sizing_state.dart index 85d78055b..f3bd366ed 100644 --- a/lib/src/manager/state/column_sizing_state.dart +++ b/lib/src/manager/state/column_sizing_state.dart @@ -50,7 +50,13 @@ abstract class IColumnSizingState { void setColumnSizeConfig(PlutoGridColumnSizeConfig config); } +class _State { + bool? _activatedColumnsAutoSize; +} + mixin ColumnSizingState implements IPlutoGridState { + final _State _state = _State(); + @override PlutoGridColumnSizeConfig get columnSizeConfig => configuration.columnSize; @@ -65,18 +71,16 @@ mixin ColumnSizingState implements IPlutoGridState { @override bool get activatedColumnsAutoSize => - enableColumnsAutoSize && _activatedColumnsAutoSize != false; - - bool? _activatedColumnsAutoSize; + enableColumnsAutoSize && _state._activatedColumnsAutoSize != false; @override void activateColumnsAutoSize() { - _activatedColumnsAutoSize = true; + _state._activatedColumnsAutoSize = true; } @override void deactivateColumnsAutoSize() { - _activatedColumnsAutoSize = false; + _state._activatedColumnsAutoSize = false; } @override diff --git a/lib/src/manager/state/column_state.dart b/lib/src/manager/state/column_state.dart index b99b2ef3a..fa5d89eff 100644 --- a/lib/src/manager/state/column_state.dart +++ b/lib/src/manager/state/column_state.dart @@ -7,7 +7,7 @@ abstract class IColumnState { /// Columns provided at grid start. List get columns; - FilteredList refColumns = FilteredList(); + FilteredList get refColumns; /// Column index list. List get columnIndexes; @@ -170,17 +170,6 @@ mixin ColumnState implements IPlutoGridState { @override List get columns => List.from(refColumns, growable: false); - @override - FilteredList get refColumns => _refColumns; - - @override - set refColumns(FilteredList setColumns) { - _refColumns = setColumns; - _refColumns.setFilter((element) => element.hide == false); - } - - FilteredList _refColumns = FilteredList(); - @override List get columnIndexes => List.generate( refColumns.length, @@ -368,7 +357,7 @@ mixin ColumnState implements IPlutoGridState { updateVisibilityLayout(); - notifyListeners(); + notifyListeners(true, toggleFrozenColumn.hashCode); } @override @@ -383,11 +372,9 @@ mixin ColumnState implements IPlutoGridState { sortBySortIdx(column, notify: false); } - updateCurrentCellPosition(notify: false); - - _fireOnSorted(column, oldSort); + _callOnSorted(column, oldSort); - notifyListeners(); + notifyListeners(true, toggleSortColumn.hashCode); } @override @@ -417,7 +404,7 @@ mixin ColumnState implements IPlutoGridState { _updateLimitedFrozenColumns(columns); if (columnIdx >= refColumns.originalLength) { - refColumns.addAll(columns.cast()); + refColumns.addAll(columns); } else { refColumns.insertAll(columnIdx, columns); } @@ -434,7 +421,7 @@ mixin ColumnState implements IPlutoGridState { updateVisibilityLayout(); - notifyListeners(); + notifyListeners(true, insertColumns.hashCode); } @override @@ -443,17 +430,19 @@ mixin ColumnState implements IPlutoGridState { return; } - final removeKeys = Set.from(columns.map((e) => e.key)); + removeColumnsInColumnGroup(columns, notify: false); - refColumns.removeWhereFromOriginal( - (column) => removeKeys.contains(column.key), - ); + removeColumnsInFilterRows(columns, notify: false); + + removeColumnsInRowGroupByColumn(columns, notify: false); _removeCellsInRows(columns); - removeColumnsInColumnGroup(columns, notify: false); + final removeKeys = Set.from(columns.map((e) => e.key)); - removeColumnsInFilterRows(columns, notify: false); + refColumns.removeWhereFromOriginal( + (column) => removeKeys.contains(column.key), + ); resetShowFrozenColumn(); @@ -465,7 +454,7 @@ mixin ColumnState implements IPlutoGridState { resetCurrentState(notify: false); - notifyListeners(); + notifyListeners(true, removeColumns.hashCode); } @override @@ -521,7 +510,7 @@ mixin ColumnState implements IPlutoGridState { updateVisibilityLayout(); - notifyListeners(); + notifyListeners(true, moveColumn.hashCode); } @override @@ -621,7 +610,7 @@ mixin ColumnState implements IPlutoGridState { column.hide = hide; - _updateAfterHideColumn(notify: notify); + _updateAfterHideColumn(columns: [column], notify: notify); } @override @@ -636,50 +625,54 @@ mixin ColumnState implements IPlutoGridState { _updateLimitedHideColumns(columns, hide); - _updateAfterHideColumn(notify: notify); + _updateAfterHideColumn(columns: columns, notify: notify); } @override void sortAscending(PlutoColumn column, {bool notify = true}) { - _resetColumnSort(); + _updateBeforeColumnSort(); column.sort = PlutoColumnSort.ascending; - refRows.sort( - (a, b) => column.type.compare( - a.cells[column.field]!.valueForSorting, - b.cells[column.field]!.valueForSorting, - ), - ); + compare(a, b) => column.type.compare( + a.cells[column.field]!.valueForSorting, + b.cells[column.field]!.valueForSorting, + ); - if (notify) { - notifyListeners(); + if (enabledRowGroups) { + sortRowGroup(column: column, compare: compare); + } else { + refRows.sort(compare); } + + notifyListeners(notify, sortAscending.hashCode); } @override void sortDescending(PlutoColumn column, {bool notify = true}) { - _resetColumnSort(); + _updateBeforeColumnSort(); column.sort = PlutoColumnSort.descending; - refRows.sort( - (b, a) => column.type.compare( - a.cells[column.field]!.valueForSorting, - b.cells[column.field]!.valueForSorting, - ), - ); + compare(b, a) => column.type.compare( + a.cells[column.field]!.valueForSorting, + b.cells[column.field]!.valueForSorting, + ); - if (notify) { - notifyListeners(); + if (enabledRowGroups) { + sortRowGroup(column: column, compare: compare); + } else { + refRows.sort(compare); } + + notifyListeners(notify, sortDescending.hashCode); } @override void sortBySortIdx(PlutoColumn column, {bool notify = true}) { - _resetColumnSort(); + _updateBeforeColumnSort(); - refRows.sort((a, b) { + int compare(a, b) { if (a.sortIdx == null || b.sortIdx == null) { if (a.sortIdx == null && b.sortIdx == null) { return 0; @@ -689,11 +682,15 @@ mixin ColumnState implements IPlutoGridState { } return a.sortIdx!.compareTo(b.sortIdx!); - }); + } - if (notify) { - notifyListeners(); + if (enabledRowGroups) { + sortRowGroup(column: column, compare: compare); + } else { + refRows.sort(compare); } + + notifyListeners(notify, sortBySortIdx.hashCode); } @override @@ -833,7 +830,12 @@ mixin ColumnState implements IPlutoGridState { return !enoughFrozenColumnsWidth(maxWidth! - offsetWidth); } - void _resetColumnSort() { + void _updateBeforeColumnSort() { + clearCurrentCell(notify: false); + + clearCurrentSelecting(notify: false); + + // Reset column sort to none. for (var i = 0; i < refColumns.originalList.length; i += 1) { refColumns.originalList[i].sort = PlutoColumnSort.none; } @@ -874,7 +876,7 @@ mixin ColumnState implements IPlutoGridState { } /// [PlutoGrid.onSorted] Called when a callback is registered. - void _fireOnSorted(PlutoColumn column, PlutoColumnSort oldSort) { + void _callOnSorted(PlutoColumn column, PlutoColumnSort oldSort) { if (onSorted == null) { return; } @@ -885,7 +887,7 @@ mixin ColumnState implements IPlutoGridState { /// Add [PlutoCell] to the whole [PlutoRow.cells]. /// Called when a new column is added. void _fillCellsInRows(List columns) { - for (var row in refRows.originalList) { + for (var row in iterateAllRowAndGroup) { final List> cells = []; for (var column in columns) { @@ -903,7 +905,7 @@ mixin ColumnState implements IPlutoGridState { /// Delete [PlutoCell] with matching [columns.field] from [PlutoRow.cells]. /// When a column is deleted, the corresponding [PlutoCell] is also called to be deleted. void _removeCellsInRows(List columns) { - for (var row in refRows.originalList) { + for (var row in iterateAllRowAndGroup) { for (var column in columns) { row.cells.remove(column.field); } @@ -957,6 +959,7 @@ mixin ColumnState implements IPlutoGridState { } void _updateAfterHideColumn({ + required List columns, required bool notify, }) { refColumns.update(); @@ -969,11 +972,11 @@ mixin ColumnState implements IPlutoGridState { deactivateColumnsAutoSize(); } + updateRowGroupByHideColumn(columns); + updateVisibilityLayout(); - if (notify) { - notifyListeners(); - } + notifyListeners(notify, hideColumn.hashCode); } bool _updateResizeColumns({ diff --git a/lib/src/manager/state/dragging_row_state.dart b/lib/src/manager/state/dragging_row_state.dart index 0810f187e..0f1d9f4b5 100644 --- a/lib/src/manager/state/dragging_row_state.dart +++ b/lib/src/manager/state/dragging_row_state.dart @@ -35,41 +35,43 @@ abstract class IDraggingRowState { bool isRowBeingDragged(Key rowKey); } -mixin DraggingRowState implements IPlutoGridState { - @override - bool get isDraggingRow => _isDraggingRow; - +class _State { bool _isDraggingRow = false; - @override - List get dragRows => _dragRows; - List _dragRows = []; + int? _dragTargetRowIdx; +} + +mixin DraggingRowState implements IPlutoGridState { + final _State _state = _State(); + @override - int? get dragTargetRowIdx => _dragTargetRowIdx; + bool get isDraggingRow => _state._isDraggingRow; - int? _dragTargetRowIdx; + @override + List get dragRows => _state._dragRows; + + @override + int? get dragTargetRowIdx => _state._dragTargetRowIdx; @override - bool get canRowDrag => !hasFilter && !hasSortedColumn; + bool get canRowDrag => !hasFilter && !hasSortedColumn && !enabledRowGroups; @override void setIsDraggingRow( bool flag, { bool notify = true, }) { - if (_isDraggingRow == flag) { + if (isDraggingRow == flag) { return; } - _isDraggingRow = flag; + _state._isDraggingRow = flag; _clearDraggingState(); - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setIsDraggingRow.hashCode); } @override @@ -77,11 +79,9 @@ mixin DraggingRowState implements IPlutoGridState { List rows, { bool notify = true, }) { - _dragRows = rows; + _state._dragRows = rows; - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setDragRows.hashCode); } @override @@ -89,50 +89,48 @@ mixin DraggingRowState implements IPlutoGridState { int? rowIdx, { bool notify = true, }) { - if (_dragTargetRowIdx == rowIdx) { + if (dragTargetRowIdx == rowIdx) { return; } - _dragTargetRowIdx = rowIdx; + _state._dragTargetRowIdx = rowIdx; - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setDragTargetRowIdx.hashCode); } @override bool isRowIdxDragTarget(int? rowIdx) { return rowIdx != null && - _dragTargetRowIdx != null && - _dragTargetRowIdx! <= rowIdx && - rowIdx < _dragTargetRowIdx! + _dragRows.length; + dragTargetRowIdx != null && + dragTargetRowIdx! <= rowIdx && + rowIdx < dragTargetRowIdx! + dragRows.length; } @override bool isRowIdxTopDragTarget(int? rowIdx) { return rowIdx != null && - _dragTargetRowIdx != null && - _dragTargetRowIdx == rowIdx && - rowIdx + _dragRows.length <= refRows.length; + dragTargetRowIdx != null && + dragTargetRowIdx == rowIdx && + rowIdx + dragRows.length <= refRows.length; } @override bool isRowIdxBottomDragTarget(int? rowIdx) { return rowIdx != null && - _dragTargetRowIdx != null && - rowIdx == _dragTargetRowIdx! + _dragRows.length - 1; + dragTargetRowIdx != null && + rowIdx == dragTargetRowIdx! + dragRows.length - 1; } @override bool isRowBeingDragged(Key? rowKey) { return rowKey != null && - _isDraggingRow == true && + isDraggingRow == true && dragRows.firstWhereOrNull((element) => element.key == rowKey) != null; } void _clearDraggingState() { - _dragRows = []; + _state._dragRows = []; - _dragTargetRowIdx = null; + _state._dragTargetRowIdx = null; } } diff --git a/lib/src/manager/state/editing_state.dart b/lib/src/manager/state/editing_state.dart index 7feefd9fe..e9cafe4da 100644 --- a/lib/src/manager/state/editing_state.dart +++ b/lib/src/manager/state/editing_state.dart @@ -10,7 +10,9 @@ abstract class IEditingState { /// Automatically set to editing state when cell is selected. bool get autoEditing; - TextEditingController? textEditingController; + TextEditingController? get textEditingController; + + bool isEditableCell(PlutoCell cell); /// Change the editing status of the current cell. void setEditing( @@ -23,6 +25,8 @@ abstract class IEditingState { bool notify = true, }); + void setTextEditingController(TextEditingController? textEditingController); + /// Toggle the editing status of the current cell. void toggleEditing({bool notify = true}); @@ -43,20 +47,40 @@ abstract class IEditingState { }); } +class _State { + bool _isEditing = false; + + bool _autoEditing = false; + + TextEditingController? _textEditingController; +} + mixin EditingState implements IPlutoGridState { - @override - bool get isEditing => _isEditing; + final _State _state = _State(); - bool _isEditing = false; + @override + bool get isEditing => _state._isEditing; @override bool get autoEditing => - _autoEditing || currentColumn?.enableAutoEditing == true; + _state._autoEditing || currentColumn?.enableAutoEditing == true; - bool _autoEditing = false; + @override + TextEditingController? get textEditingController => + _state._textEditingController; @override - TextEditingController? textEditingController; + bool isEditableCell(PlutoCell cell) { + if (cell.column.enableEditingMode != true) { + return false; + } + + if (enabledRowGroups) { + return rowGroupDelegate?.isEditableCell(cell) == true; + } + + return true; + } @override void setEditing( @@ -67,21 +91,30 @@ mixin EditingState implements IPlutoGridState { return; } - if (currentColumn?.enableEditingMode != true) { - flag = false; + if (currentCell == null || isEditing == flag) { + return; } - if (currentCell == null || _isEditing == flag) { - return; + assert( + currentCell?.column != null && currentCell?.row != null, + """ + PlutoCell is not Initialized. + PlutoColumn and PlutoRow must be initialized in PlutoCell via PlutoGridStateManager. + initializeRows method. When adding or deleting columns or rows, + you must use methods on PlutoGridStateManager. Otherwise, + the PlutoCell is not initialized and this error occurs. + """, + ); + + if (!isEditableCell(currentCell!)) { + flag = false; } - _isEditing = flag; + _state._isEditing = flag; clearCurrentSelecting(notify: false); - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setEditing.hashCode); } @override @@ -89,20 +122,23 @@ mixin EditingState implements IPlutoGridState { bool flag, { bool notify = true, }) { - if (_autoEditing == flag) { + if (autoEditing == flag) { return; } - _autoEditing = flag; + _state._autoEditing = flag; - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setAutoEditing.hashCode); + } + + @override + void setTextEditingController(TextEditingController? textEditingController) { + _state._textEditingController = textEditingController; } @override void toggleEditing({bool notify = true}) => setEditing( - !(_isEditing == true), + !(isEditing == true), notify: notify, ); @@ -156,7 +192,7 @@ mixin EditingState implements IPlutoGridState { ); } - notifyListeners(); + notifyListeners(true, pasteCellValue.hashCode); } @override @@ -193,8 +229,7 @@ mixin EditingState implements IPlutoGridState { if (force == false && canNotChangeCellValue( - column: currentColumn, - row: currentRow, + cell: cell, newValue: value, oldValue: oldValue, )) { @@ -216,9 +251,7 @@ mixin EditingState implements IPlutoGridState { )); } - if (notify) { - notifyListeners(); - } + notifyListeners(notify, changeCellValue.hashCode); } void _pasteCellValueIntoSelectingRows({List>? textList}) { @@ -303,8 +336,7 @@ mixin EditingState implements IPlutoGridState { newValue = castValueByColumnType(newValue, currentColumn); if (canNotChangeCellValue( - column: currentColumn, - row: refRows[rowIdx], + cell: currentCell, newValue: newValue, oldValue: oldValue, )) { diff --git a/lib/src/manager/state/filtering_row_state.dart b/lib/src/manager/state/filtering_row_state.dart index 08f2741ac..3b17a0a48 100644 --- a/lib/src/manager/state/filtering_row_state.dart +++ b/lib/src/manager/state/filtering_row_state.dart @@ -28,18 +28,22 @@ abstract class IFilteringRowState { }); } +class _State { + List _filterRows = []; +} + mixin FilteringRowState implements IPlutoGridState { - @override - List get filterRows => _filterRows; + final _State _state = _State(); - List _filterRows = []; + @override + List get filterRows => _state._filterRows; @override bool get hasFilter => refRows.hasFilter; @override void setFilter(FilteredListFilter? filter, {bool notify = true}) { - for (final row in refRows.originalList) { + for (final row in iterateAllRowAndGroup) { row.setState(PlutoRowState.none); } @@ -53,13 +57,15 @@ mixin FilteringRowState implements IPlutoGridState { }; } - refRows.setFilter(savedFilter); + if (enabledRowGroups) { + setRowGroupFilter(savedFilter); + } else { + refRows.setFilter(savedFilter); + } resetCurrentState(notify: false); - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setFilter.hashCode); } @override @@ -70,7 +76,7 @@ mixin FilteringRowState implements IPlutoGridState { refColumns.where((element) => element.enableFilterMenuItem).toList(); setFilter( - FilterHelper.convertRowsToFilter(_filterRows, enabledFilterColumnFields), + FilterHelper.convertRowsToFilter(filterRows, enabledFilterColumnFields), notify: isPaginated ? false : notify, ); @@ -81,7 +87,7 @@ mixin FilteringRowState implements IPlutoGridState { @override void setFilterRows(List rows) { - _filterRows = rows + _state._filterRows = rows .where( (element) => element.cells[FilterHelper.filterFieldValue]!.value .toString() @@ -92,7 +98,7 @@ mixin FilteringRowState implements IPlutoGridState { @override List filterRowsByField(String columnField) { - return _filterRows + return filterRows .where( (element) => element.cells[FilterHelper.filterFieldColumn]!.value == @@ -103,7 +109,7 @@ mixin FilteringRowState implements IPlutoGridState { @override bool isFilteredColumn(PlutoColumn column) { - return hasFilter && FilterHelper.isFilteredColumn(column, _filterRows); + return hasFilter && FilterHelper.isFilteredColumn(column, filterRows); } @override @@ -132,9 +138,10 @@ mixin FilteringRowState implements IPlutoGridState { void showFilterPopup( BuildContext context, { PlutoColumn? calledColumn, + void Function()? onClosed, }) { var shouldProvideDefaultFilterRow = - _filterRows.isEmpty && calledColumn != null; + filterRows.isEmpty && calledColumn != null; var rows = shouldProvideDefaultFilterRow ? [ @@ -145,7 +152,7 @@ mixin FilteringRowState implements IPlutoGridState { filterType: calledColumn.defaultFilter, ), ] - : _filterRows; + : filterRows; FilterHelper.filterPopup( FilterPopupState( @@ -167,6 +174,7 @@ mixin FilteringRowState implements IPlutoGridState { columns: columns, filterRows: rows, focusFirstFilterValue: shouldProvideDefaultFilterRow, + onClosed: onClosed, ), ); } diff --git a/lib/src/manager/state/focus_state.dart b/lib/src/manager/state/focus_state.dart index 5dc0bb739..483eaf29a 100644 --- a/lib/src/manager/state/focus_state.dart +++ b/lib/src/manager/state/focus_state.dart @@ -3,14 +3,12 @@ import 'package:pluto_grid/pluto_grid.dart'; abstract class IFocusState { /// FocusNode to control keyboard input. - FocusNode? get gridFocusNode; + FocusNode get gridFocusNode; bool get keepFocus; bool get hasFocus; - void setGridFocusNode(FocusNode focusNode); - void setKeepFocus(bool flag, {bool notify = true}); void nextFocusOfColumnFilter( @@ -19,46 +17,37 @@ abstract class IFocusState { }); } -mixin FocusState implements IPlutoGridState { - @override - FocusNode? get gridFocusNode => _gridFocusNode; - - FocusNode? _gridFocusNode; - - @override - bool get keepFocus => _keepFocus; - +class _State { bool _keepFocus = false; +} + +mixin FocusState implements IPlutoGridState { + final _State _state = _State(); @override - bool get hasFocus => - _gridFocusNode != null && _keepFocus && _gridFocusNode!.hasFocus; + bool get keepFocus => _state._keepFocus; @override - void setGridFocusNode(FocusNode? focusNode) { - _gridFocusNode = focusNode; - } + bool get hasFocus => keepFocus && gridFocusNode.hasFocus; @override void setKeepFocus(bool flag, {bool notify = true}) { - if (_keepFocus == flag) { + if (keepFocus == flag) { return; } - _keepFocus = flag; + _state._keepFocus = flag; - if (_keepFocus) { - _gridFocusNode!.requestFocus(); + if (keepFocus) { + gridFocusNode.requestFocus(); } - if (notify) { - if (_keepFocus) { - // RequestFocus is fired and notifies listeners with hasFocus true. - // requestFocus delays up to one frame. - notifyListenersOnPostFrame(); - } else { - notifyListeners(); - } + if (keepFocus) { + // RequestFocus is fired and notifies listeners with hasFocus true. + // requestFocus delays up to one frame. + notifyListenersOnPostFrame(notify, setKeepFocus.hashCode); + } else { + notifyListeners(notify, setKeepFocus.hashCode); } } diff --git a/lib/src/manager/state/grid_state.dart b/lib/src/manager/state/grid_state.dart index 1baa50ac4..97a6fa0d2 100644 --- a/lib/src/manager/state/grid_state.dart +++ b/lib/src/manager/state/grid_state.dart @@ -2,9 +2,9 @@ import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; abstract class IGridState { - GlobalKey? get gridKey; + GlobalKey get gridKey; - PlutoGridMode? get mode; + PlutoGridMode get mode; PlutoGridConfiguration get configuration; @@ -36,35 +36,10 @@ abstract class IGridState { PlutoGridStyleConfig get style; - void setGridKey(GlobalKey key); - void setKeyManager(PlutoGridKeyManager keyManager); void setEventManager(PlutoGridEventManager eventManager); - void setGridMode(PlutoGridMode mode); - - void setOnChanged(PlutoOnChangedEventCallback onChanged); - - void setColumnMenuDelegate(PlutoColumnMenuDelegate? columnMenuDelegate); - - void setCreateHeader(CreateHeaderCallBack createHeader); - - void setCreateFooter(CreateFooterCallBack createFooter); - - void setOnSelected(PlutoOnSelectedEventCallback onSelected); - - void setOnSorted(PlutoOnSortedEventCallback? onSorted); - - void setOnRowChecked(PlutoOnRowCheckedEventCallback? onRowChecked); - - void setOnRowDoubleTap(PlutoOnRowDoubleTapEventCallback? onDoubleTap); - - void setOnRowSecondaryTap( - PlutoOnRowSecondaryTapEventCallback? onSecondaryTap); - - void setOnRowsMoved(PlutoOnRowsMovedEventCallback? onRowsMoved); - void setConfiguration( PlutoGridConfiguration? configuration, { bool updateLocale = true, @@ -79,83 +54,25 @@ abstract class IGridState { void forceUpdate(); } -mixin GridState implements IPlutoGridState { - @override - GlobalKey? get gridKey => _gridKey; - - GlobalKey? _gridKey; - - @override - PlutoGridMode? get mode => _mode; - - PlutoGridMode? _mode; - - @override - PlutoGridConfiguration get configuration => _configuration!; - +class _State { PlutoGridConfiguration? _configuration; PlutoGridKeyManager? _keyManager; - @override - PlutoGridKeyManager? get keyManager => _keyManager; - PlutoGridEventManager? _eventManager; +} - @override - PlutoGridEventManager? get eventManager => _eventManager; - - @override - PlutoOnChangedEventCallback? get onChanged => _onChanged; - - PlutoOnChangedEventCallback? _onChanged; - - @override - PlutoOnSelectedEventCallback? get onSelected => _onSelected; - - PlutoOnSelectedEventCallback? _onSelected; - - @override - PlutoOnSortedEventCallback? get onSorted => _onSorted; - - PlutoOnSortedEventCallback? _onSorted; - - @override - PlutoOnRowCheckedEventCallback? get onRowChecked => _onRowChecked; - - PlutoOnRowCheckedEventCallback? _onRowChecked; - - @override - PlutoOnRowDoubleTapEventCallback? get onRowDoubleTap => _onRowDoubleTap; - - PlutoOnRowDoubleTapEventCallback? _onRowDoubleTap; - - @override - PlutoOnRowSecondaryTapEventCallback? get onRowSecondaryTap => - _onRowSecondaryTap; - - PlutoOnRowSecondaryTapEventCallback? _onRowSecondaryTap; - - @override - PlutoOnRowsMovedEventCallback? get onRowsMoved => _onRowsMoved; - - PlutoOnRowsMovedEventCallback? _onRowsMoved; +mixin GridState implements IPlutoGridState { + final _State _state = _State(); @override - PlutoColumnMenuDelegate get columnMenuDelegate => _columnMenuDelegate; - - PlutoColumnMenuDelegate _columnMenuDelegate = - const PlutoDefaultColumnMenuDelegate(); + PlutoGridConfiguration get configuration => _state._configuration!; @override - CreateHeaderCallBack? get createHeader => _createHeader; - - CreateHeaderCallBack? _createHeader; + PlutoGridKeyManager? get keyManager => _state._keyManager; @override - CreateFooterCallBack? get createFooter => _createFooter; - - CreateFooterCallBack? _createFooter; + PlutoGridEventManager? get eventManager => _state._eventManager; @override PlutoGridLocaleText get localeText => configuration.localeText; @@ -165,72 +82,12 @@ mixin GridState implements IPlutoGridState { @override void setKeyManager(PlutoGridKeyManager? keyManager) { - _keyManager = keyManager; + _state._keyManager = keyManager; } @override void setEventManager(PlutoGridEventManager? eventManager) { - _eventManager = eventManager; - } - - @override - void setGridMode(PlutoGridMode? mode) { - _mode = mode; - } - - @override - void setOnChanged(PlutoOnChangedEventCallback? onChanged) { - _onChanged = onChanged; - } - - @override - void setOnSelected(PlutoOnSelectedEventCallback? onSelected) { - _onSelected = onSelected; - } - - @override - void setOnSorted(PlutoOnSortedEventCallback? onSorted) { - _onSorted = onSorted; - } - - @override - void setOnRowChecked(PlutoOnRowCheckedEventCallback? onRowChecked) { - _onRowChecked = onRowChecked; - } - - @override - void setOnRowDoubleTap(PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) { - _onRowDoubleTap = onRowDoubleTap; - } - - @override - void setOnRowSecondaryTap( - PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) { - _onRowSecondaryTap = onRowSecondaryTap; - } - - @override - void setOnRowsMoved(PlutoOnRowsMovedEventCallback? onRowsMoved) { - _onRowsMoved = onRowsMoved; - } - - @override - void setColumnMenuDelegate(PlutoColumnMenuDelegate? columnMenuDelegate) { - if (columnMenuDelegate == null) { - return; - } - - _columnMenuDelegate = columnMenuDelegate; - } - - @override - void setCreateHeader(CreateHeaderCallBack? createHeader) { - _createHeader = createHeader; - } - - @override - void setCreateFooter(CreateFooterCallBack? createFooter) { - _createFooter = createFooter; + _state._eventManager = eventManager; } @override @@ -239,37 +96,30 @@ mixin GridState implements IPlutoGridState { bool updateLocale = true, bool applyColumnFilter = true, }) { - _configuration = configuration ?? const PlutoGridConfiguration(); + _state._configuration = configuration ?? const PlutoGridConfiguration(); if (updateLocale) { - _configuration!.updateLocale(); + _state._configuration!.updateLocale(); } if (applyColumnFilter) { - _configuration!.applyColumnFilter(refColumns); + _state._configuration!.applyColumnFilter(refColumns.originalList); } } - @override - void setGridKey(GlobalKey key) { - _gridKey = key; - } - @override void resetCurrentState({bool notify = true}) { clearCurrentCell(notify: false); clearCurrentSelecting(notify: false); - if (notify) { - notifyListeners(); - } + notifyListeners(notify, resetCurrentState.hashCode); } @override void handleOnSelected() { - if (_mode.isSelect == true && _onSelected != null) { - _onSelected!( + if (mode.isSelect == true && onSelected != null) { + onSelected!( PlutoGridOnSelectedEvent( row: currentRow, rowIdx: currentRowIdx, @@ -281,11 +131,11 @@ mixin GridState implements IPlutoGridState { @override void forceUpdate() { - if (gridKey?.currentContext == null) { + if (gridKey.currentContext == null) { return; } - gridKey!.currentContext! + gridKey.currentContext! .findAncestorStateOfType()! // ignore: invalid_use_of_protected_member .setState(() {}); diff --git a/lib/src/manager/state/keyboard_state.dart b/lib/src/manager/state/keyboard_state.dart index 3826fd783..7fda0df69 100644 --- a/lib/src/manager/state/keyboard_state.dart +++ b/lib/src/manager/state/keyboard_state.dart @@ -58,11 +58,11 @@ abstract class IKeyboardState { } mixin KeyboardState implements IPlutoGridState { + final PlutoGridKeyPressed _keyPressed = PlutoGridKeyPressed(); + @override PlutoGridKeyPressed get keyPressed => _keyPressed; - final PlutoGridKeyPressed _keyPressed = PlutoGridKeyPressed(); - @override PlutoGridCellPosition cellPositionToMove( PlutoGridCellPosition? cellPosition, @@ -189,8 +189,8 @@ mixin KeyboardState implements IPlutoGridState { if (!showFrozenColumn || column.frozen.isFrozen != true) { direction.isLeft - ? scroll!.horizontal!.jumpTo(0) - : scroll!.horizontal!.jumpTo(scroll!.maxScrollHorizontal); + ? scroll.horizontal!.jumpTo(0) + : scroll.horizontal!.jumpTo(scroll.maxScrollHorizontal); } } @@ -217,8 +217,8 @@ mixin KeyboardState implements IPlutoGridState { setCurrentCell(cellToMove, rowIdx, notify: notify); direction.isUp - ? scroll!.vertical!.jumpTo(0) - : scroll!.vertical!.jumpTo(scroll!.maxScrollVertical); + ? scroll.vertical!.jumpTo(0) + : scroll.vertical!.jumpTo(scroll.maxScrollVertical); } @override @@ -306,8 +306,8 @@ mixin KeyboardState implements IPlutoGridState { ); direction.isLeft - ? scroll!.horizontal!.jumpTo(0) - : scroll!.horizontal!.jumpTo(scroll!.maxScrollHorizontal); + ? scroll.horizontal!.jumpTo(0) + : scroll.horizontal!.jumpTo(scroll.maxScrollHorizontal); } @override @@ -343,8 +343,8 @@ mixin KeyboardState implements IPlutoGridState { ); direction.isUp - ? scroll!.vertical!.jumpTo(0) - : scroll!.vertical!.jumpTo(scroll!.maxScrollVertical); + ? scroll.vertical!.jumpTo(0) + : scroll.vertical!.jumpTo(scroll.maxScrollVertical); } @override diff --git a/lib/src/manager/state/layout_state.dart b/lib/src/manager/state/layout_state.dart index 599c51b76..d7a3ab771 100644 --- a/lib/src/manager/state/layout_state.dart +++ b/lib/src/manager/state/layout_state.dart @@ -41,6 +41,8 @@ abstract class ILayoutState { bool get showLoading; + PlutoGridLoadingLevel get loadingLevel; + bool get hasLeftFrozenColumns; bool get hasRightFrozenColumns; @@ -102,7 +104,11 @@ abstract class ILayoutState { void setShowColumnFilter(bool flag, {bool notify = true}); - void setShowLoading(bool flag, {bool notify = true}); + void setShowLoading( + bool flag, { + PlutoGridLoadingLevel level = PlutoGridLoadingLevel.grid, + bool notify = true, + }); void resetShowFrozenColumn(); @@ -114,24 +120,15 @@ abstract class ILayoutState { void setTextDirection(TextDirection textDirection); + void performLayoutOnPostFrame(); + @visibleForTesting void setGridGlobalOffset(Offset offset); } -mixin LayoutState implements IPlutoGridState { - @override - ChangeNotifier get resizingChangeNotifier => _resizingChangeNotifier; - - final ChangeNotifier _resizingChangeNotifier = ChangeNotifier(); - - @override - double? get maxWidth => _maxWidth; - +class _State { double? _maxWidth; - @override - double? get maxHeight => _maxHeight; - double? _maxHeight; double? _headerHeight; @@ -140,17 +137,36 @@ mixin LayoutState implements IPlutoGridState { double? _columnFooterHeight; - set headerHeight(double value) { - _headerHeight = value; - } + Offset? _gridGlobalOffset; - set footerHeight(double value) { - _footerHeight = value; - } + bool? _showFrozenColumn; - set columnFooterHeight(double value) { - _columnFooterHeight = value; - } + bool? _showColumnTitle = true; + + bool? _showColumnFooter = false; + + bool? _showColumnFilter; + + bool? _showLoading; + + PlutoGridLoadingLevel _loadingLevel = PlutoGridLoadingLevel.grid; + + TextDirection _textDirection = TextDirection.ltr; +} + +mixin LayoutState implements IPlutoGridState { + final _State _state = _State(); + + @override + ChangeNotifier get resizingChangeNotifier => _resizingChangeNotifier; + + final ChangeNotifier _resizingChangeNotifier = ChangeNotifier(); + + @override + double? get maxWidth => _state._maxWidth; + + @override + double? get maxHeight => _state._maxHeight; @override double get headerHeight { @@ -158,9 +174,13 @@ mixin LayoutState implements IPlutoGridState { return 0; } - return _headerHeight == null + return _state._headerHeight == null ? PlutoGridSettings.rowTotalHeight - : _headerHeight!; + : _state._headerHeight!; + } + + set headerHeight(double value) { + _state._headerHeight = value; } @override @@ -169,9 +189,13 @@ mixin LayoutState implements IPlutoGridState { return 0; } - return _footerHeight == null + return _state._footerHeight == null ? PlutoGridSettings.rowTotalHeight - : _footerHeight!; + : _state._footerHeight!; + } + + set footerHeight(double value) { + _state._footerHeight = value; } @override @@ -180,9 +204,13 @@ mixin LayoutState implements IPlutoGridState { return 0; } - return _columnFooterHeight == null + return _state._columnFooterHeight == null ? PlutoGridSettings.rowTotalHeight - : _columnFooterHeight!; + : _state._columnFooterHeight!; + } + + set columnFooterHeight(double value) { + _state._columnFooterHeight = value; } @override @@ -194,43 +222,29 @@ mixin LayoutState implements IPlutoGridState { @override Offset? get gridGlobalOffset { - if (gridKey == null) { - return _gridGlobalOffset; - } - final RenderBox? gridRenderBox = - gridKey!.currentContext?.findRenderObject() as RenderBox?; + gridKey.currentContext?.findRenderObject() as RenderBox?; if (gridRenderBox == null) { - return _gridGlobalOffset; + return _state._gridGlobalOffset; } - _gridGlobalOffset = gridRenderBox.localToGlobal(Offset.zero); + _state._gridGlobalOffset = gridRenderBox.localToGlobal(Offset.zero); - return _gridGlobalOffset; + return _state._gridGlobalOffset; } - Offset? _gridGlobalOffset; - @override - bool get showFrozenColumn => _showFrozenColumn == true; - - bool? _showFrozenColumn; + bool get showFrozenColumn => _state._showFrozenColumn == true; @override - bool get showColumnTitle => _showColumnTitle == true; - - bool? _showColumnTitle = true; + bool get showColumnTitle => _state._showColumnTitle == true; @override - bool get showColumnFooter => _showColumnFooter == true; - - bool? _showColumnFooter = false; + bool get showColumnFooter => _state._showColumnFooter == true; @override - bool get showColumnFilter => _showColumnFilter == true; - - bool? _showColumnFilter; + bool get showColumnFilter => _state._showColumnFilter == true; @override bool get showHeader => createHeader != null; @@ -239,9 +253,10 @@ mixin LayoutState implements IPlutoGridState { bool get showFooter => createFooter != null; @override - bool get showLoading => _showLoading == true; + bool get showLoading => _state._showLoading == true; - bool? _showLoading; + @override + PlutoGridLoadingLevel get loadingLevel => _state._loadingLevel; @override bool get hasLeftFrozenColumns => @@ -354,13 +369,13 @@ mixin LayoutState implements IPlutoGridState { leftFrozenColumnsWidth - bodyColumnsWidth + PlutoGridSettings.totalShadowLineWidth + - scroll!.horizontal!.offset; + scroll.horizontal!.offset; @override double get scrollOffsetByFrozenColumn { double offset = 0; - if (_showFrozenColumn!) { + if (showFrozenColumn) { offset += leftFrozenColumnsWidth > 0 ? PlutoGridSettings.gridBorderWidth : 0; offset += @@ -371,9 +386,7 @@ mixin LayoutState implements IPlutoGridState { } @override - TextDirection get textDirection => _textDirection; - - TextDirection _textDirection = TextDirection.ltr; + TextDirection get textDirection => _state._textDirection; @override bool get isLTR => textDirection == TextDirection.ltr; @@ -384,13 +397,13 @@ mixin LayoutState implements IPlutoGridState { @override void setLayout(BoxConstraints size) { final showFrozenColumn = shouldShowFrozenColumns(size.maxWidth); - final bool changedShowFrozenColumn = _showFrozenColumn != showFrozenColumn; - final bool changedMaxWidth = _maxWidth != size.maxWidth; + final bool changedShowFrozenColumn = showFrozenColumn != showFrozenColumn; + final bool changedMaxWidth = maxWidth != size.maxWidth; - _maxWidth = size.maxWidth; - _maxHeight = size.maxHeight; - _showFrozenColumn = showFrozenColumn; - _gridGlobalOffset = null; + _state._maxWidth = size.maxWidth; + _state._maxHeight = size.maxHeight; + _state._showFrozenColumn = showFrozenColumn; + _state._gridGlobalOffset = null; if (changedShowFrozenColumn || changedMaxWidth) { updateVisibilityLayout(); @@ -407,59 +420,57 @@ mixin LayoutState implements IPlutoGridState { @override void setShowColumnTitle(bool flag, {bool notify = true}) { - if (_showColumnTitle == flag) { + if (showColumnTitle == flag) { return; } - _showColumnTitle = flag; + _state._showColumnTitle = flag; - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setShowColumnTitle.hashCode); } @override void setShowColumnFooter(bool flag, {bool notify = true}) { - if (_showColumnFooter == flag) { + if (showColumnFooter == flag) { return; } - _showColumnFooter = flag; + _state._showColumnFooter = flag; - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setShowColumnFooter.hashCode); } @override void setShowColumnFilter(bool flag, {bool notify = true}) { - if (_showColumnFilter == flag) { + if (showColumnFilter == flag) { return; } - _showColumnFilter = flag; + _state._showColumnFilter = flag; - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setShowColumnFilter.hashCode); } @override - void setShowLoading(bool flag, {bool notify = true}) { - if (_showLoading == flag) { + void setShowLoading( + bool flag, { + PlutoGridLoadingLevel level = PlutoGridLoadingLevel.grid, + bool notify = true, + }) { + if (showLoading == flag) { return; } - _showLoading = flag; + _state._showLoading = flag; - if (notify) { - notifyListeners(); - } + _state._loadingLevel = level; + + notifyListeners(notify, setShowLoading.hashCode); } @override void resetShowFrozenColumn() { - _showFrozenColumn = shouldShowFrozenColumns(maxWidth!); + _state._showFrozenColumn = shouldShowFrozenColumns(maxWidth!); } @override @@ -488,12 +499,17 @@ mixin LayoutState implements IPlutoGridState { @override void setTextDirection(TextDirection textDirection) { - _textDirection = textDirection; + _state._textDirection = textDirection; + } + + @override + void performLayoutOnPostFrame() { + notifyListenersOnPostFrame(true, performLayoutOnPostFrame.hashCode); } @override @visibleForTesting void setGridGlobalOffset(Offset offset) { - _gridGlobalOffset = offset; + _state._gridGlobalOffset = offset; } } diff --git a/lib/src/manager/state/pagination_row_state.dart b/lib/src/manager/state/pagination_row_state.dart index be907461e..1c038128b 100644 --- a/lib/src/manager/state/pagination_row_state.dart +++ b/lib/src/manager/state/pagination_row_state.dart @@ -5,28 +5,48 @@ abstract class IPaginationRowState { int get pageSize; + int get pageRangeFrom; + + int get pageRangeTo; + int get totalPage; bool get isPaginated; void setPageSize(int pageSize, {bool notify = true}); - void setPage(int page, {bool notify = true}); + void setPage( + int page, { + bool resetCurrentState = true, + bool notify = true, + }); - void resetPage({bool notify = true}); + void resetPage({ + bool resetCurrentState = true, + bool notify = true, + }); } -mixin PaginationRowState implements IPlutoGridState { - static int defaultPageSize = 40; - - int _pageSize = defaultPageSize; +class _State { + int _pageSize = PaginationRowState.defaultPageSize; int _page = 1; +} + +mixin PaginationRowState implements IPlutoGridState { + final _State _state = _State(); + + static int defaultPageSize = 40; final FilteredListRange _range = FilteredListRange(0, defaultPageSize); - int get _length => - hasFilter ? refRows.filteredList.length : refRows.originalList.length; + Iterable get _rowsToPaginate { + return enabledRowGroups + ? refRows.filterOrOriginalList.where(isMainRow) + : refRows.filterOrOriginalList; + } + + int get _length => _rowsToPaginate.length; int get _adjustPage { if (page > totalPage) { @@ -41,57 +61,94 @@ mixin PaginationRowState implements IPlutoGridState { } @override - int get page => _page; + int get page => _state._page; @override - int get pageSize => _pageSize; + int get pageSize => _state._pageSize; @override - int get totalPage => (_length / _pageSize).ceil(); + int get pageRangeFrom => _range.from; + + @override + int get pageRangeTo => _range.to; + + @override + int get totalPage => (_length / pageSize).ceil(); @override bool get isPaginated => refRows.hasRange; @override void setPageSize(int pageSize, {bool notify = true}) { - _pageSize = pageSize; + _state._pageSize = pageSize; - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setPageSize.hashCode); } @override - void setPage(int page, {bool notify = true}) { - _page = page; + void setPage( + int page, { + bool resetCurrentState = true, + bool notify = true, + }) { + _state._page = page; - int from = (page - 1) * _pageSize; + int from = (page - 1) * pageSize; if (from < 0) { from = 0; } - int to = page * _pageSize; + int to = page * pageSize; if (to > _length) { to = _length; } + if (enabledRowGroups) { + PlutoRow lastRow(PlutoRow row) { + return isExpandedGroupedRow(row) && + row.type.group.children.filterOrOriginalList.isNotEmpty + ? lastRow(row.type.group.children.filterOrOriginalList.last) + : row; + } + + if (_rowsToPaginate.isEmpty) { + from = 0; + to = 0; + } else { + var fromRow = _rowsToPaginate.elementAt(from); + + var toRow = lastRow(_rowsToPaginate.elementAt(to - 1)); + + from = refRows.filterOrOriginalList.indexOf(fromRow); + + to = refRows.filterOrOriginalList.indexOf(toRow) + 1; + } + } + _range.setRange(from, to); refRows.setFilterRange(_range); - clearCurrentCell(notify: false); - - clearCurrentSelecting(notify: false); + if (resetCurrentState) { + clearCurrentCell(notify: false); - if (notify) { - notifyListeners(); + clearCurrentSelecting(notify: false); } + + notifyListeners(notify, setPage.hashCode); } @override - void resetPage({bool notify = true}) { - setPage(_adjustPage, notify: notify); + void resetPage({ + bool resetCurrentState = true, + bool notify = true, + }) { + setPage( + _adjustPage, + resetCurrentState: resetCurrentState, + notify: notify, + ); } } diff --git a/lib/src/manager/state/row_group_state.dart b/lib/src/manager/state/row_group_state.dart new file mode 100644 index 000000000..8ca3860b0 --- /dev/null +++ b/lib/src/manager/state/row_group_state.dart @@ -0,0 +1,728 @@ +import 'package:collection/collection.dart'; +import 'package:flutter/foundation.dart'; +import 'package:pluto_grid/pluto_grid.dart'; + +/* + todo + ColumnGroup + - Apply changed depth when removing column + Row + - Move + - Improve initializeRows when adding rows + Test + - add, insert, prepend, append rows with pagination, sort, filter + Performance + - Toggle row group + - Filtering + - Sorting + - Aggregate footer + */ + +abstract class IRowGroupState { + /// Whether to set [PlutoRowGroupDelegate] for row grouping. + /// + /// Returns true if [PlutoRowGroupDelegate] is set with [setRowGroup]. + bool get hasRowGroups; + + /// If [PlutoRowGroupDelegate] is set for row grouping, + /// return the active status of the actual grouping function. + /// + /// If grouped by [PlutoRowGroupByColumnDelegate], + /// return false if there is no set group column + /// because the set group column is deleted or hidden. + bool get enabledRowGroups; + + /// Setting delegate for grouping rows. + /// + /// {@template row_group_state_rowGroupDelegate} + /// As a class that implements [PlutoRowGroupDelegate], + /// it defines functions necessary for row grouping. + /// + /// [PlutoRowGroupTreeDelegate] allows grouping of complex depths. + /// + /// [PlutoRowGroupByColumnDelegate] groups rows by column. + /// {@endtemplate} + PlutoRowGroupDelegate? get rowGroupDelegate; + + /// Regardless of filtering or pagination applied, + /// + /// {@macro row_group_state_iterateMainRowGroup} + Iterable get iterateAllMainRowGroup; + + /// Regardless of filtering or pagination applied, + /// + /// {@macro row_group_state_iterateRowGroup} + Iterable get iterateAllRowGroup; + + /// Regardless of filtering or pagination applied, + /// + /// {@macro row_group_state_iterateRowAndGroup} + Iterable get iterateAllRowAndGroup; + + /// Regardless of filtering or pagination applied, + /// + /// {@macro row_group_state_iterateRow} + Iterable get iterateAllRow; + + /// With filtering or pagination applied, + /// + /// {@template row_group_state_iterateMainRowGroup} + /// Returns the all rows with the highest depth. + /// + /// The depth is determined by [PlutoRow.parent]. + /// If [PlutoRow.parent] does not exist, the depth is the top level, + /// and it continues to explore this property to determine the depth of the depth. + /// {@endtemplate} + Iterable get iterateMainRowGroup; + + /// With filtering or pagination applied, + /// + /// {@template row_group_state_iterateRowGroup} + /// Returns all rows where [PlutoRow.type] is set to [PlutoRowType.group]. + /// {@endtemplate} + Iterable get iterateRowGroup; + + /// With filtering or pagination applied, + /// + /// {@template row_group_state_iterateRowAndGroup} + /// Returns all rows where [PlutoRow.type] is [PlutoRowType.group] or [PlutoRowType.normal]. + /// {@endtemplate} + Iterable get iterateRowAndGroup; + + /// With filtering or pagination applied, + /// + /// {@template row_group_state_iterateRow} + /// Returns all rows where [PlutoRow.type] is not [PlutoRowType.group]. + /// {@endtemplate} + Iterable get iterateRow; + + /// Returns whether it is the top row or not. + /// + /// If [PlutoRow.parent] does not exist, it is the top row. + bool isMainRow(PlutoRow row); + + bool isNotMainGroupedRow(PlutoRow row); + + bool isExpandedGroupedRow(PlutoRow row); + + /// Set up a delegate for grouping rows. + /// + /// {@macro row_group_state_rowGroupDelegate} + void setRowGroup( + PlutoRowGroupDelegate? delegate, { + bool notify = true, + }); + + /// Collapse or expand the group row. + void toggleExpandedRowGroup({ + required PlutoRow rowGroup, + bool notify = true, + }); + + @protected + void setRowGroupFilter(FilteredListFilter? filter); + + @protected + void sortRowGroup({ + required PlutoColumn column, + required int Function(PlutoRow, PlutoRow) compare, + }); + + @protected + void insertRowGroup(int index, List rows); + + @protected + void removeRowAndGroupByKey(Iterable keys); + + @protected + void removeColumnsInRowGroupByColumn( + List columns, { + bool notify = true, + }); + + @protected + void updateRowGroupByHideColumn(List columns); +} + +class _State { + bool _previousEnabledRowGroups = false; + + PlutoRowGroupDelegate? _rowGroupDelegate; +} + +mixin RowGroupState implements IPlutoGridState { + final _State _state = _State(); + + @override + bool get hasRowGroups => _state._rowGroupDelegate != null; + + @override + bool get enabledRowGroups => rowGroupDelegate?.enabled == true; + + @override + PlutoRowGroupDelegate? get rowGroupDelegate => _state._rowGroupDelegate; + + @override + Iterable get iterateAllMainRowGroup sync* { + for (final row in refRows.originalList.where(isMainRow)) { + yield row; + } + } + + @override + Iterable get iterateAllRowGroup sync* { + for (final row in _iterateRowGroup(iterateAllMainRowGroup)) { + yield row; + } + } + + @override + Iterable get iterateAllRowAndGroup sync* { + for (final row in _iterateRowAndGroup(iterateAllMainRowGroup)) { + yield row; + } + } + + @override + Iterable get iterateAllRow sync* { + for (final row in _iterateRow(iterateAllMainRowGroup)) { + yield row; + } + } + + @override + Iterable get iterateMainRowGroup sync* { + for (final row in refRows.where(isMainRow)) { + yield row; + } + } + + @override + Iterable get iterateRowGroup sync* { + for (final row + in _iterateRowGroup(iterateMainRowGroup, iterateAll: false)) { + yield row; + } + } + + @override + Iterable get iterateRowAndGroup sync* { + for (final row + in _iterateRowAndGroup(iterateMainRowGroup, iterateAll: false)) { + yield row; + } + } + + @override + Iterable get iterateRow sync* { + for (final row in _iterateRow(iterateMainRowGroup, iterateAll: false)) { + yield row; + } + } + + bool get _previousEnabledRowGroups => _state._previousEnabledRowGroups; + + @override + bool isMainRow(PlutoRow row) => row.isMain; + + @override + bool isNotMainGroupedRow(PlutoRow row) => !isMainRow(row); + + @override + bool isExpandedGroupedRow(PlutoRow row) { + return row.type.isGroup && row.type.group.expanded; + } + + @override + void setRowGroup( + PlutoRowGroupDelegate? delegate, { + bool notify = true, + }) { + _state._rowGroupDelegate = delegate; + + _updateRowGroup(); + + notifyListeners(notify, setRowGroup.hashCode); + } + + @override + void toggleExpandedRowGroup({ + required PlutoRow rowGroup, + bool notify = true, + }) { + assert(enabledRowGroups); + + if (!rowGroup.type.isGroup || + rowGroup.type.group.children.originalList.isEmpty) { + return; + } + + if (rowGroup.type.group.expanded) { + final Set removeKeys = {}; + + for (final child in _iterateRowAndGroup(rowGroup.type.group.children)) { + removeKeys.add(child.key); + } + + refRows.removeWhereFromOriginal((e) => removeKeys.contains(e.key)); + } else { + final Iterable children = PlutoRowGroupHelper.iterateWithFilter( + rowGroup.type.group.children, + filter: (r) => true, + childrenFilter: (r) => r.type.isGroup && r.type.group.expanded + ? r.type.group.children.iterator + : null, + ); + + final idx = refRows.indexOf(rowGroup); + + refRows.insertAll(idx + 1, children); + } + + rowGroup.type.group.setExpanded(!rowGroup.type.group.expanded); + + if (isPaginated) { + resetPage(resetCurrentState: false, notify: false); + } + + updateCurrentCellPosition(notify: false); + + clearCurrentSelecting(notify: false); + + notifyListeners(notify, toggleExpandedRowGroup.hashCode); + } + + @override + @protected + void setRowGroupFilter(FilteredListFilter? filter) { + assert(enabledRowGroups); + + _ensureRowGroups(() { + rowGroupDelegate!.filter(rows: refRows, filter: filter); + }); + } + + @override + @protected + void sortRowGroup({ + required PlutoColumn column, + required int Function(PlutoRow, PlutoRow) compare, + }) { + assert(enabledRowGroups); + + _ensureRowGroups(() { + rowGroupDelegate!.sort(column: column, rows: refRows, compare: compare); + }); + } + + @override + @protected + void insertRowGroup(int index, List rows) { + if (rows.isEmpty) { + return; + } + + assert(enabledRowGroups); + + if (!rows.first.initialized) { + PlutoGridStateManager.initializeRows( + refColumns.originalList, + rows, + forceApplySortIdx: false, + ); + } + + final bool append = index >= refRows.length; + final targetIdx = append ? refRows.length - 1 : index; + final target = refRows.isEmpty ? null : refRows[targetIdx]; + + if (rowGroupDelegate is PlutoRowGroupByColumnDelegate && !append) { + _updateCellsByTargetForGroupByColumn(rows: rows, target: target); + } + + final grouped = rowGroupDelegate!.toGroup(rows: rows); + + bool findByTargetKey(PlutoRow e) => e.key == target?.key; + + bool hasChildrenGroup(PlutoRow found) { + return found.type.isGroup && + found.type.group.children.originalList.isNotEmpty && + found.type.group.children.originalList.first.type.isGroup; + } + + void updateSortIdx({ + required List rows, + required int start, + required int compare, + required int increase, + }) { + if (hasSortedColumn) { + for (final row in rows) { + if (compare >= row.sortIdx) { + row.sortIdx += increase; + } + } + } else { + final length = rows.length; + for (int i = start; i < length; i += 1) { + rows[i].sortIdx += increase; + } + } + } + + void updateAddedRow(PlutoRow row) { + row.setState(PlutoRowState.added); + if (row.type.isGroup) { + updateChild(PlutoRow e) { + e.setParent(row); + updateAddedRow(e); + } + + row.type.group.children.originalList.forEach(updateChild); + } + } + + void updateAddedChildren(PlutoRow parent, List children) { + parent.setState(PlutoRowState.updated); + updateChild(PlutoRow e) { + e.setParent(parent); + updateAddedRow(e); + } + + children.forEach(updateChild); + } + + void insertOrAdd({ + required FilteredList ref, + required PlutoRow row, + PlutoRow? parent, + }) { + row.setParent(parent); + updateAddedRow(row); + + final insertIdx = ref.indexWhere(findByTargetKey); + if (insertIdx > -1 && !append) { + row.sortIdx = ref[insertIdx].sortIdx; + updateSortIdx( + rows: ref, + start: insertIdx, + compare: row.sortIdx, + increase: 1, + ); + ref.insert(insertIdx, row); + } else { + ref.add(row); + } + } + + void insertOrAddToChildren({ + required PlutoRow found, + required PlutoRow row, + }) { + assert(row.type.isGroup); + updateAddedChildren(found, row.type.group.children.originalList); + + final insertIdx = found.type.group.children.indexWhere(findByTargetKey); + if (insertIdx > -1 && !append) { + final length = row.type.group.children.length; + for (int i = 0; i < length; i += 1) { + row.type.group.children[i].sortIdx = + found.type.group.children[insertIdx].sortIdx + i; + } + updateSortIdx( + rows: found.type.group.children, + start: insertIdx, + compare: found.type.group.children[insertIdx].sortIdx, + increase: row.type.group.children.length, + ); + found.type.group.children.insertAll( + insertIdx, + row.type.group.children, + ); + } else { + found.type.group.children.addAll(row.type.group.children); + } + } + + void addAllGroupByColumn( + Iterable groupedRows, + FilteredList ref, + PlutoRow? parent, + ) { + for (final row in groupedRows) { + findByRowKey(PlutoRow e) => e.key == row.key; + final found = ref.originalList.firstWhereOrNull(findByRowKey); + + if (found == null) { + insertOrAdd(ref: ref, row: row, parent: parent); + } else { + if (hasChildrenGroup(found)) { + addAllGroupByColumn( + row.type.group.children, + found.type.group.children, + found, + ); + } else { + insertOrAddToChildren(found: found, row: row); + } + } + } + } + + void addAllGroupTree() { + final targetParent = target?.parent?.type.group.children ?? refRows; + + if (target?.parent == null) { + grouped.forEach(updateAddedRow); + } else { + updateAddedChildren(target!.parent!, grouped); + } + + if (append) { + targetParent.addAll(grouped); + return; + } + + final targetParentList = targetParent.filterOrOriginalList; + final insertIdx = targetParentList.indexWhere(findByTargetKey); + assert(insertIdx != -1); + + final length = grouped.length; + for (int i = 0; i < length; i += 1) { + grouped[i].sortIdx = (target?.sortIdx ?? 0) + i; + } + + updateSortIdx( + rows: targetParent.originalList, + start: target == null ? 0 : targetParent.originalList.indexOf(target), + compare: target?.sortIdx ?? 0, + increase: grouped.length, + ); + + targetParent.insertAll(insertIdx, grouped); + } + + _ensureRowGroups(() { + switch (rowGroupDelegate!.type) { + case PlutoRowGroupDelegateType.tree: + addAllGroupTree(); + break; + case PlutoRowGroupDelegateType.byColumn: + addAllGroupByColumn(grouped, refRows, null); + break; + } + }); + + refRows.update(); + } + + @override + @protected + void removeRowAndGroupByKey(Iterable keys) { + if (keys.isEmpty) { + return; + } + + assert(enabledRowGroups); + + bool removeEmptyGroup(PlutoRow row) => + rowGroupDelegate!.type.isByColumn && + row.type.group.children.originalList.isEmpty; + + _ensureRowGroups(() { + bool removeAll(PlutoRow row) { + if (row.type.isGroup) { + row.type.group.children.removeWhereFromOriginal(removeAll); + + if (removeEmptyGroup(row)) return true; + } + + return keys.contains(row.key); + } + + refRows.removeWhereFromOriginal(removeAll); + }); + } + + @override + @protected + void removeColumnsInRowGroupByColumn( + List columns, { + bool notify = true, + }) { + if (columns.isEmpty || rowGroupDelegate?.type.isByColumn != true) { + return; + } + + final delegate = rowGroupDelegate as PlutoRowGroupByColumnDelegate; + + final Set removeKeys = Set.from(columns.map((e) => e.key)); + + isNotRemoved(e) => !removeKeys.contains(e.key); + + final remaining = + delegate.columns.where(isNotRemoved).toList(growable: false); + + if (remaining.length == delegate.columns.length) { + return; + } + + delegate.columns.clear(); + + delegate.columns.addAll(remaining); + + _updateRowGroup(); + } + + @override + @protected + void updateRowGroupByHideColumn(List columns) { + if (rowGroupDelegate?.type.isByColumn != true || + rowGroupDelegate?.showFirstExpandableIcon == true) { + return; + } + + final delegate = rowGroupDelegate as PlutoRowGroupByColumnDelegate; + + final Set updateKeys = Set.from(columns.map((e) => e.key)); + + isUpdated(e) => updateKeys.contains(e.key); + + final updated = delegate.columns.firstWhereOrNull(isUpdated) != null; + + if (updated) { + _updateRowGroup(); + } + } + + void _ensureRowGroups(void Function() callback) { + assert(enabledRowGroups); + + _collapseAllRowGroup(); + + callback(); + + _restoreExpandedRowGroup(); + } + + void _collapseAllRowGroup() { + refRows.removeWhereFromOriginal(isNotMainGroupedRow); + } + + void _restoreExpandedRowGroup() { + final Iterable expandedRows = refRows.filterOrOriginalList + .where(isExpandedGroupedRow) + .toList(growable: false); + + bool toResetPage = false; + + if (isPaginated) { + refRows.setFilterRange(null); + toResetPage = true; + } + + for (final rowGroup in expandedRows) { + final Iterable children = PlutoRowGroupHelper.iterateWithFilter( + rowGroup.type.group.children, + filter: (r) => true, + childrenFilter: (r) => r.type.isGroup && r.type.group.expanded + ? r.type.group.children.iterator + : null, + ); + + final idx = refRows.filterOrOriginalList.indexOf(rowGroup); + + refRows.insertAll(idx + 1, children); + } + + if (toResetPage) { + resetPage(resetCurrentState: false, notify: false); + } + } + + void _updateCellsByTargetForGroupByColumn({ + required List rows, + required PlutoRow? target, + }) { + if (target == null) { + return; + } + + assert(rowGroupDelegate is PlutoRowGroupByColumnDelegate); + + final delegate = rowGroupDelegate as PlutoRowGroupByColumnDelegate; + + final depth = target.depth; + + final groupedColumn = delegate.columns.getRange(0, depth); + + for (final row in rows) { + for (final column in groupedColumn) { + row.cells[column.field]!.value = target.cells[column.field]!.value; + } + } + } + + void _updateRowGroup() { + assert(hasRowGroups); + + List rows; + + final previousRows = _previousEnabledRowGroups + ? _iterateRow(iterateAllMainRowGroup) + : refRows.originalList; + + if (enabledRowGroups == true) { + rows = rowGroupDelegate!.toGroup(rows: previousRows); + } else { + // todo : reset sortIdx + rows = previousRows.toList(); + setParent(PlutoRow e) => e.setParent(null); + rows.forEach(setParent); + } + + _state._previousEnabledRowGroups = enabledRowGroups; + + refRows.clearFromOriginal(); + + refRows.addAll(rows); + + if (isPaginated) { + resetPage(resetCurrentState: true, notify: false); + } + } + + Iterable _iterateRow( + Iterable rows, { + bool iterateAll = true, + }) sync* { + bool isNotGroup(PlutoRow e) => !e.type.isGroup; + + for (final row in PlutoRowGroupHelper.iterateWithFilter(rows, + filter: isNotGroup, iterateAll: iterateAll)) { + yield row; + } + } + + Iterable _iterateRowGroup( + Iterable rows, { + bool iterateAll = true, + }) sync* { + bool isGroup(PlutoRow e) => e.type.isGroup; + + for (final row in PlutoRowGroupHelper.iterateWithFilter(rows, + filter: isGroup, iterateAll: iterateAll)) { + yield row; + } + } + + Iterable _iterateRowAndGroup( + Iterable rows, { + bool iterateAll = true, + }) sync* { + for (final row in PlutoRowGroupHelper.iterateWithFilter(rows, + iterateAll: iterateAll)) { + yield row; + } + } +} diff --git a/lib/src/manager/state/row_state.dart b/lib/src/manager/state/row_state.dart index a705927de..ec5e50182 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; - FilteredList refRows = FilteredList(); + FilteredList get refRows; List get checkedRows; @@ -36,12 +36,6 @@ abstract class IRowState { int count = 1, }); - List setSortIdxOfRows( - List rows, { - bool increase = true, - int start = 0, - }); - void setRowChecked( PlutoRow row, bool flag, { @@ -88,26 +82,12 @@ abstract class IRowState { bool flag, { bool notify = true, }); - - /// Dynamically change the background color of row by implementing a callback function. - void setRowColorCallback(PlutoRowColorCallback rowColorCallback); } mixin RowState implements IPlutoGridState { @override List get rows => [...refRows]; - @override - FilteredList get refRows => _refRows; - - @override - set refRows(FilteredList setRows) { - PlutoGridStateManager.initializeRows(refColumns.originalList, setRows); - _refRows = setRows; - } - - FilteredList _refRows = FilteredList(); - @override List get checkedRows => refRows.where((row) => row.checked!).toList( growable: false, @@ -131,17 +111,19 @@ mixin RowState implements IPlutoGridState { bool? get tristateCheckedRow { final length = refRows.length; - if (length == 0) { - return false; - } + if (length == 0) return false; - final Set checkSet = {}; + int countTrue = 0; + + int countFalse = 0; for (var i = 0; i < length; i += 1) { - checkSet.add(refRows[i].checked == true); + refRows[i].checked == true ? ++countTrue : ++countFalse; + + if (countTrue > 0 && countFalse > 0) return null; } - return checkSet.length == 2 ? null : checkSet.first; + return countTrue == length; } @override @@ -156,16 +138,9 @@ mixin RowState implements IPlutoGridState { return refRows[currentRowIdx!]; } - PlutoRowColorCallback? _rowColorCallback; - - @override - PlutoRowColorCallback? get rowColorCallback { - return _rowColorCallback; - } - @override int? getRowIdxByOffset(double offset) { - offset -= bodyTopOffset - scroll!.verticalOffset; + offset -= bodyTopOffset - scroll.verticalOffset; double currentOffset = 0.0; @@ -224,23 +199,6 @@ mixin RowState implements IPlutoGridState { return rows; } - @override - List setSortIdxOfRows( - List rows, { - bool increase = true, - int start = 0, - }) { - int sortIdx = start; - - for (final row in rows) { - row.sortIdx = sortIdx; - - sortIdx = increase ? ++sortIdx : --sortIdx; - } - - return rows; - } - @override void setRowChecked( PlutoRow row, @@ -257,9 +215,7 @@ mixin RowState implements IPlutoGridState { findRow.setChecked(flag); - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setRowChecked.hashCode); } @override @@ -268,42 +224,7 @@ mixin RowState implements IPlutoGridState { List rows, { bool notify = true, }) { - if (rows.isEmpty) { - return; - } - - if (rowIdx < 0 || refRows.length < rowIdx) { - return; - } - - if (hasSortedColumn) { - final originalRowIdx = page > 1 ? rowIdx + (page - 1) * pageSize : rowIdx; - - final int? sortIdx = refRows.originalList[originalRowIdx].sortIdx; - - PlutoGridStateManager.initializeRows( - refColumns, - rows, - start: sortIdx ?? 0, - ); - - for (int i = 0; i < refRows.originalLength; i += 1) { - if (sortIdx! <= refRows.originalList[i].sortIdx!) { - refRows.originalList[i].sortIdx = - refRows.originalList[i].sortIdx! + rows.length; - } - } - - _insertRows(rowIdx, rows, state: PlutoRowState.added); - } else { - _insertRows(rowIdx, rows, state: PlutoRowState.added); - - PlutoGridStateManager.initializeRows( - refColumns, - refRows.originalList, - forceApplySortIdx: true, - ); - } + _insertRows(rowIdx, rows); /// Update currentRowIdx if (currentCell != null) { @@ -324,9 +245,7 @@ mixin RowState implements IPlutoGridState { ); } - if (notify) { - notifyListeners(); - } + notifyListeners(notify, insertRows.hashCode); } @override @@ -338,31 +257,7 @@ mixin RowState implements IPlutoGridState { @override void prependRows(List rows) { - if (rows.isEmpty) { - return; - } - - final minSortIdx = (refRows.isNotEmpty - ? refRows.first.sortIdx == null - ? 0 - : refRows.first.sortIdx! - : 0); - - final start = minSortIdx - rows.length; - - for (final element in refRows.originalList) { - if (element.sortIdx != null && element.sortIdx! < minSortIdx) { - element.sortIdx = element.sortIdx! - rows.length; - } - } - - PlutoGridStateManager.initializeRows( - refColumns, - rows, - start: start, - ); - - _insertRows(0, rows, state: PlutoRowState.added); + _insertRows(0, rows); /// Update currentRowIdx if (currentCell != null) { @@ -390,7 +285,7 @@ mixin RowState implements IPlutoGridState { ); } - notifyListeners(); + notifyListeners(true, prependRows.hashCode); } @override @@ -402,31 +297,9 @@ mixin RowState implements IPlutoGridState { @override void appendRows(List rows) { - if (rows.isEmpty) { - return; - } - - final start = refRows.isNotEmpty - ? refRows.last.sortIdx == null - ? 1 - : refRows.last.sortIdx! + 1 - : 0; - - for (final element in refRows.originalList) { - if (element.sortIdx != null && element.sortIdx! > start - 1) { - element.sortIdx = element.sortIdx! + rows.length; - } - } - - PlutoGridStateManager.initializeRows( - refColumns, - rows, - start: start, - ); + _insertRows(refRows.length, rows); - _insertRows(refRows.length, rows, state: PlutoRowState.added); - - notifyListeners(); + notifyListeners(true, appendRows.hashCode); } @override @@ -435,11 +308,15 @@ mixin RowState implements IPlutoGridState { return; } - refRows.removeAt(currentRowIdx!); + if (enabledRowGroups) { + removeRowAndGroupByKey([currentRow!.key]); + } else { + refRows.removeAt(currentRowIdx!); + } resetCurrentState(notify: false); - notifyListeners(); + notifyListeners(true, removeCurrentRow.hashCode); } @override @@ -469,7 +346,11 @@ mixin RowState implements IPlutoGridState { .key; } - refRows.removeWhereFromOriginal((row) => removeKeys.contains(row.key)); + if (enabledRowGroups) { + removeRowAndGroupByKey(removeKeys); + } else { + refRows.removeWhereFromOriginal((row) => removeKeys.contains(row.key)); + } updateCurrentCellPosition(notify: false); @@ -477,9 +358,7 @@ mixin RowState implements IPlutoGridState { currentSelectingRows.removeWhere((row) => removeKeys.contains(row.key)); - if (notify) { - notifyListeners(); - } + notifyListeners(notify, removeRows.hashCode); } @override @@ -492,9 +371,7 @@ mixin RowState implements IPlutoGridState { resetCurrentState(notify: false); - if (notify) { - notifyListeners(); - } + notifyListeners(notify, removeAllRows.hashCode); } @override @@ -514,7 +391,7 @@ mixin RowState implements IPlutoGridState { int? indexToMove, { bool notify = true, }) { - if (indexToMove == null) { + if (rows.isEmpty || indexToMove == null) { return; } @@ -522,18 +399,17 @@ mixin RowState implements IPlutoGridState { indexToMove = refRows.length - rows.length; } - for (final row in rows) { - refRows.removeFromOriginal(row); + if (isPaginated && + page > 1 && + indexToMove + pageRangeFrom > refRows.originalLength - 1) { + indexToMove = refRows.originalLength - 1; } - final originalRowIdx = - page > 1 ? indexToMove + (page - 1) * pageSize : indexToMove; + final Set removeKeys = Set.from(rows.map((e) => e.key)); - if (originalRowIdx >= refRows.originalLength) { - refRows.addAll(rows.cast()); - } else { - refRows.insertAll(indexToMove, rows.cast()); - } + refRows.removeWhereFromOriginal((e) => removeKeys.contains(e.key)); + + refRows.insertAll(indexToMove, rows); int sortIdx = 0; @@ -550,9 +426,7 @@ mixin RowState implements IPlutoGridState { )); } - if (notify) { - notifyListeners(); - } + notifyListeners(notify, moveRowsByIndex.hashCode); } @override @@ -560,45 +434,105 @@ mixin RowState implements IPlutoGridState { bool? flag, { bool notify = true, }) { - for (final row in refRows) { + for (final row in iterateRowAndGroup) { row.setChecked(flag == true); } - if (notify) { - notifyListeners(); - } + notifyListeners(notify, toggleAllRowChecked.hashCode); } - void _insertRows( - int index, - List rows, { - PlutoRowState? state, - }) { + void _insertRows(int index, List rows) { if (rows.isEmpty) { return; } - if (state != null) { + int safetyIndex = _getSafetyIndexForInsert(index); + + if (enabledRowGroups) { + insertRowGroup(safetyIndex, rows); + } else { + final bool append = index >= refRows.length; + final targetIdx = append ? refRows.length - 1 : safetyIndex; + final target = refRows.isEmpty ? null : refRows[targetIdx]; + + _setSortIdx(rows: rows, start: target?.sortIdx ?? 0); + + if (hasSortedColumn) { + _increaseSortIdxGreaterThanOrEqual( + rows: refRows.originalList, + compare: target?.sortIdx ?? 0, + increase: rows.length, + ); + } else { + _increaseSortIdx( + rows: refRows.originalList, + start: target == null ? 0 : refRows.originalList.indexOf(target), + increase: rows.length, + ); + } + for (final row in rows) { - row.setState(state); + row.setState(PlutoRowState.added); } - } - final originalRowIdx = page > 1 ? index + (page - 1) * pageSize : index; + refRows.insertAll(safetyIndex, rows); - if (originalRowIdx >= refRows.originalLength) { - refRows.addAll(rows.cast()); - } else { - refRows.insertAll(index, rows.cast()); + PlutoGridStateManager.initializeRows( + refColumns, + rows, + forceApplySortIdx: false, + ); } if (isPaginated) { - setPage(page, notify: false); + resetPage(notify: false); } } - @override - void setRowColorCallback(PlutoRowColorCallback? rowColorCallback) { - _rowColorCallback = rowColorCallback; + int _getSafetyIndexForInsert(int index) { + if (index < 0) { + return 0; + } + + if (index > refRows.length) { + return refRows.length; + } + + return index; + } + + void _setSortIdx({ + required List rows, + int start = 0, + }) { + for (final row in rows) { + row.sortIdx = start++; + } + } + + void _increaseSortIdx({ + required List rows, + int start = 0, + int increase = 1, + }) { + final length = rows.length; + + for (int i = start; i < length; i += 1) { + rows[i].sortIdx += increase; + } + } + + void _increaseSortIdxGreaterThanOrEqual({ + required List rows, + int compare = 0, + int increase = 1, + }) { + for (final row in rows) { + if (row.sortIdx < compare) { + continue; + } + + row.sortIdx += increase; + } } } diff --git a/lib/src/manager/state/scroll_state.dart b/lib/src/manager/state/scroll_state.dart index 4fe6fbbb6..4f9d1d4d0 100644 --- a/lib/src/manager/state/scroll_state.dart +++ b/lib/src/manager/state/scroll_state.dart @@ -3,7 +3,7 @@ import 'package:pluto_grid/pluto_grid.dart'; abstract class IScrollState { /// Controller to control the scrolling of the grid. - PlutoGridScrollController? get scroll; + PlutoGridScrollController get scroll; bool get isHorizontalOverScrolled; @@ -11,8 +11,6 @@ abstract class IScrollState { Offset get directionalScrollEdgeOffset; - void setScroll(PlutoGridScrollController scroll); - Offset toDirectionalOffset(Offset offset); /// [direction] Scroll direction @@ -41,34 +39,24 @@ abstract class IScrollState { } mixin ScrollState implements IPlutoGridState { - @override - PlutoGridScrollController? get scroll => _scroll; - - PlutoGridScrollController? _scroll; - @override bool get isHorizontalOverScrolled => - scroll!.bodyRowsHorizontal!.offset > scroll!.maxScrollHorizontal || - scroll!.bodyRowsHorizontal!.offset < 0; + scroll.bodyRowsHorizontal!.offset > scroll.maxScrollHorizontal || + scroll.bodyRowsHorizontal!.offset < 0; @override double get correctHorizontalOffset { if (isHorizontalOverScrolled) { - return scroll!.horizontalOffset < 0 ? 0 : scroll!.maxScrollHorizontal; + return scroll.horizontalOffset < 0 ? 0 : scroll.maxScrollHorizontal; } - return scroll!.horizontalOffset; + return scroll.horizontalOffset; } @override Offset get directionalScrollEdgeOffset => isLTR ? Offset.zero : Offset(gridGlobalOffset!.dx, 0); - @override - void setScroll(PlutoGridScrollController? scroll) { - _scroll = scroll; - } - @override Offset toDirectionalOffset(Offset offset) { if (isLTR) { @@ -84,9 +72,9 @@ mixin ScrollState implements IPlutoGridState { @override void scrollByDirection(PlutoMoveDirection direction, double offset) { if (direction.vertical) { - _scroll!.vertical!.jumpTo(offset); + scroll.vertical!.jumpTo(offset); } else { - _scroll!.horizontal!.jumpTo(offset); + scroll.horizontal!.jumpTo(offset); } } @@ -107,7 +95,7 @@ mixin ScrollState implements IPlutoGridState { final double rowSize = rowTotalHeight; - final double screenOffset = _scroll!.verticalOffset + + final double screenOffset = scroll.verticalOffset + columnRowContainerHeight - columnGroupHeight - columnHeight - @@ -118,7 +106,7 @@ mixin ScrollState implements IPlutoGridState { double offsetToMove = direction.isUp ? (rowIdx! - 1) * rowSize : (rowIdx! + 1) * rowSize; - final bool inScrollStart = _scroll!.verticalOffset <= offsetToMove; + final bool inScrollStart = scroll.verticalOffset <= offsetToMove; final bool inScrollEnd = offsetToMove + rowSize <= screenOffset; @@ -126,7 +114,7 @@ mixin ScrollState implements IPlutoGridState { return; } else if (inScrollEnd == false) { offsetToMove = - _scroll!.verticalOffset + offsetToMove + rowSize - screenOffset; + scroll.verticalOffset + offsetToMove + rowSize - screenOffset; } scrollByDirection(direction, offsetToMove); @@ -157,25 +145,24 @@ mixin ScrollState implements IPlutoGridState { : maxWidth; if (direction.isRight) { - if (offsetToMove > _scroll!.horizontal!.offset) { + if (offsetToMove > scroll.horizontal!.offset) { offsetToMove -= screenOffset!; offsetToMove += columnToMove.width; offsetToMove += scrollOffsetByFrozenColumn; - if (offsetToMove < _scroll!.horizontal!.offset) { + if (offsetToMove < scroll.horizontal!.offset) { return; } } } else { final offsetToNeed = offsetToMove + columnToMove.width; - final currentOffset = screenOffset! + _scroll!.horizontal!.offset; + final currentOffset = screenOffset! + scroll.horizontal!.offset; if (offsetToNeed > currentOffset) { - offsetToMove = - _scroll!.horizontal!.offset + offsetToNeed - currentOffset; + offsetToMove = scroll.horizontal!.offset + offsetToNeed - currentOffset; offsetToMove += scrollOffsetByFrozenColumn; - } else if (offsetToMove > _scroll!.horizontal!.offset) { + } else if (offsetToMove > scroll.horizontal!.offset) { return; } } @@ -204,12 +191,12 @@ mixin ScrollState implements IPlutoGridState { @override void updateCorrectScrollOffset() { WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - if (scroll?.bodyRowsHorizontal?.hasClients != true) { + if (scroll.bodyRowsHorizontal?.hasClients != true) { return; } if (isHorizontalOverScrolled) { - scroll!.horizontal!.animateTo( + scroll.horizontal!.animateTo( correctHorizontalOffset, curve: Curves.ease, duration: const Duration(milliseconds: 300), @@ -221,13 +208,13 @@ mixin ScrollState implements IPlutoGridState { @override void updateScrollViewport() { if (maxWidth == null || - scroll?.bodyRowsHorizontal?.position.hasViewportDimension != true) { + scroll.bodyRowsHorizontal?.position.hasViewportDimension != true) { return; } final double bodyWidth = maxWidth! - bodyLeftOffset - bodyRightOffset; - scroll!.horizontal!.applyViewportDimension(bodyWidth); + scroll.horizontal!.applyViewportDimension(bodyWidth); updateCorrectScrollOffset(); } @@ -237,12 +224,12 @@ mixin ScrollState implements IPlutoGridState { /// when resizing the screen. @override void resetScrollToZero() { - if ((scroll?.bodyRowsVertical?.offset ?? 0) <= 0) { - scroll?.bodyRowsVertical?.jumpTo(0); + if ((scroll.bodyRowsVertical?.offset ?? 0) <= 0) { + scroll.bodyRowsVertical?.jumpTo(0); } - if ((scroll?.bodyRowsHorizontal?.offset ?? 0) <= 0) { - scroll?.bodyRowsHorizontal?.jumpTo(0); + if ((scroll.bodyRowsHorizontal?.offset ?? 0) <= 0) { + scroll.bodyRowsHorizontal?.jumpTo(0); } } } diff --git a/lib/src/manager/state/selecting_state.dart b/lib/src/manager/state/selecting_state.dart index c2c96b3e3..b861f5395 100644 --- a/lib/src/manager/state/selecting_state.dart +++ b/lib/src/manager/state/selecting_state.dart @@ -79,22 +79,28 @@ abstract class ISelectingState { void handleAfterSelectingRow(PlutoCell cell, dynamic value); } -mixin SelectingState implements IPlutoGridState { - @override - bool get isSelecting => _isSelecting; - +class _State { bool _isSelecting = false; + PlutoGridSelectingMode _selectingMode = PlutoGridSelectingMode.cell; + + List _currentSelectingRows = []; + + PlutoGridCellPosition? _currentSelectingPosition; +} + +mixin SelectingState implements IPlutoGridState { + final _State _state = _State(); + @override - PlutoGridSelectingMode get selectingMode => _selectingMode; + bool get isSelecting => _state._isSelecting; - PlutoGridSelectingMode _selectingMode = PlutoGridSelectingMode.cell; + @override + PlutoGridSelectingMode get selectingMode => _state._selectingMode; @override PlutoGridCellPosition? get currentSelectingPosition => - _currentSelectingPosition; - - PlutoGridCellPosition? _currentSelectingPosition; + _state._currentSelectingPosition; @override List get currentSelectingPositionList { @@ -102,7 +108,7 @@ mixin SelectingState implements IPlutoGridState { return []; } - switch (_selectingMode) { + switch (selectingMode) { case PlutoGridSelectingMode.cell: return _selectingCells(); case PlutoGridSelectingMode.horizontal: @@ -114,17 +120,15 @@ mixin SelectingState implements IPlutoGridState { } @override - bool get hasCurrentSelectingPosition => _currentSelectingPosition != null; + bool get hasCurrentSelectingPosition => currentSelectingPosition != null; @override - List get currentSelectingRows => _currentSelectingRows; - - List _currentSelectingRows = []; + List get currentSelectingRows => _state._currentSelectingRows; @override String get currentSelectingText { final bool fromSelectingRows = - _selectingMode.isRow && _currentSelectingRows.isNotEmpty; + selectingMode.isRow && currentSelectingRows.isNotEmpty; final bool fromSelectingPosition = currentCellPosition != null && currentSelectingPosition != null; @@ -144,45 +148,41 @@ mixin SelectingState implements IPlutoGridState { @override void setSelecting(bool flag, {bool notify = true}) { - if (_selectingMode.isNone) { + if (selectingMode.isNone) { return; } - if (currentCell == null || _isSelecting == flag) { + if (currentCell == null || isSelecting == flag) { return; } - _isSelecting = flag; + _state._isSelecting = flag; if (isEditing == true) { setEditing(false, notify: false); } // Invalidates the previously selected row. - if (_isSelecting) { + if (isSelecting) { clearCurrentSelecting(notify: false); } - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setSelecting.hashCode); } @override void setSelectingMode(PlutoGridSelectingMode mode, {bool notify = true}) { - if (_selectingMode == mode) { + if (selectingMode == mode) { return; } - _currentSelectingRows = []; + _state._currentSelectingRows = []; - _currentSelectingPosition = null; + _state._currentSelectingPosition = null; - _selectingMode = mode; + _state._selectingMode = mode; - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setSelectingMode.hashCode); } @override @@ -191,7 +191,7 @@ mixin SelectingState implements IPlutoGridState { return; } - switch (_selectingMode) { + switch (selectingMode) { case PlutoGridSelectingMode.cell: case PlutoGridSelectingMode.horizontal: _setFistCellAsCurrent(); @@ -208,7 +208,7 @@ mixin SelectingState implements IPlutoGridState { _setFistCellAsCurrent(); } - _currentSelectingPosition = PlutoGridCellPosition( + _state._currentSelectingPosition = PlutoGridCellPosition( columnIdx: refColumns.length - 1, rowIdx: refRows.length - 1, ); @@ -226,28 +226,26 @@ mixin SelectingState implements IPlutoGridState { PlutoGridCellPosition? cellPosition, bool notify = true, }) { - if (_selectingMode.isNone) { + if (selectingMode.isNone) { return; } - if (_currentSelectingPosition == cellPosition) { + if (currentSelectingPosition == cellPosition) { return; } - _currentSelectingPosition = + _state._currentSelectingPosition = isInvalidCellPosition(cellPosition) ? null : cellPosition; - if (_currentSelectingPosition != null && _selectingMode.isRow) { + if (currentSelectingPosition != null && selectingMode.isRow) { setCurrentSelectingRowsByRange( currentRowIdx, - _currentSelectingPosition!.rowIdx, + currentSelectingPosition!.rowIdx, notify: false, ); } - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setCurrentSelectingPosition.hashCode); } @override @@ -280,7 +278,7 @@ mixin SelectingState implements IPlutoGridState { double currentCellOffsetDy = (currentRowIdx! * rowTotalHeight) + gridBodyOffsetDy - - scroll!.vertical!.offset; + scroll.vertical!.offset; if (gridBodyOffsetDy > offset!.dy) { return; @@ -298,7 +296,7 @@ mixin SelectingState implements IPlutoGridState { final columnIndexes = columnIndexesByShowFrozen; final savedRightBlankOffset = rightBlankOffset; - final savedHorizontalScrollOffset = scroll!.horizontal!.offset; + final savedHorizontalScrollOffset = scroll.horizontal!.offset; for (int i = 0; i < columnIndexes.length; i += 1) { final column = refColumns[columnIndexes[i]]; @@ -330,7 +328,7 @@ mixin SelectingState implements IPlutoGridState { @override void setCurrentSelectingRowsByRange(int? from, int? to, {bool notify = true}) { - if (!_selectingMode.isRow) { + if (!selectingMode.isRow) { return; } @@ -342,23 +340,23 @@ mixin SelectingState implements IPlutoGridState { return; } - _currentSelectingRows = refRows.getRange(maxFrom, maxTo).toList(); + _state._currentSelectingRows = refRows.getRange(maxFrom, maxTo).toList(); - if (notify) { - notifyListeners(); - } + notifyListeners(notify, setCurrentSelectingRowsByRange.hashCode); } @override void clearCurrentSelecting({bool notify = true}) { - _clearCurrentSelectingPosition(notify: notify); + _clearCurrentSelectingPosition(notify: false); + + _clearCurrentSelectingRows(notify: false); - _clearCurrentSelectingRows(notify: notify); + notifyListeners(notify, clearCurrentSelecting.hashCode); } @override void toggleSelectingRow(int? rowIdx, {notify = true}) { - if (!_selectingMode.isRow) { + if (!selectingMode.isRow) { return; } @@ -368,22 +366,20 @@ mixin SelectingState implements IPlutoGridState { final PlutoRow row = refRows[rowIdx]; - final keys = Set.from(_currentSelectingRows.map((e) => e.key)); + final keys = Set.from(currentSelectingRows.map((e) => e.key)); if (keys.contains(row.key)) { - _currentSelectingRows.removeWhere((element) => element.key == row.key); + currentSelectingRows.removeWhere((element) => element.key == row.key); } else { - _currentSelectingRows.add(row); + currentSelectingRows.add(row); } - if (notify) { - notifyListeners(); - } + notifyListeners(notify, toggleSelectingRow.hashCode); } @override bool isSelectingInteraction() { - return !_selectingMode.isNone && + return !selectingMode.isNone && (keyPressed.shift || keyPressed.ctrl) && currentCell != null; } @@ -391,12 +387,12 @@ mixin SelectingState implements IPlutoGridState { @override bool isSelectedRow(Key? rowKey) { if (rowKey == null || - !_selectingMode.isRow || - _currentSelectingRows.isEmpty) { + !selectingMode.isRow || + currentSelectingRows.isEmpty) { return false; } - return _currentSelectingRows.firstWhereOrNull( + return currentSelectingRows.firstWhereOrNull( (element) => element.key == rowKey, ) != null; @@ -405,7 +401,7 @@ mixin SelectingState implements IPlutoGridState { // todo : code cleanup @override bool isSelectedCell(PlutoCell cell, PlutoColumn column, int rowIdx) { - if (_selectingMode.isNone) { + if (selectingMode.isNone) { return false; } @@ -413,17 +409,21 @@ mixin SelectingState implements IPlutoGridState { return false; } - if (_currentSelectingPosition == null) { + if (currentSelectingPosition == null) { return false; } - if (_selectingMode.isCell) { - final bool inRangeOfRows = min(currentCellPosition!.rowIdx as num, - _currentSelectingPosition!.rowIdx as num) <= + if (selectingMode.isCell) { + final bool inRangeOfRows = min( + currentCellPosition!.rowIdx as num, + currentSelectingPosition!.rowIdx as num, + ) <= rowIdx && rowIdx <= - max(currentCellPosition!.rowIdx!, - _currentSelectingPosition!.rowIdx!); + max( + currentCellPosition!.rowIdx!, + currentSelectingPosition!.rowIdx!, + ); if (inRangeOfRows == false) { return false; @@ -435,24 +435,32 @@ mixin SelectingState implements IPlutoGridState { return false; } - final bool inRangeOfColumns = min(currentCellPosition!.columnIdx as num, - currentSelectingPosition!.columnIdx as num) <= + final bool inRangeOfColumns = min( + currentCellPosition!.columnIdx as num, + currentSelectingPosition!.columnIdx as num, + ) <= columnIdx && columnIdx <= - max(currentCellPosition!.columnIdx!, - currentSelectingPosition!.columnIdx!); + max( + currentCellPosition!.columnIdx!, + currentSelectingPosition!.columnIdx!, + ); if (inRangeOfColumns == false) { return false; } return true; - } else if (_selectingMode.isHorizontal) { - int startRowIdx = - min(currentCellPosition!.rowIdx!, _currentSelectingPosition!.rowIdx!); + } else if (selectingMode.isHorizontal) { + int startRowIdx = min( + currentCellPosition!.rowIdx!, + currentSelectingPosition!.rowIdx!, + ); - int endRowIdx = - max(currentCellPosition!.rowIdx!, _currentSelectingPosition!.rowIdx!); + int endRowIdx = max( + currentCellPosition!.rowIdx!, + currentSelectingPosition!.rowIdx!, + ); final int? columnIdx = columnIndex(column); @@ -464,18 +472,22 @@ mixin SelectingState implements IPlutoGridState { int? endColumnIdx; - if (currentCellPosition!.rowIdx! < _currentSelectingPosition!.rowIdx!) { + if (currentCellPosition!.rowIdx! < currentSelectingPosition!.rowIdx!) { startColumnIdx = currentCellPosition!.columnIdx; - endColumnIdx = _currentSelectingPosition!.columnIdx; + endColumnIdx = currentSelectingPosition!.columnIdx; } else if (currentCellPosition!.rowIdx! > - _currentSelectingPosition!.rowIdx!) { - startColumnIdx = _currentSelectingPosition!.columnIdx; + currentSelectingPosition!.rowIdx!) { + startColumnIdx = currentSelectingPosition!.columnIdx; endColumnIdx = currentCellPosition!.columnIdx; } else { - startColumnIdx = min(currentCellPosition!.columnIdx!, - _currentSelectingPosition!.columnIdx!); - endColumnIdx = max(currentCellPosition!.columnIdx!, - _currentSelectingPosition!.columnIdx!); + startColumnIdx = min( + currentCellPosition!.columnIdx!, + currentSelectingPosition!.columnIdx!, + ); + endColumnIdx = max( + currentCellPosition!.columnIdx!, + currentSelectingPosition!.columnIdx!, + ); } if (rowIdx == startRowIdx && startRowIdx == endRowIdx) { @@ -489,7 +501,7 @@ mixin SelectingState implements IPlutoGridState { } return false; - } else if (_selectingMode.isRow) { + } else if (selectingMode.isRow) { return false; } else { throw Exception('selectingMode is not handled'); @@ -508,7 +520,7 @@ mixin SelectingState implements IPlutoGridState { setKeepFocus(true, notify: false); - notifyListeners(); + notifyListeners(true, handleAfterSelectingRow.hashCode); } List _selectingCells() { @@ -596,7 +608,7 @@ mixin SelectingState implements IPlutoGridState { List rowText = []; - for (final row in _currentSelectingRows) { + for (final row in currentSelectingRows) { List columnText = []; for (int i = 0; i < columnIndexes.length; i += 1) { @@ -656,11 +668,11 @@ mixin SelectingState implements IPlutoGridState { } void _clearCurrentSelectingPosition({bool notify = true}) { - if (_currentSelectingPosition == null) { + if (currentSelectingPosition == null) { return; } - _currentSelectingPosition = null; + _state._currentSelectingPosition = null; if (notify) { notifyListeners(); @@ -668,11 +680,11 @@ mixin SelectingState implements IPlutoGridState { } void _clearCurrentSelectingRows({bool notify = true}) { - if (_currentSelectingRows.isEmpty) { + if (currentSelectingRows.isEmpty) { return; } - _currentSelectingRows = []; + _state._currentSelectingRows = []; if (notify) { notifyListeners(); diff --git a/lib/src/manager/state/visibility_layout_state.dart b/lib/src/manager/state/visibility_layout_state.dart index 7ae7234f6..2a7266f41 100644 --- a/lib/src/manager/state/visibility_layout_state.dart +++ b/lib/src/manager/state/visibility_layout_state.dart @@ -77,7 +77,7 @@ mixin VisibilityLayoutState implements IPlutoGridState { updateScrollViewport(); if (notify) { - scroll?.horizontal?.notifyListeners(); + scroll.horizontal?.notifyListeners(); } } } diff --git a/lib/src/model/pluto_cell.dart b/lib/src/model/pluto_cell.dart index 6aa8a111f..510ecc4d3 100644 --- a/lib/src/model/pluto_cell.dart +++ b/lib/src/model/pluto_cell.dart @@ -1,21 +1,56 @@ import 'package:flutter/material.dart'; - -import 'pluto_column.dart'; -import 'pluto_row.dart'; +import 'package:pluto_grid/pluto_grid.dart'; class PlutoCell { PlutoCell({ dynamic value, - }) : _key = UniqueKey(), + Key? key, + }) : _key = key ?? UniqueKey(), _value = value; final Key _key; + dynamic _value; + + dynamic _valueForSorting; + + /// Set initial value according to [PlutoColumn] setting. + /// + /// [setColumn] is called when [PlutoGridStateManager.initializeRows] is called. + /// When [setColumn] is called, this value is changed to `true` according to the column setting. + /// If this value is `true` when the getter of [PlutoCell.value] is called, + /// it calls [_applyFormatOnInit] to update the value according to the format. + /// [_applyFormatOnInit] is called once, and if [setColumn] is not called again, + /// it is not called anymore. + bool _needToApplyFormatOnInit = false; + + PlutoColumn? _column; + + PlutoRow? _row; + Key get key => _key; - dynamic _value; + bool get initialized => _column != null && _row != null; + + PlutoColumn get column { + _assertUnInitializedCell(_column != null); - dynamic get value => _value; + return _column!; + } + + PlutoRow get row { + _assertUnInitializedCell(_row != null); + + return _row!; + } + + dynamic get value { + if (_needToApplyFormatOnInit) { + _applyFormatOnInit(); + } + + return _value; + } set value(dynamic changed) { if (_value == changed) { @@ -27,34 +62,49 @@ class PlutoCell { _valueForSorting = null; } - dynamic _valueForSorting; - dynamic get valueForSorting { _valueForSorting ??= _getValueForSorting(); return _valueForSorting; } - dynamic _getValueForSorting() { - _valueForSorting ??= _column.type.makeCompareValue(_value); - - return _valueForSorting; + void setColumn(PlutoColumn column) { + _column = column; + _valueForSorting = _getValueForSorting(); + _needToApplyFormatOnInit = _column?.type.applyFormatOnInit == true; } - PlutoColumn get column => _column; + void setRow(PlutoRow row) { + _row = row; + } - late PlutoColumn _column; + dynamic _getValueForSorting() { + if (_column == null) { + return _value; + } - void setColumn(PlutoColumn column) { - _column = column; - _valueForSorting = _getValueForSorting(); + return _column!.type.makeCompareValue(_value); } - PlutoRow get row => _row; + void _applyFormatOnInit() { + _value = _column!.type.applyFormat(_value); - late PlutoRow _row; + if (_column!.type is PlutoColumnTypeWithNumberFormat) { + _value = + (_column!.type as PlutoColumnTypeWithNumberFormat).toNumber(_value); + } - void setRow(PlutoRow row) { - _row = row; + _needToApplyFormatOnInit = false; } } + +_assertUnInitializedCell(bool flag) { + assert( + flag, + 'PlutoCell is not initialized.' + 'When adding a column or row, if it is not added through PlutoGridStateManager, ' + 'PlutoCell does not set the necessary information at runtime.' + 'If you add a column or row through PlutoGridStateManager and this error occurs, ' + 'please contact Github issue.', + ); +} diff --git a/lib/src/model/pluto_column_type.dart b/lib/src/model/pluto_column_type.dart index 64e807fff..f5b923ce2 100644 --- a/lib/src/model/pluto_column_type.dart +++ b/lib/src/model/pluto_column_type.dart @@ -525,11 +525,7 @@ mixin PlutoColumnTypeWithNumberFormat { } int compare(dynamic a, dynamic b) { - return _compareWithNull( - a, - b, - () => toNumber(a.toString()).compareTo(toNumber(b.toString())), - ); + return _compareWithNull(a, b, () => a.compareTo(b)); } dynamic makeCompareValue(dynamic v) { diff --git a/lib/src/model/pluto_row.dart b/lib/src/model/pluto_row.dart index 61b6433b8..ddf8db7dc 100644 --- a/lib/src/model/pluto_row.dart +++ b/lib/src/model/pluto_row.dart @@ -2,33 +2,103 @@ import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; class PlutoRow { - Map cells; - - /// Value to maintain the default sort order when sorting columns. - /// If there is no value, it is automatically set when loading the grid. - int? sortIdx; - PlutoRow({ required this.cells, - this.sortIdx, + PlutoRowType? type, + this.sortIdx = 0, bool checked = false, Key? key, - }) : _checked = checked, + }) : type = type ?? PlutoRowTypeNormal.instance, + _checked = checked, _state = PlutoRowState.none, _key = key ?? UniqueKey(); + final PlutoRowType type; + + final Key _key; + + Map cells; + + /// Value to maintain the default sort order when sorting columns. + /// If there is no value, it is automatically set when loading the grid. + int sortIdx; + + bool? _checked; + + PlutoRow? _parent; + + PlutoRowState _state; + + Key get key => _key; + + bool get initialized { + if (cells.isEmpty) { + return true; + } + + return cells.values.first.initialized; + } + + PlutoRow? get parent => _parent; + + int get depth { + int depth = 0; + var current = parent; + while (current != null) { + depth += 1; + current = current.parent; + } + return depth; + } + + bool get isMain => parent == null; + /// The state value that the checkbox is checked. /// If the enableRowChecked value of the [PlutoColumn] property is set to true, /// a check box appears in the cell of the corresponding column. /// To manually change the values at runtime, /// use the PlutoStateManager.setRowChecked /// or PlutoStateManager.toggleAllRowChecked methods. - bool? get checked => _checked; + bool? get checked { + return type.isGroup ? _tristateCheckedRow : _checked; + } - bool? _checked; + bool? get _tristateCheckedRow { + if (!type.isGroup) return false; - void setChecked(bool? flag) { - _checked = flag; + final children = type.group.children; + + final length = children.length; + + if (length == 0) return _checked; + + int countTrue = 0; + + int countFalse = 0; + + int countTristate = 0; + + for (var i = 0; i < length; i += 1) { + if (children[i].type.isGroup) { + switch (children[i]._tristateCheckedRow) { + case true: + ++countTrue; + break; + case false: + ++countFalse; + break; + case null: + ++countTristate; + break; + } + } else { + children[i].checked == true ? ++countTrue : ++countFalse; + } + + if ((countTrue > 0 && countFalse > 0) || countTristate > 0) return null; + } + + return countTrue == length; } /// State when a new row is added or the cell value in the row is changed. @@ -41,15 +111,22 @@ class PlutoRow { /// Make sure it stays in the list unless you change the filtering again. PlutoRowState get state => _state; - PlutoRowState _state; + void setParent(PlutoRow? row) { + _parent = row; + } + + void setChecked(bool? flag) { + _checked = flag; + if (type.isGroup) { + for (final child in type.group.children) { + child.setChecked(flag); + } + } + } void setState(PlutoRowState state) { _state = state; } - - Key get key => _key; - - final Key _key; } enum PlutoRowState { diff --git a/lib/src/model/pluto_row_type.dart b/lib/src/model/pluto_row_type.dart new file mode 100644 index 000000000..57c51ee33 --- /dev/null +++ b/lib/src/model/pluto_row_type.dart @@ -0,0 +1,62 @@ +import 'package:pluto_grid/pluto_grid.dart'; + +abstract class PlutoRowType { + factory PlutoRowType.normal() { + return PlutoRowTypeNormal.instance; + } + + factory PlutoRowType.group({ + required FilteredList children, + bool expanded = false, + }) { + return PlutoRowTypeGroup( + children: children, + expanded: expanded, + ); + } +} + +extension PlutoRowTypeExtension on PlutoRowType { + bool get isNormal => this is PlutoRowTypeNormal; + + bool get isGroup => this is PlutoRowTypeGroup; + + PlutoRowTypeNormal get normal { + if (this is! PlutoRowTypeNormal) { + throw TypeError(); + } + + return this as PlutoRowTypeNormal; + } + + PlutoRowTypeGroup get group { + if (this is! PlutoRowTypeGroup) { + throw TypeError(); + } + + return this as PlutoRowTypeGroup; + } +} + +class PlutoRowTypeNormal implements PlutoRowType { + const PlutoRowTypeNormal(); + + static PlutoRowTypeNormal instance = const PlutoRowTypeNormal(); +} + +class PlutoRowTypeGroup implements PlutoRowType { + PlutoRowTypeGroup({ + required this.children, + bool expanded = false, + }) : _expanded = expanded; + + final FilteredList children; + + bool get expanded => _expanded; + + bool _expanded; + + void setExpanded(bool flag) { + _expanded = flag; + } +} diff --git a/lib/src/plugin/pluto_aggregate_column_footer.dart b/lib/src/plugin/pluto_aggregate_column_footer.dart index cc4848a55..93b100eec 100644 --- a/lib/src/plugin/pluto_aggregate_column_footer.dart +++ b/lib/src/plugin/pluto_aggregate_column_footer.dart @@ -30,6 +30,38 @@ enum PlutoAggregateColumnType { count, } +/// {@template pluto_aggregate_column_grouped_row_type} +/// When grouping row is applied, set the condition of row to be aggregated. +/// +/// [all] processes both groups and rows. +/// +/// [expandedAll] processes only the group and the children of the expanded group. +/// +/// [rows] processes non-group rows. +/// +/// [expandedRows] processes only expanded rows, not groups. +/// {@endtemplate} +enum PlutoAggregateColumnGroupedRowType { + all, + expandedAll, + rows, + expandedRows; + + bool get isAll => this == PlutoAggregateColumnGroupedRowType.all; + + bool get isExpandedAll => + this == PlutoAggregateColumnGroupedRowType.expandedAll; + + bool get isRows => this == PlutoAggregateColumnGroupedRowType.rows; + + bool get isExpandedRows => + this == PlutoAggregateColumnGroupedRowType.expandedRows; + + bool get isExpanded => isExpandedAll || isExpandedRows; + + bool get isRowsOnly => isRows || isExpandedRows; +} + /// Widget for outputting the sum, average, minimum, /// and maximum values of all values in a column. /// @@ -62,6 +94,9 @@ class PlutoAggregateColumnFooter extends PlutoStatefulWidget { /// {@macro pluto_aggregate_column_type} final PlutoAggregateColumnType type; + /// {@macro pluto_aggregate_column_grouped_row_type} + final PlutoAggregateColumnGroupedRowType groupedRowType; + /// {@macro pluto_aggregate_filter} /// /// Example) Only when the value of [PlutoCell.value] is Android, @@ -114,6 +149,7 @@ class PlutoAggregateColumnFooter extends PlutoStatefulWidget { const PlutoAggregateColumnFooter({ required this.rendererContext, required this.type, + this.groupedRowType = PlutoAggregateColumnGroupedRowType.all, this.filter, this.format = '#,###', this.locale, @@ -141,11 +177,35 @@ class PlutoAggregateColumnFooterState late final NumberFormat _numberFormat; late final num? Function({ - required List rows, + required Iterable rows, required PlutoColumn column, PlutoAggregateFilter? filter, }) _aggregator; + Iterable get rows { + if (!stateManager.enabledRowGroups) return stateManager.refRows; + + bool Function(PlutoRow)? filter; + Iterator? Function(PlutoRow)? childrenFilter; + + if (widget.groupedRowType.isRowsOnly) { + filter = (r) => !r.type.isGroup; + } + + if (widget.groupedRowType.isExpanded) { + childrenFilter = (r) => r.type.isGroup && r.type.group.expanded + ? r.type.group.children.iterator + : null; + } + + return PlutoRowGroupHelper.iterateWithFilter( + stateManager.iterateMainRowGroup, + iterateAll: false, + filter: filter, + childrenFilter: childrenFilter, + ); + } + @override void initState() { super.initState(); @@ -156,7 +216,19 @@ class PlutoAggregateColumnFooterState _setAggregator(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); + } + + @override + void updateState(PlutoNotifierEvent event) { + _aggregatedValue = update( + _aggregatedValue, + _aggregator( + rows: rows, + column: column, + filter: widget.filter, + ), + ); } void _setAggregator() { @@ -179,18 +251,6 @@ class PlutoAggregateColumnFooterState } } - @override - void updateState() { - _aggregatedValue = update( - _aggregatedValue, - _aggregator( - rows: stateManager.refRows, - column: column, - filter: widget.filter, - ), - ); - } - @override Widget build(BuildContext context) { final hasTitleSpan = widget.titleSpanBuilder != null; @@ -207,10 +267,7 @@ class PlutoAggregateColumnFooterState padding: widget.padding ?? PlutoGridSettings.columnTitlePadding, alignment: widget.alignment ?? AlignmentDirectional.centerStart, child: Text.rich( - TextSpan( - text: text, - children: children, - ), + TextSpan(text: text, children: children), style: stateManager.configuration.style.cellTextStyle.copyWith( decoration: TextDecoration.none, fontWeight: FontWeight.normal, diff --git a/lib/src/plugin/pluto_pagination.dart b/lib/src/plugin/pluto_pagination.dart index fc7498cda..d47c96d91 100644 --- a/lib/src/plugin/pluto_pagination.dart +++ b/lib/src/plugin/pluto_pagination.dart @@ -36,11 +36,11 @@ abstract class _PlutoPaginationStateWithChange stateManager.setPage(page, notify: false); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { page = update( page, stateManager.page, diff --git a/lib/src/pluto_grid.dart b/lib/src/pluto_grid.dart index ef1a7f6bf..bf946326f 100644 --- a/lib/src/pluto_grid.dart +++ b/lib/src/pluto_grid.dart @@ -68,6 +68,7 @@ class PlutoGrid extends PlutoStatefulWidget { this.rowColorCallback, this.columnMenuDelegate, this.configuration, + this.notifierFilterResolver, this.mode = PlutoGridMode.normal, }) : super(key: key); @@ -101,7 +102,7 @@ class PlutoGrid extends PlutoStatefulWidget { /// columns, /// fetchedRows, /// ).then((value) { - /// stateManager.refRows.addAll(FilteredList(initialList: value)); + /// stateManager.refRows.addAll(value); /// /// /// In this example, /// /// the loading screen is activated in the onLoaded callback when the grid is created. @@ -250,6 +251,8 @@ class PlutoGrid extends PlutoStatefulWidget { /// {@endtemplate} final PlutoGridConfiguration? configuration; + final PlutoChangeNotifierFilterResolver? notifierFilterResolver; + /// Execution mode of [PlutoGrid]. /// /// [PlutoGridMode.normal] @@ -382,10 +385,6 @@ class PlutoGridState extends PlutoStateWithChange { _gridFocusNode.dispose(); }); - WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - updateState(); - }); - super.initState(); } @@ -399,7 +398,7 @@ class PlutoGridState extends PlutoStateWithChange { } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _showColumnTitle = update( _showColumnTitle, stateManager.showColumnTitle, @@ -466,19 +465,20 @@ class PlutoGridState extends PlutoStateWithChange { horizontal: _horizontalScroll, ), columnGroups: widget.columnGroups, - mode: widget.mode, - onChangedEventCallback: widget.onChanged, - onSelectedEventCallback: widget.onSelected, - onSortedEventCallback: widget.onSorted, - onRowCheckedEventCallback: widget.onRowChecked, - onRowDoubleTapEventCallback: widget.onRowDoubleTap, - onRowSecondaryTapEventCallback: widget.onRowSecondaryTap, - onRowsMovedEventCallback: widget.onRowsMoved, - onRowColorCallback: widget.rowColorCallback, - columnMenuDelegate: widget.columnMenuDelegate, + onChanged: widget.onChanged, + onSelected: widget.onSelected, + onSorted: widget.onSorted, + onRowChecked: widget.onRowChecked, + onRowDoubleTap: widget.onRowDoubleTap, + onRowSecondaryTap: widget.onRowSecondaryTap, + onRowsMoved: widget.onRowsMoved, + rowColorCallback: widget.rowColorCallback, createHeader: widget.createHeader, createFooter: widget.createFooter, + columnMenuDelegate: widget.columnMenuDelegate, + notifierFilterResolver: widget.notifierFilterResolver, configuration: widget.configuration, + mode: widget.mode, ); // Dispose @@ -547,7 +547,7 @@ class PlutoGridState extends PlutoStateWithChange { } } - _stateManager.gridFocusNode!.requestFocus(); + _stateManager.gridFocusNode.requestFocus(); }); } @@ -591,152 +591,152 @@ class PlutoGridState extends PlutoStateWithChange { final bool showColumnFooter = _stateManager.showColumnFooter; - _stateManager.setTextDirection(Directionality.of(context)); - return FocusScope( onFocusChange: _stateManager.setKeepFocus, onKey: _handleGridFocusOnKey, - child: SafeArea( - child: _GridContainer( - stateManager: _stateManager, - child: CustomMultiChildLayout( - key: _stateManager.gridKey, - delegate: PlutoGridLayoutDelegate(_stateManager), - children: [ - /// Body columns and rows. + child: _GridContainer( + stateManager: _stateManager, + child: CustomMultiChildLayout( + key: _stateManager.gridKey, + delegate: PlutoGridLayoutDelegate( + _stateManager, + Directionality.of(context), + ), + children: [ + /// Body columns and rows. + LayoutId( + id: _StackName.bodyRows, + child: PlutoBodyRows(_stateManager), + ), + LayoutId( + id: _StackName.bodyColumns, + child: PlutoBodyColumns(_stateManager), + ), + + /// Body columns footer. + if (showColumnFooter) LayoutId( - id: _StackName.bodyRows, - child: PlutoBodyRows(_stateManager), + id: _StackName.bodyColumnFooters, + child: PlutoBodyColumnsFooter(stateManager), ), + + /// Left columns and rows. + if (showLeftFrozen) ...[ LayoutId( - id: _StackName.bodyColumns, - child: PlutoBodyColumns(_stateManager), + id: _StackName.leftFrozenColumns, + child: PlutoLeftFrozenColumns(_stateManager), + ), + LayoutId( + id: _StackName.leftFrozenRows, + child: PlutoLeftFrozenRows(_stateManager)), + LayoutId( + id: _StackName.leftFrozenDivider, + child: PlutoShadowLine( + axis: Axis.vertical, + color: style.gridBorderColor, + shadow: style.enableGridBorderShadow, + ), ), - - /// Body columns footer. if (showColumnFooter) LayoutId( - id: _StackName.bodyColumnFooters, - child: PlutoBodyColumnsFooter(stateManager), + id: _StackName.leftFrozenColumnFooters, + child: PlutoLeftFrozenColumnsFooter(stateManager), ), + ], - /// Left columns and rows. - if (showLeftFrozen) ...[ - LayoutId( - id: _StackName.leftFrozenColumns, - child: PlutoLeftFrozenColumns(_stateManager), - ), - LayoutId( - id: _StackName.leftFrozenRows, - child: PlutoLeftFrozenRows(_stateManager)), - LayoutId( - id: _StackName.leftFrozenDivider, - child: PlutoShadowLine( - axis: Axis.vertical, - color: style.gridBorderColor, - shadow: style.enableGridBorderShadow, - ), - ), - if (showColumnFooter) - LayoutId( - id: _StackName.leftFrozenColumnFooters, - child: PlutoLeftFrozenColumnsFooter(stateManager), - ), - ], - - /// Right columns and rows. - if (showRightFrozen) ...[ - LayoutId( - id: _StackName.rightFrozenColumns, - child: PlutoRightFrozenColumns(_stateManager), - ), - LayoutId( - id: _StackName.rightFrozenRows, - child: PlutoRightFrozenRows(_stateManager)), - LayoutId( - id: _StackName.rightFrozenDivider, - child: PlutoShadowLine( - axis: Axis.vertical, - color: style.gridBorderColor, - shadow: style.enableGridBorderShadow, - reverse: true, - ), + /// Right columns and rows. + if (showRightFrozen) ...[ + LayoutId( + id: _StackName.rightFrozenColumns, + child: PlutoRightFrozenColumns(_stateManager), + ), + LayoutId( + id: _StackName.rightFrozenRows, + child: PlutoRightFrozenRows(_stateManager)), + LayoutId( + id: _StackName.rightFrozenDivider, + child: PlutoShadowLine( + axis: Axis.vertical, + color: style.gridBorderColor, + shadow: style.enableGridBorderShadow, + reverse: true, ), - if (showColumnFooter) - LayoutId( - id: _StackName.rightFrozenColumnFooters, - child: PlutoRightFrozenColumnsFooter(stateManager), - ), - ], - - /// Column and row divider. - if (showColumnRowDivider) + ), + if (showColumnFooter) LayoutId( - id: _StackName.columnRowDivider, - child: PlutoShadowLine( - axis: Axis.horizontal, - color: style.gridBorderColor, - shadow: style.enableGridBorderShadow, - ), + id: _StackName.rightFrozenColumnFooters, + child: PlutoRightFrozenColumnsFooter(stateManager), ), + ], - /// Header and divider. - if (_stateManager.showHeader) ...[ - LayoutId( - id: _StackName.headerDivider, - child: PlutoShadowLine( - axis: Axis.horizontal, - color: style.gridBorderColor, - shadow: style.enableGridBorderShadow, - ), - ), - LayoutId( - id: _StackName.header, - child: _header!, + /// Column and row divider. + if (showColumnRowDivider) + LayoutId( + id: _StackName.columnRowDivider, + child: PlutoShadowLine( + axis: Axis.horizontal, + color: style.gridBorderColor, + shadow: style.enableGridBorderShadow, ), - ], + ), - /// Column footer divider. - if (showColumnFooter) - LayoutId( - id: _StackName.columnFooterDivider, - child: PlutoShadowLine( - axis: Axis.horizontal, - color: style.gridBorderColor, - shadow: style.enableGridBorderShadow, - ), + /// Header and divider. + if (_stateManager.showHeader) ...[ + LayoutId( + id: _StackName.headerDivider, + child: PlutoShadowLine( + axis: Axis.horizontal, + color: style.gridBorderColor, + shadow: style.enableGridBorderShadow, ), + ), + LayoutId( + id: _StackName.header, + child: _header!, + ), + ], - /// Footer and divider. - if (_stateManager.showFooter) ...[ - LayoutId( - id: _StackName.footerDivider, - child: PlutoShadowLine( - axis: Axis.horizontal, - color: style.gridBorderColor, - shadow: style.enableGridBorderShadow, - reverse: true, - ), - ), - LayoutId( - id: _StackName.footer, - child: _footer!, + /// Column footer divider. + if (showColumnFooter) + LayoutId( + id: _StackName.columnFooterDivider, + child: PlutoShadowLine( + axis: Axis.horizontal, + color: style.gridBorderColor, + shadow: style.enableGridBorderShadow, ), - ], + ), - /// Loading screen. - if (_stateManager.showLoading) - LayoutId( - id: _StackName.loading, - child: PlutoLoading( - backgroundColor: style.gridBackgroundColor, - indicatorColor: style.activatedBorderColor, - text: _stateManager.localeText.loadingText, - textStyle: style.cellTextStyle, - ), + /// Footer and divider. + if (_stateManager.showFooter) ...[ + LayoutId( + id: _StackName.footerDivider, + child: PlutoShadowLine( + axis: Axis.horizontal, + color: style.gridBorderColor, + shadow: style.enableGridBorderShadow, + reverse: true, ), + ), + LayoutId( + id: _StackName.footer, + child: _footer!, + ), ], - ), + + /// Loading screen. + if (_stateManager.showLoading) + LayoutId( + id: _StackName.loading, + child: PlutoLoading( + level: _stateManager.loadingLevel, + backgroundColor: style.gridBackgroundColor, + indicatorColor: style.activatedBorderColor, + text: _stateManager.localeText.loadingText, + textStyle: style.cellTextStyle, + ), + ), + ], ), ), ); @@ -746,15 +746,14 @@ class PlutoGridState extends PlutoStateWithChange { class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { final PlutoGridStateManager _stateManager; - PlutoGridLayoutDelegate(this._stateManager) + final TextDirection _textDirection; + + PlutoGridLayoutDelegate(this._stateManager, this._textDirection) : super(relayout: _stateManager.resizingChangeNotifier); @override void performLayout(Size size) { - if (_stateManager.showFrozenColumn != - _stateManager.shouldShowFrozenColumns(size.width)) { - _stateManager.notifyListenersOnPostFrame(); - } + _performLayoutOnPostFrame(size); _stateManager.setLayout(BoxConstraints.tight(size)); @@ -1084,9 +1083,24 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { } if (hasChild(_StackName.loading)) { + Size loadingSize; + + switch (_stateManager.loadingLevel) { + case PlutoGridLoadingLevel.grid: + loadingSize = size; + break; + case PlutoGridLoadingLevel.rows: + loadingSize = Size(size.width, 3); + positionChild( + _StackName.loading, + Offset(0, bodyRowsTopOffset), + ); + break; + } + layoutChild( _StackName.loading, - BoxConstraints.tight(size), + BoxConstraints.tight(loadingSize), ); } } @@ -1095,6 +1109,24 @@ class PlutoGridLayoutDelegate extends MultiChildLayoutDelegate { bool shouldRelayout(covariant MultiChildLayoutDelegate oldDelegate) { return true; } + + void _performLayoutOnPostFrame(Size size) { + bool update = false; + + if (_stateManager.showFrozenColumn != + _stateManager.shouldShowFrozenColumns(size.width)) { + update = true; + } + + if (_textDirection != _stateManager.textDirection) { + _stateManager.setTextDirection(_textDirection); + update = true; + } + + if (update) { + _stateManager.performLayoutOnPostFrame(); + } + } } class _GridContainer extends StatelessWidget { @@ -1341,6 +1373,15 @@ extension PlutoGridModeExtension on PlutoGridMode? { bool get isPopup => this == PlutoGridMode.popup; } +enum PlutoGridLoadingLevel { + grid, + rows; + + bool get isGrid => this == PlutoGridLoadingLevel.grid; + + bool get isRows => this == PlutoGridLoadingLevel.rows; +} + class PlutoGridSettings { /// If there is a frozen column, the minimum width of the body /// (if it is less than the value, the frozen column is released) diff --git a/lib/src/pluto_grid_configuration.dart b/lib/src/pluto_grid_configuration.dart index f7d4a86b5..007e6e725 100644 --- a/lib/src/pluto_grid_configuration.dart +++ b/lib/src/pluto_grid_configuration.dart @@ -129,6 +129,7 @@ class PlutoGridStyleConfig { this.checkedColor = const Color(0x11757575), this.cellColorInEditState = Colors.white, this.cellColorInReadOnlyState = const Color(0xFFDBDBDC), + this.cellColorGroupedRow, this.dragTargetColumnColor = const Color(0xFFDCF5FF), this.iconColor = Colors.black26, this.disabledIconColor = Colors.black12, @@ -158,6 +159,13 @@ class PlutoGridStyleConfig { this.columnResizeIcon = Icons.code_sharp, this.columnAscendingIcon, this.columnDescendingIcon, + this.rowGroupExpandedIcon = Icons.keyboard_arrow_down, + this.rowGroupCollapsedIcon = const IconData( + 0xe355, + matchTextDirection: true, + fontFamily: 'MaterialIcons', + ), + this.rowGroupEmptyIcon = Icons.noise_control_off, this.gridBorderRadius = BorderRadius.zero, this.gridPopupBorderRadius = BorderRadius.zero, }); @@ -177,6 +185,7 @@ class PlutoGridStyleConfig { this.checkedColor = const Color(0x11202020), this.cellColorInEditState = const Color(0xFF666666), this.cellColorInReadOnlyState = const Color(0xFF222222), + this.cellColorGroupedRow, this.dragTargetColumnColor = const Color(0xFF313131), this.iconColor = Colors.white38, this.disabledIconColor = Colors.white12, @@ -206,6 +215,13 @@ class PlutoGridStyleConfig { this.columnResizeIcon = Icons.code_sharp, this.columnAscendingIcon, this.columnDescendingIcon, + this.rowGroupExpandedIcon = Icons.keyboard_arrow_down, + this.rowGroupCollapsedIcon = const IconData( + 0xe355, + matchTextDirection: true, + fontFamily: 'MaterialIcons', + ), + this.rowGroupEmptyIcon = Icons.noise_control_off, this.gridBorderRadius = BorderRadius.zero, this.gridPopupBorderRadius = BorderRadius.zero, }); @@ -260,6 +276,9 @@ class PlutoGridStyleConfig { /// Cell color in read-only state final Color cellColorInReadOnlyState; + /// Background color of cells grouped by column. + final Color? cellColorGroupedRow; + /// The background color of the column to be dragged. /// When moving a column by dragging it. final Color dragTargetColumnColor; @@ -337,6 +356,15 @@ class PlutoGridStyleConfig { /// If no value is specified, the default icon is set. final Icon? columnDescendingIcon; + /// Icon when RowGroup is expanded. + final IconData rowGroupExpandedIcon; + + /// Icon when RowGroup is collapsed. + final IconData rowGroupCollapsedIcon; + + /// Icon when RowGroup is empty. + final IconData rowGroupEmptyIcon; + /// Apply the border radius of [PlutoGrid]. final BorderRadiusGeometry gridBorderRadius; @@ -358,6 +386,7 @@ class PlutoGridStyleConfig { Color? checkedColor, Color? cellColorInEditState, Color? cellColorInReadOnlyState, + PlutoOptional? cellColorGroupedRow, Color? dragTargetColumnColor, Color? iconColor, Color? disabledIconColor, @@ -379,6 +408,9 @@ class PlutoGridStyleConfig { IconData? columnResizeIcon, PlutoOptional? columnAscendingIcon, PlutoOptional? columnDescendingIcon, + IconData? rowGroupExpandedIcon, + IconData? rowGroupCollapsedIcon, + IconData? rowGroupEmptyIcon, BorderRadiusGeometry? gridBorderRadius, BorderRadiusGeometry? gridPopupBorderRadius, }) { @@ -405,6 +437,9 @@ class PlutoGridStyleConfig { cellColorInEditState: cellColorInEditState ?? this.cellColorInEditState, cellColorInReadOnlyState: cellColorInReadOnlyState ?? this.cellColorInReadOnlyState, + cellColorGroupedRow: cellColorGroupedRow == null + ? this.cellColorGroupedRow + : cellColorGroupedRow.value, dragTargetColumnColor: dragTargetColumnColor ?? this.dragTargetColumnColor, iconColor: iconColor ?? this.iconColor, @@ -434,6 +469,10 @@ class PlutoGridStyleConfig { columnDescendingIcon: columnDescendingIcon == null ? this.columnDescendingIcon : columnDescendingIcon.value, + rowGroupExpandedIcon: rowGroupExpandedIcon ?? this.rowGroupExpandedIcon, + rowGroupCollapsedIcon: + rowGroupCollapsedIcon ?? this.rowGroupCollapsedIcon, + rowGroupEmptyIcon: rowGroupEmptyIcon ?? this.rowGroupEmptyIcon, gridBorderRadius: gridBorderRadius ?? this.gridBorderRadius, gridPopupBorderRadius: gridPopupBorderRadius ?? this.gridPopupBorderRadius, diff --git a/lib/src/pluto_grid_date_picker.dart b/lib/src/pluto_grid_date_picker.dart index 8286c2ed3..0b4426cae 100644 --- a/lib/src/pluto_grid_date_picker.dart +++ b/lib/src/pluto_grid_date_picker.dart @@ -158,7 +158,9 @@ class PlutoGridDatePicker { for (var entry in rows[i].cells.entries) { if (rows[i].cells[entry.key]!.value == initDateString) { datePickerStateManager.setCurrentCell( - datePickerStateManager.refRows[i].cells[entry.key], i); + datePickerStateManager.refRows[i].cells[entry.key], + i, + ); break; } } @@ -434,9 +436,9 @@ abstract class _DateCellHeaderStateWithChange void initState() { super.initState(); - _scroll = stateManager.scroll!.horizontal!.addAndGet(); + _scroll = stateManager.scroll.horizontal!.addAndGet(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override @@ -447,7 +449,7 @@ abstract class _DateCellHeaderStateWithChange } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _currentCell = update( _currentCell, stateManager.currentCell, diff --git a/lib/src/ui/cells/pluto_default_cell.dart b/lib/src/ui/cells/pluto_default_cell.dart index 05523a81a..b81353216 100644 --- a/lib/src/ui/cells/pluto_default_cell.dart +++ b/lib/src/ui/cells/pluto_default_cell.dart @@ -41,15 +41,55 @@ class _PlutoDefaultCellState extends PlutoStateWithChange { @override PlutoGridStateManager get stateManager => widget.stateManager; + bool get _canExpand { + if (!widget.row.type.isGroup || !stateManager.enabledRowGroups) { + return false; + } + + return _isExpandableCell; + } + + bool get _isExpandableCell => + stateManager.rowGroupDelegate!.isExpandableCell(widget.cell); + + bool get _showSpacing { + if (!stateManager.enabledRowGroups || + !stateManager.rowGroupDelegate!.showFirstExpandableIcon) { + return false; + } + + if (_canExpand) return true; + + final parentCell = widget.row.parent?.cells[widget.column.field]; + + return parentCell != null && + stateManager.rowGroupDelegate!.isExpandableCell(parentCell); + } + + bool get _isEmptyGroup => widget.row.type.group.children.isEmpty; + + bool get _showGroupCount => + stateManager.enabledRowGroups && + _isExpandableCell && + widget.row.type.isGroup && + stateManager.rowGroupDelegate!.showCount; + + String get _groupCount => _compactCount + ? stateManager.rowGroupDelegate! + .compactNumber(widget.row.type.group.children.length) + : widget.row.type.group.children.length.toString(); + + bool get _compactCount => stateManager.rowGroupDelegate!.enableCompactCount; + @override void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _hasFocus = update( _hasFocus, stateManager.hasFocus, @@ -71,6 +111,12 @@ class _PlutoDefaultCellState extends PlutoStateWithChange { ); } + void _handleToggleExpandedRowGroup() { + stateManager.toggleExpandedRowGroup( + rowGroup: widget.row, + ); + } + @override Widget build(BuildContext context) { final cellWidget = _BuildDefaultCellWidget( @@ -81,33 +127,75 @@ class _PlutoDefaultCellState extends PlutoStateWithChange { cell: widget.cell, ); - return Row( - children: [ - if (_canRowDrag) - _RowDragIconWidget( - column: widget.column, - row: widget.row, - rowIdx: widget.rowIdx, - stateManager: stateManager, - feedbackWidget: cellWidget, - dragIcon: Icon( - Icons.drag_indicator, - size: stateManager.configuration.style.iconSize, - color: stateManager.configuration.style.iconColor, - ), + final style = stateManager.configuration.style; + + Widget? spacingWidget; + if (_showSpacing) { + if (widget.row.depth > 0) { + double gap = style.iconSize * 1.5; + double spacing = widget.row.depth * gap; + if (!widget.row.type.isGroup) spacing += gap; + spacingWidget = SizedBox(width: spacing); + } + } + + Widget? expandIcon; + if (_canExpand) { + expandIcon = IconButton( + onPressed: _isEmptyGroup ? null : _handleToggleExpandedRowGroup, + icon: _isEmptyGroup + ? Icon( + style.rowGroupEmptyIcon, + size: style.iconSize / 2, + color: style.iconColor, + ) + : widget.row.type.group.expanded + ? Icon( + style.rowGroupExpandedIcon, + size: style.iconSize, + color: style.iconColor, + ) + : Icon( + style.rowGroupCollapsedIcon, + size: style.iconSize, + color: style.iconColor, + ), + ); + } + + return Row(children: [ + if (_canRowDrag) + _RowDragIconWidget( + column: widget.column, + row: widget.row, + rowIdx: widget.rowIdx, + stateManager: stateManager, + feedbackWidget: cellWidget, + dragIcon: Icon( + Icons.drag_indicator, + size: style.iconSize, + color: style.iconColor, ), - if (widget.column.enableRowChecked) - _CheckboxSelectionWidget( - column: widget.column, - row: widget.row, - rowIdx: widget.rowIdx, - stateManager: stateManager, + ), + if (widget.column.enableRowChecked) + CheckboxSelectionWidget( + column: widget.column, + row: widget.row, + rowIdx: widget.rowIdx, + stateManager: stateManager, + ), + if (spacingWidget != null) spacingWidget, + if (expandIcon != null) expandIcon, + Expanded(child: cellWidget), + if (_showGroupCount) + Text( + '($_groupCount)', + style: stateManager.configuration.style.cellTextStyle.copyWith( + decoration: TextDecoration.none, + fontWeight: FontWeight.normal, ), - Expanded( - child: cellWidget, ), - ], - ); + ]); } } @@ -223,7 +311,7 @@ class _RowDragIconWidget extends StatelessWidget { } } -class _CheckboxSelectionWidget extends PlutoStatefulWidget { +class CheckboxSelectionWidget extends PlutoStatefulWidget { final PlutoGridStateManager stateManager; final PlutoColumn column; @@ -232,20 +320,22 @@ class _CheckboxSelectionWidget extends PlutoStatefulWidget { final int rowIdx; - const _CheckboxSelectionWidget({ + const CheckboxSelectionWidget({ required this.stateManager, required this.column, required this.row, required this.rowIdx, + super.key, }); @override - _CheckboxSelectionWidgetState createState() => - _CheckboxSelectionWidgetState(); + CheckboxSelectionWidgetState createState() => CheckboxSelectionWidgetState(); } -class _CheckboxSelectionWidgetState - extends PlutoStateWithChange<_CheckboxSelectionWidget> { +class CheckboxSelectionWidgetState + extends PlutoStateWithChange { + bool _tristate = false; + bool? _checked; @override @@ -255,14 +345,19 @@ class _CheckboxSelectionWidgetState void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { + _tristate = update( + _tristate, + stateManager.enabledRowGroups && widget.row.type.isGroup, + ); + _checked = update( _checked, - widget.row.checked == true, + _tristate ? widget.row.checked : widget.row.checked == true, ); } @@ -271,7 +366,15 @@ class _CheckboxSelectionWidgetState return; } - stateManager.setRowChecked(widget.row, changed == true); + if (_tristate) { + changed ??= false; + + if (_checked == null) changed = true; + } else { + changed = changed == true; + } + + stateManager.setRowChecked(widget.row, changed); if (stateManager.onRowChecked != null) { stateManager.onRowChecked!( @@ -293,6 +396,7 @@ class _CheckboxSelectionWidgetState return PlutoScaledCheckbox( value: _checked, handleOnChanged: _handleOnChanged, + tristate: _tristate, scale: 0.86, unselectedColor: stateManager.configuration.style.iconColor, activeColor: stateManager.configuration.style.activatedBorderColor, @@ -321,6 +425,34 @@ class _BuildDefaultCellWidget extends StatelessWidget { Key? key, }) : super(key: key); + bool get _showText { + if (!stateManager.enabledRowGroups) { + return true; + } + + return stateManager.rowGroupDelegate!.isExpandableCell(cell) || + stateManager.rowGroupDelegate!.isEditableCell(cell); + } + + String get _text { + if (!_showText) return ''; + + dynamic cellValue = cell.value; + + if (stateManager.enabledRowGroups && + stateManager.rowGroupDelegate!.showFirstExpandableIcon && + stateManager.rowGroupDelegate!.type.isByColumn) { + final delegate = + stateManager.rowGroupDelegate as PlutoRowGroupByColumnDelegate; + + if (row.depth < delegate.columns.length) { + cellValue = row.cells[delegate.columns[row.depth].field]!.value; + } + } + + return column.formattedValueForDisplay(cellValue); + } + @override Widget build(BuildContext context) { if (column.hasRenderer) { @@ -334,7 +466,7 @@ class _BuildDefaultCellWidget extends StatelessWidget { } return Text( - column.formattedValueForDisplay(cell.value), + _text, style: stateManager.configuration.style.cellTextStyle.copyWith( decoration: TextDecoration.none, fontWeight: FontWeight.normal, diff --git a/lib/src/ui/cells/text_cell.dart b/lib/src/ui/cells/text_cell.dart index 854b7f1f2..a61f0897a 100644 --- a/lib/src/ui/cells/text_cell.dart +++ b/lib/src/ui/cells/text_cell.dart @@ -54,7 +54,7 @@ mixin TextCellState on State implements TextFieldProps { cellFocus = FocusNode(onKey: _handleOnKey); - widget.stateManager.textEditingController = _textController; + widget.stateManager.setTextEditingController(_textController); _textController.text = formattedValue; @@ -89,7 +89,7 @@ mixin TextCellState on State implements TextFieldProps { if (!widget.stateManager.isEditing || widget.stateManager.currentColumn?.enableEditingMode != true) { - widget.stateManager.textEditingController = null; + widget.stateManager.setTextEditingController(null); } super.dispose(); diff --git a/lib/src/ui/columns/pluto_column_filter.dart b/lib/src/ui/columns/pluto_column_filter.dart index d7c8ce36b..03323bd61 100644 --- a/lib/src/ui/columns/pluto_column_filter.dart +++ b/lib/src/ui/columns/pluto_column_filter.dart @@ -91,7 +91,7 @@ class PlutoColumnFilterState extends PlutoStateWithChange { _event = stateManager.eventManager!.listener(_handleFocusFromRows); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override @@ -106,7 +106,7 @@ class PlutoColumnFilterState extends PlutoStateWithChange { } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _filterRows = update>( _filterRows, stateManager.filterRowsByField(widget.column.field), @@ -128,8 +128,6 @@ class PlutoColumnFilterState extends PlutoStateWithChange { } void _moveDown({required bool focusToPreviousCell}) { - _focusNode.unfocus(); - if (!focusToPreviousCell || stateManager.currentCell == null) { stateManager.setCurrentCell( stateManager.refRows.first.cells[widget.column.field], @@ -142,6 +140,8 @@ class PlutoColumnFilterState extends PlutoStateWithChange { stateManager.setKeepFocus(true, notify: false); + stateManager.gridFocusNode.requestFocus(); + stateManager.notifyListeners(); } @@ -185,6 +185,10 @@ class PlutoColumnFilterState extends PlutoStateWithChange { stateManager.showFilterPopup( _focusNode.context!, calledColumn: widget.column, + onClosed: () { + stateManager.setKeepFocus(true, notify: false); + _focusNode.requestFocus(); + }, ); } diff --git a/lib/src/ui/columns/pluto_column_title.dart b/lib/src/ui/columns/pluto_column_title.dart index c1693a8eb..d2885d660 100644 --- a/lib/src/ui/columns/pluto_column_title.dart +++ b/lib/src/ui/columns/pluto_column_title.dart @@ -57,11 +57,11 @@ class PlutoColumnTitleState extends PlutoStateWithChange { void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _sort = update( _sort, widget.column.sort, @@ -385,10 +385,7 @@ class _BuildColumnWidget extends StatelessWidget { child: Row( children: [ if (column.enableRowChecked) - _CheckboxAllSelectionWidget( - column: column, - stateManager: stateManager, - ), + CheckboxAllSelectionWidget(stateManager: stateManager), Expanded( child: _ColumnTextWidget( column: column, @@ -406,24 +403,19 @@ class _BuildColumnWidget extends StatelessWidget { } } -class _CheckboxAllSelectionWidget extends PlutoStatefulWidget { +class CheckboxAllSelectionWidget extends PlutoStatefulWidget { final PlutoGridStateManager stateManager; - final PlutoColumn? column; - - const _CheckboxAllSelectionWidget({ - required this.stateManager, - this.column, - Key? key, - }) : super(key: key); + const CheckboxAllSelectionWidget({required this.stateManager, Key? key}) + : super(key: key); @override - _CheckboxAllSelectionWidgetState createState() => - _CheckboxAllSelectionWidgetState(); + CheckboxAllSelectionWidgetState createState() => + CheckboxAllSelectionWidgetState(); } -class _CheckboxAllSelectionWidgetState - extends PlutoStateWithChange<_CheckboxAllSelectionWidget> { +class CheckboxAllSelectionWidgetState + extends PlutoStateWithChange { bool? _checked; @override @@ -433,11 +425,11 @@ class _CheckboxAllSelectionWidgetState void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _checked = update( _checked, stateManager.tristateCheckedRow, @@ -451,9 +443,7 @@ class _CheckboxAllSelectionWidgetState changed ??= false; - if (_checked == null) { - changed = true; - } + if (_checked == null) changed = true; stateManager.toggleAllRowChecked(changed); @@ -510,11 +500,11 @@ class _ColumnTextWidgetState extends PlutoStateWithChange<_ColumnTextWidget> { void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _isFilteredList = update( _isFilteredList, stateManager.isFilteredColumn(widget.column), diff --git a/lib/src/ui/miscellaneous/pluto_state_with_change.dart b/lib/src/ui/miscellaneous/pluto_state_with_change.dart index 1657c7f87..e83902304 100644 --- a/lib/src/ui/miscellaneous/pluto_state_with_change.dart +++ b/lib/src/ui/miscellaneous/pluto_state_with_change.dart @@ -18,6 +18,8 @@ abstract class PlutoStateWithChange extends State { late final StreamSubscription _subscription; + late final PlutoChangeNotifierFilter _filter; + bool _initialized = false; bool _changed = false; @@ -29,13 +31,20 @@ abstract class PlutoStateWithChange PlutoGridStateManager get stateManager; - void updateState() {} + void updateState(PlutoNotifierEvent event) {} @override void initState() { super.initState(); - _subscription = stateManager.streamNotifier.stream.listen(_onChange); + if (PlutoChangeNotifierFilter.enabled) { + _filter = stateManager.resolveNotifierFilter(); + _subscription = stateManager.streamNotifier.stream + .where(_filter.any) + .listen(_onChange); + } else { + _subscription = stateManager.streamNotifier.stream.listen(_onChange); + } _initialized = true; } @@ -64,13 +73,24 @@ abstract class PlutoStateWithChange return newValue; } + void forceUpdate() { + _changed = true; + } + void _onChange(PlutoNotifierEvent event) { - updateState(); + bool rebuild = false; + + updateState(event); if (mounted && _initialized && _changed && stateManager.maxWidth != null) { + rebuild = true; _changed = false; _statefulElement?.markNeedsBuild(); } + + if (PlutoChangeNotifierFilter.printDebug) { + _filter.printNotifierOnChange(event, rebuild); + } } } diff --git a/lib/src/ui/pluto_base_cell.dart b/lib/src/ui/pluto_base_cell.dart index 8d205c8e8..2e3a65aed 100644 --- a/lib/src/ui/pluto_base_cell.dart +++ b/lib/src/ui/pluto_base_cell.dart @@ -174,11 +174,11 @@ class _CellContainerState extends PlutoStateWithChange<_CellContainer> { void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { final style = stateManager.style; final isCurrentCell = stateManager.isCurrentCell(widget.cell); @@ -195,6 +195,8 @@ class _CellContainerState extends PlutoStateWithChange<_CellContainer> { widget.column, widget.rowIdx, ), + isGroupedRowCell: stateManager.enabledRowGroups && + stateManager.rowGroupDelegate!.isExpandableCell(widget.cell), enableCellVerticalBorder: style.enableCellBorderVertical, borderColor: style.borderColor, activatedBorderColor: style.activatedBorderColor, @@ -203,6 +205,7 @@ class _CellContainerState extends PlutoStateWithChange<_CellContainer> { gridBackgroundColor: style.gridBackgroundColor, cellColorInEditState: style.cellColorInEditState, cellColorInReadOnlyState: style.cellColorInReadOnlyState, + cellColorGroupedRow: style.cellColorGroupedRow, selectingMode: stateManager.selectingMode, ), ); @@ -235,6 +238,7 @@ class _CellContainerState extends PlutoStateWithChange<_CellContainer> { required bool isEditing, required bool isCurrentCell, required bool isSelectedCell, + required bool isGroupedRowCell, required bool enableCellVerticalBorder, required Color borderColor, required Color activatedBorderColor, @@ -243,6 +247,7 @@ class _CellContainerState extends PlutoStateWithChange<_CellContainer> { required Color gridBackgroundColor, required Color cellColorInEditState, required Color cellColorInReadOnlyState, + required Color? cellColorGroupedRow, required PlutoGridSelectingMode selectingMode, }) { if (isCurrentCell) { @@ -271,16 +276,17 @@ class _CellContainerState extends PlutoStateWithChange<_CellContainer> { ), ); } else { - return enableCellVerticalBorder - ? BoxDecoration( - border: BorderDirectional( + return BoxDecoration( + color: isGroupedRowCell ? cellColorGroupedRow : null, + border: enableCellVerticalBorder + ? BorderDirectional( end: BorderSide( color: borderColor, width: 1.0, ), - ), - ) - : const BoxDecoration(); + ) + : null, + ); } } @@ -328,13 +334,11 @@ class _BuildCellState extends PlutoStateWithChange<_BuildCell> { void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { - super.updateState(); - + void updateState(PlutoNotifierEvent event) { _showTypedCell = update( _showTypedCell, stateManager.isEditing && stateManager.isCurrentCell(widget.cell), diff --git a/lib/src/ui/pluto_base_column.dart b/lib/src/ui/pluto_base_column.dart index 00ad03e5f..61f651533 100644 --- a/lib/src/ui/pluto_base_column.dart +++ b/lib/src/ui/pluto_base_column.dart @@ -40,11 +40,11 @@ class PlutoBaseColumnState extends PlutoStateWithChange { void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _showColumnFilter = update( _showColumnFilter, stateManager.showColumnFilter, diff --git a/lib/src/ui/pluto_base_column_footer.dart b/lib/src/ui/pluto_base_column_footer.dart index 55739ae5d..b721882c9 100644 --- a/lib/src/ui/pluto_base_column_footer.dart +++ b/lib/src/ui/pluto_base_column_footer.dart @@ -21,7 +21,7 @@ class PlutoBaseColumnFooter extends StatelessWidget double get startPosition => column.startPosition; @override - bool get keepAlive => false; + bool get keepAlive => true; @override Widget build(BuildContext context) { diff --git a/lib/src/ui/pluto_base_row.dart b/lib/src/ui/pluto_base_row.dart index 7d26fb937..75caa41cb 100644 --- a/lib/src/ui/pluto_base_row.dart +++ b/lib/src/ui/pluto_base_row.dart @@ -91,7 +91,7 @@ class PlutoBaseRow extends StatelessWidget { stateManager: stateManager, columns: columns, ), - scrollController: stateManager.scroll!.bodyRowsHorizontal!, + scrollController: stateManager.scroll.bodyRowsHorizontal!, initialViewportDimension: MediaQuery.of(dragContext).size.width, textDirection: stateManager.textDirection, children: columns.map(_buildCell).toList(growable: false), @@ -215,11 +215,11 @@ class _RowContainerWidgetState extends PlutoStateWithChange<_RowContainerWidget> void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _decoration = update( _decoration, _getBoxDecoration(), diff --git a/lib/src/ui/pluto_body_columns.dart b/lib/src/ui/pluto_body_columns.dart index 181265420..95863a72f 100644 --- a/lib/src/ui/pluto_body_columns.dart +++ b/lib/src/ui/pluto_body_columns.dart @@ -35,9 +35,9 @@ class PlutoBodyColumnsState extends PlutoStateWithChange { void initState() { super.initState(); - _scroll = stateManager.scroll!.horizontal!.addAndGet(); + _scroll = stateManager.scroll.horizontal!.addAndGet(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override @@ -48,7 +48,7 @@ class PlutoBodyColumnsState extends PlutoStateWithChange { } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _showColumnGroups = update( _showColumnGroups, stateManager.showColumnGroups, @@ -60,12 +60,13 @@ class PlutoBodyColumnsState extends PlutoStateWithChange { compare: listEquals, ); - if (changed && _showColumnGroups == true) { - _columnGroups = stateManager.separateLinkedGroup( - columnGroupList: stateManager.refColumnGroups!, + _columnGroups = update>( + _columnGroups, + stateManager.separateLinkedGroup( + columnGroupList: stateManager.refColumnGroups, columns: _columns, - ); - } + ), + ); _itemCount = update(_itemCount, _getItemCount()); } @@ -90,7 +91,7 @@ class PlutoBodyColumnsState extends PlutoStateWithChange { stateManager: stateManager, columnGroup: e, depth: stateManager.columnGroupDepth( - stateManager.refColumnGroups!, + stateManager.refColumnGroups, ), ), ); diff --git a/lib/src/ui/pluto_body_columns_footer.dart b/lib/src/ui/pluto_body_columns_footer.dart index e18315bb0..092d35cf6 100644 --- a/lib/src/ui/pluto_body_columns_footer.dart +++ b/lib/src/ui/pluto_body_columns_footer.dart @@ -32,9 +32,9 @@ class PlutoBodyColumnsFooterState void initState() { super.initState(); - _scroll = stateManager.scroll!.horizontal!.addAndGet(); + _scroll = stateManager.scroll.horizontal!.addAndGet(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override @@ -45,7 +45,7 @@ class PlutoBodyColumnsFooterState } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _columns = update>( _columns, _getColumns(), diff --git a/lib/src/ui/pluto_body_rows.dart b/lib/src/ui/pluto_body_rows.dart index 6ca9157ea..6d6471fcd 100644 --- a/lib/src/ui/pluto_body_rows.dart +++ b/lib/src/ui/pluto_body_rows.dart @@ -1,4 +1,3 @@ -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; @@ -32,15 +31,15 @@ class PlutoBodyRowsState extends PlutoStateWithChange { void initState() { super.initState(); - _horizontalScroll = stateManager.scroll!.horizontal!.addAndGet(); + _horizontalScroll = stateManager.scroll.horizontal!.addAndGet(); - stateManager.scroll!.setBodyRowsHorizontal(_horizontalScroll); + stateManager.scroll.setBodyRowsHorizontal(_horizontalScroll); - _verticalScroll = stateManager.scroll!.vertical!.addAndGet(); + _verticalScroll = stateManager.scroll.vertical!.addAndGet(); - stateManager.scroll!.setBodyRowsVertical(_verticalScroll); + stateManager.scroll.setBodyRowsVertical(_verticalScroll); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override @@ -53,20 +52,12 @@ class PlutoBodyRowsState extends PlutoStateWithChange { } @override - void updateState() { - _columns = update>( - _columns, - _getColumns(), - compare: listEquals, - ); + void updateState(PlutoNotifierEvent event) { + forceUpdate(); + + _columns = _getColumns(); - _rows = [ - ...update>( - _rows, - stateManager.refRows, - compare: listEquals, - ) - ]; + _rows = stateManager.refRows; } List _getColumns() { diff --git a/lib/src/ui/pluto_left_frozen_columns.dart b/lib/src/ui/pluto_left_frozen_columns.dart index ad6d802ae..1105e489b 100644 --- a/lib/src/ui/pluto_left_frozen_columns.dart +++ b/lib/src/ui/pluto_left_frozen_columns.dart @@ -33,11 +33,11 @@ class PlutoLeftFrozenColumnsState void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _showColumnGroups = update( _showColumnGroups, stateManager.showColumnGroups, @@ -49,12 +49,13 @@ class PlutoLeftFrozenColumnsState compare: listEquals, ); - if (changed && _showColumnGroups == true) { - _columnGroups = stateManager.separateLinkedGroup( - columnGroupList: stateManager.refColumnGroups!, + _columnGroups = update>( + _columnGroups, + stateManager.separateLinkedGroup( + columnGroupList: stateManager.refColumnGroups, columns: _columns, - ); - } + ), + ); _itemCount = update(_itemCount, _getItemCount()); } @@ -75,9 +76,7 @@ class PlutoLeftFrozenColumnsState child: PlutoBaseColumnGroup( stateManager: stateManager, columnGroup: e, - depth: stateManager.columnGroupDepth( - stateManager.refColumnGroups!, - ), + depth: stateManager.columnGroupDepth(stateManager.refColumnGroups), ), ); } diff --git a/lib/src/ui/pluto_left_frozen_columns_footer.dart b/lib/src/ui/pluto_left_frozen_columns_footer.dart index ab799e60a..c99f5a401 100644 --- a/lib/src/ui/pluto_left_frozen_columns_footer.dart +++ b/lib/src/ui/pluto_left_frozen_columns_footer.dart @@ -30,11 +30,11 @@ class PlutoLeftFrozenColumnsFooterState void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _columns = update>( _columns, _getColumns(), diff --git a/lib/src/ui/pluto_left_frozen_rows.dart b/lib/src/ui/pluto_left_frozen_rows.dart index 268f520c5..839a04df8 100644 --- a/lib/src/ui/pluto_left_frozen_rows.dart +++ b/lib/src/ui/pluto_left_frozen_rows.dart @@ -1,4 +1,3 @@ -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; @@ -31,9 +30,9 @@ class PlutoLeftFrozenRowsState void initState() { super.initState(); - _scroll = stateManager.scroll!.vertical!.addAndGet(); + _scroll = stateManager.scroll.vertical!.addAndGet(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override @@ -44,20 +43,12 @@ class PlutoLeftFrozenRowsState } @override - void updateState() { - _columns = update>( - _columns, - _getColumns(), - compare: listEquals, - ); + void updateState(PlutoNotifierEvent event) { + forceUpdate(); + + _columns = _getColumns(); - _rows = [ - ...update>( - _rows, - stateManager.refRows, - compare: listEquals, - ) - ]; + _rows = stateManager.refRows; } List _getColumns() { diff --git a/lib/src/ui/pluto_right_frozen_columns.dart b/lib/src/ui/pluto_right_frozen_columns.dart index bfce0aa24..d646c6e54 100644 --- a/lib/src/ui/pluto_right_frozen_columns.dart +++ b/lib/src/ui/pluto_right_frozen_columns.dart @@ -33,11 +33,11 @@ class PlutoRightFrozenColumnsState void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _showColumnGroups = update( _showColumnGroups, stateManager.showColumnGroups, @@ -49,12 +49,13 @@ class PlutoRightFrozenColumnsState compare: listEquals, ); - if (changed && _showColumnGroups == true) { - _columnGroups = stateManager.separateLinkedGroup( - columnGroupList: stateManager.refColumnGroups!, + _columnGroups = update>( + _columnGroups, + stateManager.separateLinkedGroup( + columnGroupList: stateManager.refColumnGroups, columns: _columns, - ); - } + ), + ); _itemCount = update(_itemCount, _getItemCount()); } @@ -75,7 +76,7 @@ class PlutoRightFrozenColumnsState child: PlutoBaseColumnGroup( stateManager: stateManager, columnGroup: e, - depth: stateManager.columnGroupDepth(stateManager.refColumnGroups!), + depth: stateManager.columnGroupDepth(stateManager.refColumnGroups), ), ); } diff --git a/lib/src/ui/pluto_right_frozen_columns_footer.dart b/lib/src/ui/pluto_right_frozen_columns_footer.dart index d231cef46..a0be7d33e 100644 --- a/lib/src/ui/pluto_right_frozen_columns_footer.dart +++ b/lib/src/ui/pluto_right_frozen_columns_footer.dart @@ -30,11 +30,11 @@ class PlutoRightFrozenColumnsFooterState void initState() { super.initState(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override - void updateState() { + void updateState(PlutoNotifierEvent event) { _columns = update>( _columns, _getColumns(), diff --git a/lib/src/ui/pluto_right_frozen_rows.dart b/lib/src/ui/pluto_right_frozen_rows.dart index 75743735c..f4e75b411 100644 --- a/lib/src/ui/pluto_right_frozen_rows.dart +++ b/lib/src/ui/pluto_right_frozen_rows.dart @@ -1,4 +1,3 @@ -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; @@ -31,9 +30,9 @@ class PlutoRightFrozenRowsState void initState() { super.initState(); - _scroll = stateManager.scroll!.vertical!.addAndGet(); + _scroll = stateManager.scroll.vertical!.addAndGet(); - updateState(); + updateState(PlutoNotifierEventForceUpdate.instance); } @override @@ -44,20 +43,12 @@ class PlutoRightFrozenRowsState } @override - void updateState() { - _columns = update>( - _columns, - _getColumns(), - compare: listEquals, - ); + void updateState(PlutoNotifierEvent event) { + forceUpdate(); + + _columns = _getColumns(); - _rows = [ - ...update>( - _rows, - stateManager.refRows, - compare: listEquals, - ) - ]; + _rows = stateManager.refRows; } List _getColumns() { diff --git a/lib/src/widgets/pluto_loading.dart b/lib/src/widgets/pluto_loading.dart index 4e152b92c..a7ff059ef 100644 --- a/lib/src/widgets/pluto_loading.dart +++ b/lib/src/widgets/pluto_loading.dart @@ -1,18 +1,53 @@ import 'package:flutter/material.dart'; +import 'package:pluto_grid/pluto_grid.dart'; class PlutoLoading extends StatelessWidget { + final PlutoGridLoadingLevel level; final Color? backgroundColor; final Color? indicatorColor; final String? text; final TextStyle? textStyle; const PlutoLoading({ + this.level = PlutoGridLoadingLevel.grid, this.backgroundColor, this.indicatorColor, this.text, this.textStyle, - Key? key, - }) : super(key: key); + super.key, + }); + + @override + Widget build(BuildContext context) { + switch (level) { + case PlutoGridLoadingLevel.grid: + return _GridLoading( + backgroundColor: backgroundColor, + indicatorColor: indicatorColor, + text: text, + textStyle: textStyle, + ); + case PlutoGridLoadingLevel.rows: + return LinearProgressIndicator( + backgroundColor: Colors.transparent, + color: indicatorColor, + ); + } + } +} + +class _GridLoading extends StatelessWidget { + const _GridLoading({ + this.backgroundColor, + this.indicatorColor, + this.text, + this.textStyle, + }); + + final Color? backgroundColor; + final Color? indicatorColor; + final String? text; + final TextStyle? textStyle; @override Widget build(BuildContext context) { diff --git a/pubspec.yaml b/pubspec.yaml index 0989a99dc..7ba1cdaaf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,6 +18,6 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - mockito: ^5.2.0 - build_runner: ^2.2.0 + mockito: ^5.3.1 + build_runner: ^2.2.1 flutter_lints: ^2.0.1 diff --git a/test/mock/mock_on_change_listener.dart b/test/mock/mock_on_change_listener.dart index 2151cc9b6..be94ca012 100644 --- a/test/mock/mock_on_change_listener.dart +++ b/test/mock/mock_on_change_listener.dart @@ -1,8 +1,15 @@ import 'package:mockito/mockito.dart'; -class OnchangeListenerTest { - void onChangeVoidNoParamListener() {} - void onChangeOneParamListener(T param) {} +class _Methods { + void noParamReturnVoid() {} + void oneParamReturnVoid(T param) {} + bool oneParamReturnBool(T? param) => true; } -class MockOnChangeListener extends Mock implements OnchangeListenerTest {} +class MockMethods extends Mock implements _Methods { + @override + bool oneParamReturnBool(T? param) => super.noSuchMethod( + Invocation.method(#onChangeOneParamReturnBoolListener, [param]), + returnValue: true, + ); +} diff --git a/test/mock/shared_mocks.dart b/test/mock/shared_mocks.dart new file mode 100644 index 000000000..5722d4a25 --- /dev/null +++ b/test/mock/shared_mocks.dart @@ -0,0 +1,17 @@ +import 'dart:async'; + +import 'package:flutter/widgets.dart'; +import 'package:mockito/annotations.dart'; +import 'package:pluto_grid/pluto_grid.dart'; + +@GenerateNiceMocks([ + MockSpec(), + MockSpec(), + MockSpec(), + MockSpec(), + MockSpec(), + MockSpec(), + MockSpec(), + MockSpec(), +]) +void main() {} diff --git a/test/mock/shared_mocks.mocks.dart b/test/mock/shared_mocks.mocks.dart new file mode 100644 index 000000000..24deb7fa2 --- /dev/null +++ b/test/mock/shared_mocks.mocks.dart @@ -0,0 +1,4671 @@ +// Mocks generated by Mockito 5.3.2 from annotations +// in pluto_grid/test/mock/shared_mocks.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i6; +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/src/foundation/assertions.dart' as _i10; +import 'package:flutter/src/foundation/diagnostics.dart' as _i8; +import 'package:mockito/mockito.dart' as _i1; +import 'package:pluto_grid/pluto_grid.dart' as _i2; +import 'package:rxdart/rxdart.dart' as _i4; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeFilteredList_0 extends _i1.SmartFake + implements _i2.FilteredList { + _FakeFilteredList_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFocusNode_1 extends _i1.SmartFake implements _i3.FocusNode { + _FakeFocusNode_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); + + @override + String toString({_i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.info}) => + super.toString(); +} + +class _FakePlutoGridScrollController_2 extends _i1.SmartFake + implements _i2.PlutoGridScrollController { + _FakePlutoGridScrollController_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoColumnMenuDelegate_3 extends _i1.SmartFake + implements _i2.PlutoColumnMenuDelegate { + _FakePlutoColumnMenuDelegate_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoChangeNotifierFilterResolver_4 extends _i1.SmartFake + implements _i2.PlutoChangeNotifierFilterResolver { + _FakePlutoChangeNotifierFilterResolver_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGlobalKey_5> + extends _i1.SmartFake implements _i3.GlobalKey { + _FakeGlobalKey_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePublishSubject_6 extends _i1.SmartFake + implements _i4.PublishSubject { + _FakePublishSubject_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoGridColumnSizeConfig_7 extends _i1.SmartFake + implements _i2.PlutoGridColumnSizeConfig { + _FakePlutoGridColumnSizeConfig_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoGridConfiguration_8 extends _i1.SmartFake + implements _i2.PlutoGridConfiguration { + _FakePlutoGridConfiguration_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoGridLocaleText_9 extends _i1.SmartFake + implements _i2.PlutoGridLocaleText { + _FakePlutoGridLocaleText_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoGridStyleConfig_10 extends _i1.SmartFake + implements _i2.PlutoGridStyleConfig { + _FakePlutoGridStyleConfig_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoGridKeyPressed_11 extends _i1.SmartFake + implements _i2.PlutoGridKeyPressed { + _FakePlutoGridKeyPressed_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeChangeNotifier_12 extends _i1.SmartFake + implements _i3.ChangeNotifier { + _FakeChangeNotifier_12( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeOffset_13 extends _i1.SmartFake implements _i5.Offset { + _FakeOffset_13( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoChangeNotifierFilter_14 extends _i1.SmartFake + implements _i2.PlutoChangeNotifierFilter { + _FakePlutoChangeNotifierFilter_14( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoAutoSize_15 extends _i1.SmartFake implements _i2.PlutoAutoSize { + _FakePlutoAutoSize_15( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoResize_16 extends _i1.SmartFake + implements _i2.PlutoResize { + _FakePlutoResize_16( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoGridCellPosition_17 extends _i1.SmartFake + implements _i2.PlutoGridCellPosition { + _FakePlutoGridCellPosition_17( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoRow_18 extends _i1.SmartFake implements _i2.PlutoRow { + _FakePlutoRow_18( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePlutoGridStateManager_19 extends _i1.SmartFake + implements _i2.PlutoGridStateManager { + _FakePlutoGridStateManager_19( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeStreamSubscription_20 extends _i1.SmartFake + implements _i6.StreamSubscription { + _FakeStreamSubscription_20( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeScrollController_21 extends _i1.SmartFake + implements _i3.ScrollController { + _FakeScrollController_21( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeScrollPosition_22 extends _i1.SmartFake + implements _i3.ScrollPosition { + _FakeScrollPosition_22( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeScrollPhysics_23 extends _i1.SmartFake implements _i3.ScrollPhysics { + _FakeScrollPhysics_23( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeScrollContext_24 extends _i1.SmartFake implements _i3.ScrollContext { + _FakeScrollContext_24( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeValueNotifier_25 extends _i1.SmartFake + implements _i3.ValueNotifier { + _FakeValueNotifier_25( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeScrollHoldController_26 extends _i1.SmartFake + implements _i3.ScrollHoldController { + _FakeScrollHoldController_26( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDrag_27 extends _i1.SmartFake implements _i7.Drag { + _FakeDrag_27( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeScrollMetrics_28 extends _i1.SmartFake implements _i3.ScrollMetrics { + _FakeScrollMetrics_28( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeSize_29 extends _i1.SmartFake implements _i5.Size { + _FakeSize_29( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeRect_30 extends _i1.SmartFake implements _i5.Rect { + _FakeRect_30( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFocusAttachment_31 extends _i1.SmartFake + implements _i3.FocusAttachment { + _FakeFocusAttachment_31( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDiagnosticsNode_32 extends _i1.SmartFake + implements _i3.DiagnosticsNode { + _FakeDiagnosticsNode_32( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); + + @override + String toString({ + _i8.TextTreeConfiguration? parentConfiguration, + _i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.info, + }) => + super.toString(); +} + +/// A class which mocks [PlutoGridStateManager]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockPlutoGridStateManager extends _i1.Mock + implements _i2.PlutoGridStateManager { + @override + _i2.FilteredList<_i2.PlutoColumn> get refColumns => (super.noSuchMethod( + Invocation.getter(#refColumns), + returnValue: _FakeFilteredList_0<_i2.PlutoColumn>( + this, + Invocation.getter(#refColumns), + ), + returnValueForMissingStub: _FakeFilteredList_0<_i2.PlutoColumn>( + this, + Invocation.getter(#refColumns), + ), + ) as _i2.FilteredList<_i2.PlutoColumn>); + @override + _i2.FilteredList<_i2.PlutoColumnGroup> get refColumnGroups => + (super.noSuchMethod( + Invocation.getter(#refColumnGroups), + returnValue: _FakeFilteredList_0<_i2.PlutoColumnGroup>( + this, + Invocation.getter(#refColumnGroups), + ), + returnValueForMissingStub: _FakeFilteredList_0<_i2.PlutoColumnGroup>( + this, + Invocation.getter(#refColumnGroups), + ), + ) as _i2.FilteredList<_i2.PlutoColumnGroup>); + @override + _i2.FilteredList<_i2.PlutoRow> get refRows => (super.noSuchMethod( + Invocation.getter(#refRows), + returnValue: _FakeFilteredList_0<_i2.PlutoRow>( + this, + Invocation.getter(#refRows), + ), + returnValueForMissingStub: _FakeFilteredList_0<_i2.PlutoRow>( + this, + Invocation.getter(#refRows), + ), + ) as _i2.FilteredList<_i2.PlutoRow>); + @override + _i3.FocusNode get gridFocusNode => (super.noSuchMethod( + Invocation.getter(#gridFocusNode), + returnValue: _FakeFocusNode_1( + this, + Invocation.getter(#gridFocusNode), + ), + returnValueForMissingStub: _FakeFocusNode_1( + this, + Invocation.getter(#gridFocusNode), + ), + ) as _i3.FocusNode); + @override + _i2.PlutoGridScrollController get scroll => (super.noSuchMethod( + Invocation.getter(#scroll), + returnValue: _FakePlutoGridScrollController_2( + this, + Invocation.getter(#scroll), + ), + returnValueForMissingStub: _FakePlutoGridScrollController_2( + this, + Invocation.getter(#scroll), + ), + ) as _i2.PlutoGridScrollController); + @override + _i2.PlutoColumnMenuDelegate get columnMenuDelegate => + (super.noSuchMethod( + Invocation.getter(#columnMenuDelegate), + returnValue: _FakePlutoColumnMenuDelegate_3( + this, + Invocation.getter(#columnMenuDelegate), + ), + returnValueForMissingStub: _FakePlutoColumnMenuDelegate_3( + this, + Invocation.getter(#columnMenuDelegate), + ), + ) as _i2.PlutoColumnMenuDelegate); + @override + _i2.PlutoChangeNotifierFilterResolver get notifierFilterResolver => + (super.noSuchMethod( + Invocation.getter(#notifierFilterResolver), + returnValue: _FakePlutoChangeNotifierFilterResolver_4( + this, + Invocation.getter(#notifierFilterResolver), + ), + returnValueForMissingStub: _FakePlutoChangeNotifierFilterResolver_4( + this, + Invocation.getter(#notifierFilterResolver), + ), + ) as _i2.PlutoChangeNotifierFilterResolver); + @override + _i3.GlobalKey<_i3.State<_i3.StatefulWidget>> get gridKey => + (super.noSuchMethod( + Invocation.getter(#gridKey), + returnValue: _FakeGlobalKey_5<_i3.State<_i3.StatefulWidget>>( + this, + Invocation.getter(#gridKey), + ), + returnValueForMissingStub: + _FakeGlobalKey_5<_i3.State<_i3.StatefulWidget>>( + this, + Invocation.getter(#gridKey), + ), + ) as _i3.GlobalKey<_i3.State<_i3.StatefulWidget>>); + @override + _i2.PlutoGridMode get mode => (super.noSuchMethod( + Invocation.getter(#mode), + returnValue: _i2.PlutoGridMode.normal, + returnValueForMissingStub: _i2.PlutoGridMode.normal, + ) as _i2.PlutoGridMode); + @override + _i4.PublishSubject<_i2.PlutoNotifierEvent> get streamNotifier => + (super.noSuchMethod( + Invocation.getter(#streamNotifier), + returnValue: _FakePublishSubject_6<_i2.PlutoNotifierEvent>( + this, + Invocation.getter(#streamNotifier), + ), + returnValueForMissingStub: + _FakePublishSubject_6<_i2.PlutoNotifierEvent>( + this, + 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), + returnValue: _FakePlutoGridColumnSizeConfig_7( + this, + Invocation.getter(#columnSizeConfig), + ), + returnValueForMissingStub: _FakePlutoGridColumnSizeConfig_7( + this, + 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), + returnValue: _FakePlutoGridConfiguration_8( + this, + Invocation.getter(#configuration), + ), + returnValueForMissingStub: _FakePlutoGridConfiguration_8( + this, + Invocation.getter(#configuration), + ), + ) as _i2.PlutoGridConfiguration); + @override + _i2.PlutoGridLocaleText get localeText => (super.noSuchMethod( + Invocation.getter(#localeText), + returnValue: _FakePlutoGridLocaleText_9( + this, + Invocation.getter(#localeText), + ), + returnValueForMissingStub: _FakePlutoGridLocaleText_9( + this, + Invocation.getter(#localeText), + ), + ) as _i2.PlutoGridLocaleText); + @override + _i2.PlutoGridStyleConfig get style => (super.noSuchMethod( + Invocation.getter(#style), + returnValue: _FakePlutoGridStyleConfig_10( + this, + Invocation.getter(#style), + ), + returnValueForMissingStub: _FakePlutoGridStyleConfig_10( + this, + Invocation.getter(#style), + ), + ) as _i2.PlutoGridStyleConfig); + @override + _i2.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( + Invocation.getter(#keyPressed), + returnValue: _FakePlutoGridKeyPressed_11( + this, + Invocation.getter(#keyPressed), + ), + returnValueForMissingStub: _FakePlutoGridKeyPressed_11( + this, + Invocation.getter(#keyPressed), + ), + ) as _i2.PlutoGridKeyPressed); + @override + _i3.ChangeNotifier get resizingChangeNotifier => (super.noSuchMethod( + Invocation.getter(#resizingChangeNotifier), + returnValue: _FakeChangeNotifier_12( + this, + Invocation.getter(#resizingChangeNotifier), + ), + returnValueForMissingStub: _FakeChangeNotifier_12( + this, + 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 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), + returnValue: _FakeOffset_13( + this, + Invocation.getter(#directionalScrollEdgeOffset), + ), + returnValueForMissingStub: _FakeOffset_13( + this, + 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( + Invocation.getter(#currentSelectingPositionList), + 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: '', + ) as String); + @override + set headerHeight(double? value) => super.noSuchMethod( + Invocation.setter( + #headerHeight, + value, + ), + returnValueForMissingStub: null, + ); + @override + set footerHeight(double? value) => super.noSuchMethod( + Invocation.setter( + #footerHeight, + value, + ), + returnValueForMissingStub: null, + ); + @override + set columnFooterHeight(double? value) => super.noSuchMethod( + Invocation.setter( + #columnFooterHeight, + value, + ), + returnValueForMissingStub: null, + ); + @override + _i2.PlutoChangeNotifierFilter resolveNotifierFilter() => + (super.noSuchMethod( + Invocation.method( + #resolveNotifierFilter, + [], + ), + returnValue: _FakePlutoChangeNotifierFilter_14( + this, + Invocation.method( + #resolveNotifierFilter, + [], + ), + ), + returnValueForMissingStub: _FakePlutoChangeNotifierFilter_14( + this, + Invocation.method( + #resolveNotifierFilter, + [], + ), + ), + ) as _i2.PlutoChangeNotifierFilter); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners([ + bool? notify = true, + int? notifier, + ]) => + super.noSuchMethod( + Invocation.method( + #notifyListeners, + [ + notify, + notifier, + ], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListenersOnPostFrame([ + bool? notify = true, + int? notifier, + ]) => + super.noSuchMethod( + Invocation.method( + #notifyListenersOnPostFrame, + [ + notify, + notifier, + ], + ), + returnValueForMissingStub: null, + ); + @override + void addNotifier(int? hash) => super.noSuchMethod( + Invocation.method( + #addNotifier, + [hash], + ), + returnValueForMissingStub: null, + ); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void setCurrentCellPosition( + _i2.PlutoGridCellPosition? cellPosition, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setCurrentCellPosition, + [cellPosition], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( + Invocation.method( + #updateCurrentCellPosition, + [], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + int? columnIdxByCellKeyAndRowIdx( + _i3.Key? cellKey, + int? rowIdx, + ) => + (super.noSuchMethod( + Invocation.method( + #columnIdxByCellKeyAndRowIdx, + [ + cellKey, + rowIdx, + ], + ), + returnValueForMissingStub: null, + ) as int?); + @override + void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( + Invocation.method( + #clearCurrentCell, + [], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setCurrentCell( + _i2.PlutoCell? cell, + int? rowIdx, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setCurrentCell, + [ + cell, + rowIdx, + ], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + bool canMoveCell( + _i2.PlutoGridCellPosition? cellPosition, + _i2.PlutoMoveDirection? direction, + ) => + (super.noSuchMethod( + Invocation.method( + #canMoveCell, + [ + cellPosition, + direction, + ], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool canNotMoveCell( + _i2.PlutoGridCellPosition? cellPosition, + _i2.PlutoMoveDirection? direction, + ) => + (super.noSuchMethod( + Invocation.method( + #canNotMoveCell, + [ + cellPosition, + direction, + ], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool canChangeCellValue({ + required _i2.PlutoCell? cell, + dynamic newValue, + dynamic oldValue, + }) => + (super.noSuchMethod( + Invocation.method( + #canChangeCellValue, + [], + { + #cell: cell, + #newValue: newValue, + #oldValue: oldValue, + }, + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool canNotChangeCellValue({ + required _i2.PlutoCell? cell, + dynamic newValue, + dynamic oldValue, + }) => + (super.noSuchMethod( + Invocation.method( + #canNotChangeCellValue, + [], + { + #cell: cell, + #newValue: newValue, + #oldValue: oldValue, + }, + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + dynamic filteredCellValue({ + required _i2.PlutoColumn? column, + dynamic newValue, + dynamic oldValue, + }) => + super.noSuchMethod( + Invocation.method( + #filteredCellValue, + [], + { + #column: column, + #newValue: newValue, + #oldValue: oldValue, + }, + ), + returnValueForMissingStub: null, + ); + @override + bool isCurrentCell(_i2.PlutoCell? cell) => (super.noSuchMethod( + Invocation.method( + #isCurrentCell, + [cell], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool isInvalidCellPosition(_i2.PlutoGridCellPosition? cellPosition) => + (super.noSuchMethod( + Invocation.method( + #isInvalidCellPosition, + [cellPosition], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void setShowColumnGroups( + bool? flag, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setShowColumnGroups, + [flag], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + List<_i2.PlutoColumnGroupPair> separateLinkedGroup({ + required List<_i2.PlutoColumnGroup>? columnGroupList, + required List<_i2.PlutoColumn>? columns, + }) => + (super.noSuchMethod( + Invocation.method( + #separateLinkedGroup, + [], + { + #columnGroupList: columnGroupList, + #columns: columns, + }, + ), + returnValue: <_i2.PlutoColumnGroupPair>[], + returnValueForMissingStub: <_i2.PlutoColumnGroupPair>[], + ) as List<_i2.PlutoColumnGroupPair>); + @override + int columnGroupDepth(List<_i2.PlutoColumnGroup>? columnGroupList) => + (super.noSuchMethod( + Invocation.method( + #columnGroupDepth, + [columnGroupList], + ), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); + @override + void removeColumnsInColumnGroup( + List<_i2.PlutoColumn>? columns, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #removeColumnsInColumnGroup, + [columns], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setGroupToColumn() => super.noSuchMethod( + Invocation.method( + #setGroupToColumn, + [], + ), + returnValueForMissingStub: null, + ); + @override + void activateColumnsAutoSize() => super.noSuchMethod( + Invocation.method( + #activateColumnsAutoSize, + [], + ), + returnValueForMissingStub: null, + ); + @override + void deactivateColumnsAutoSize() => super.noSuchMethod( + Invocation.method( + #deactivateColumnsAutoSize, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i2.PlutoAutoSize getColumnsAutoSizeHelper({ + required Iterable<_i2.PlutoColumn>? columns, + required double? maxWidth, + }) => + (super.noSuchMethod( + Invocation.method( + #getColumnsAutoSizeHelper, + [], + { + #columns: columns, + #maxWidth: maxWidth, + }, + ), + returnValue: _FakePlutoAutoSize_15( + this, + Invocation.method( + #getColumnsAutoSizeHelper, + [], + { + #columns: columns, + #maxWidth: maxWidth, + }, + ), + ), + returnValueForMissingStub: _FakePlutoAutoSize_15( + this, + Invocation.method( + #getColumnsAutoSizeHelper, + [], + { + #columns: columns, + #maxWidth: maxWidth, + }, + ), + ), + ) as _i2.PlutoAutoSize); + @override + _i2.PlutoResize getColumnsResizeHelper({ + required List<_i2.PlutoColumn>? columns, + required _i2.PlutoColumn? column, + required double? offset, + }) => + (super.noSuchMethod( + Invocation.method( + #getColumnsResizeHelper, + [], + { + #columns: columns, + #column: column, + #offset: offset, + }, + ), + returnValue: _FakePlutoResize_16( + this, + Invocation.method( + #getColumnsResizeHelper, + [], + { + #columns: columns, + #column: column, + #offset: offset, + }, + ), + ), + returnValueForMissingStub: _FakePlutoResize_16( + this, + Invocation.method( + #getColumnsResizeHelper, + [], + { + #columns: columns, + #column: column, + #offset: offset, + }, + ), + ), + ) as _i2.PlutoResize); + @override + void setColumnSizeConfig(_i2.PlutoGridColumnSizeConfig? config) => + super.noSuchMethod( + Invocation.method( + #setColumnSizeConfig, + [config], + ), + returnValueForMissingStub: null, + ); + @override + void toggleFrozenColumn( + _i2.PlutoColumn? column, + _i2.PlutoColumnFrozen? frozen, + ) => + super.noSuchMethod( + Invocation.method( + #toggleFrozenColumn, + [ + column, + frozen, + ], + ), + returnValueForMissingStub: null, + ); + @override + void toggleSortColumn(_i2.PlutoColumn? column) => super.noSuchMethod( + Invocation.method( + #toggleSortColumn, + [column], + ), + returnValueForMissingStub: null, + ); + @override + int? columnIndex(_i2.PlutoColumn? column) => (super.noSuchMethod( + Invocation.method( + #columnIndex, + [column], + ), + returnValueForMissingStub: null, + ) as int?); + @override + void insertColumns( + int? columnIdx, + List<_i2.PlutoColumn>? columns, + ) => + super.noSuchMethod( + Invocation.method( + #insertColumns, + [ + columnIdx, + columns, + ], + ), + returnValueForMissingStub: null, + ); + @override + void removeColumns(List<_i2.PlutoColumn>? columns) => super.noSuchMethod( + Invocation.method( + #removeColumns, + [columns], + ), + returnValueForMissingStub: null, + ); + @override + void moveColumn({ + required _i2.PlutoColumn? column, + required _i2.PlutoColumn? targetColumn, + }) => + super.noSuchMethod( + Invocation.method( + #moveColumn, + [], + { + #column: column, + #targetColumn: targetColumn, + }, + ), + returnValueForMissingStub: null, + ); + @override + void resizeColumn( + _i2.PlutoColumn? column, + double? offset, + ) => + super.noSuchMethod( + Invocation.method( + #resizeColumn, + [ + column, + offset, + ], + ), + returnValueForMissingStub: null, + ); + @override + void autoFitColumn( + _i3.BuildContext? context, + _i2.PlutoColumn? column, + ) => + super.noSuchMethod( + Invocation.method( + #autoFitColumn, + [ + context, + column, + ], + ), + returnValueForMissingStub: null, + ); + @override + void hideColumn( + _i2.PlutoColumn? column, + bool? hide, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #hideColumn, + [ + column, + hide, + ], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void hideColumns( + List<_i2.PlutoColumn>? columns, + bool? hide, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #hideColumns, + [ + columns, + hide, + ], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void sortAscending( + _i2.PlutoColumn? column, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #sortAscending, + [column], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void sortDescending( + _i2.PlutoColumn? column, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #sortDescending, + [column], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void sortBySortIdx( + _i2.PlutoColumn? column, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #sortBySortIdx, + [column], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void showSetColumnsPopup(_i3.BuildContext? context) => super.noSuchMethod( + Invocation.method( + #showSetColumnsPopup, + [context], + ), + returnValueForMissingStub: null, + ); + @override + bool limitResizeColumn( + _i2.PlutoColumn? column, + double? offset, + ) => + (super.noSuchMethod( + Invocation.method( + #limitResizeColumn, + [ + column, + offset, + ], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool limitMoveColumn({ + required _i2.PlutoColumn? column, + required _i2.PlutoColumn? targetColumn, + }) => + (super.noSuchMethod( + Invocation.method( + #limitMoveColumn, + [], + { + #column: column, + #targetColumn: targetColumn, + }, + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool limitToggleFrozenColumn( + _i2.PlutoColumn? column, + _i2.PlutoColumnFrozen? frozen, + ) => + (super.noSuchMethod( + Invocation.method( + #limitToggleFrozenColumn, + [ + column, + frozen, + ], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool limitHideColumn( + _i2.PlutoColumn? column, + bool? hide, { + double? accumulateWidth = 0.0, + }) => + (super.noSuchMethod( + Invocation.method( + #limitHideColumn, + [ + column, + hide, + ], + {#accumulateWidth: accumulateWidth}, + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void setIsDraggingRow( + bool? flag, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setIsDraggingRow, + [flag], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setDragRows( + List<_i2.PlutoRow>? rows, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setDragRows, + [rows], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setDragTargetRowIdx( + int? rowIdx, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setDragTargetRowIdx, + [rowIdx], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + bool isRowIdxDragTarget(int? rowIdx) => (super.noSuchMethod( + Invocation.method( + #isRowIdxDragTarget, + [rowIdx], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool isRowIdxTopDragTarget(int? rowIdx) => (super.noSuchMethod( + Invocation.method( + #isRowIdxTopDragTarget, + [rowIdx], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( + Invocation.method( + #isRowIdxBottomDragTarget, + [rowIdx], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool isRowBeingDragged(_i3.Key? rowKey) => (super.noSuchMethod( + Invocation.method( + #isRowBeingDragged, + [rowKey], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool isEditableCell(_i2.PlutoCell? cell) => (super.noSuchMethod( + Invocation.method( + #isEditableCell, + [cell], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void setEditing( + bool? flag, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setEditing, + [flag], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setAutoEditing( + bool? flag, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setAutoEditing, + [flag], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setTextEditingController( + _i3.TextEditingController? textEditingController) => + super.noSuchMethod( + Invocation.method( + #setTextEditingController, + [textEditingController], + ), + returnValueForMissingStub: null, + ); + @override + void toggleEditing({bool? notify = true}) => super.noSuchMethod( + Invocation.method( + #toggleEditing, + [], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void pasteCellValue(List>? textList) => super.noSuchMethod( + Invocation.method( + #pasteCellValue, + [textList], + ), + returnValueForMissingStub: null, + ); + @override + dynamic castValueByColumnType( + dynamic value, + _i2.PlutoColumn? column, + ) => + super.noSuchMethod( + Invocation.method( + #castValueByColumnType, + [ + value, + column, + ], + ), + returnValueForMissingStub: null, + ); + @override + void changeCellValue( + _i2.PlutoCell? cell, + dynamic value, { + bool? callOnChangedEvent = true, + bool? force = false, + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #changeCellValue, + [ + cell, + value, + ], + { + #callOnChangedEvent: callOnChangedEvent, + #force: force, + #notify: notify, + }, + ), + returnValueForMissingStub: null, + ); + @override + void setFilter( + _i2.FilteredListFilter<_i2.PlutoRow>? filter, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setFilter, + [filter], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setFilterWithFilterRows( + List<_i2.PlutoRow>? rows, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setFilterWithFilterRows, + [rows], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setFilterRows(List<_i2.PlutoRow>? rows) => super.noSuchMethod( + Invocation.method( + #setFilterRows, + [rows], + ), + returnValueForMissingStub: null, + ); + @override + List<_i2.PlutoRow> filterRowsByField(String? columnField) => + (super.noSuchMethod( + Invocation.method( + #filterRowsByField, + [columnField], + ), + returnValue: <_i2.PlutoRow>[], + returnValueForMissingStub: <_i2.PlutoRow>[], + ) as List<_i2.PlutoRow>); + @override + bool isFilteredColumn(_i2.PlutoColumn? column) => (super.noSuchMethod( + Invocation.method( + #isFilteredColumn, + [column], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void removeColumnsInFilterRows( + List<_i2.PlutoColumn>? columns, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #removeColumnsInFilterRows, + [columns], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void showFilterPopup( + _i3.BuildContext? context, { + _i2.PlutoColumn? calledColumn, + void Function()? onClosed, + }) => + super.noSuchMethod( + Invocation.method( + #showFilterPopup, + [context], + { + #calledColumn: calledColumn, + #onClosed: onClosed, + }, + ), + returnValueForMissingStub: null, + ); + @override + void setKeepFocus( + bool? flag, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setKeepFocus, + [flag], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void nextFocusOfColumnFilter( + _i2.PlutoColumn? column, { + bool? reversed = false, + }) => + super.noSuchMethod( + Invocation.method( + #nextFocusOfColumnFilter, + [column], + {#reversed: reversed}, + ), + returnValueForMissingStub: null, + ); + @override + void setKeyManager(_i2.PlutoGridKeyManager? keyManager) => super.noSuchMethod( + Invocation.method( + #setKeyManager, + [keyManager], + ), + returnValueForMissingStub: null, + ); + @override + void setEventManager(_i2.PlutoGridEventManager? eventManager) => + super.noSuchMethod( + Invocation.method( + #setEventManager, + [eventManager], + ), + returnValueForMissingStub: null, + ); + @override + void setConfiguration( + _i2.PlutoGridConfiguration? configuration, { + bool? updateLocale = true, + bool? applyColumnFilter = true, + }) => + super.noSuchMethod( + Invocation.method( + #setConfiguration, + [configuration], + { + #updateLocale: updateLocale, + #applyColumnFilter: applyColumnFilter, + }, + ), + returnValueForMissingStub: null, + ); + @override + void resetCurrentState({bool? notify = true}) => super.noSuchMethod( + Invocation.method( + #resetCurrentState, + [], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void handleOnSelected() => super.noSuchMethod( + Invocation.method( + #handleOnSelected, + [], + ), + returnValueForMissingStub: null, + ); + @override + void forceUpdate() => super.noSuchMethod( + Invocation.method( + #forceUpdate, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i2.PlutoGridCellPosition cellPositionToMove( + _i2.PlutoGridCellPosition? cellPosition, + _i2.PlutoMoveDirection? direction, + ) => + (super.noSuchMethod( + Invocation.method( + #cellPositionToMove, + [ + cellPosition, + direction, + ], + ), + returnValue: _FakePlutoGridCellPosition_17( + this, + Invocation.method( + #cellPositionToMove, + [ + cellPosition, + direction, + ], + ), + ), + returnValueForMissingStub: _FakePlutoGridCellPosition_17( + this, + Invocation.method( + #cellPositionToMove, + [ + cellPosition, + direction, + ], + ), + ), + ) as _i2.PlutoGridCellPosition); + @override + void moveCurrentCell( + _i2.PlutoMoveDirection? direction, { + bool? force = false, + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #moveCurrentCell, + [direction], + { + #force: force, + #notify: notify, + }, + ), + returnValueForMissingStub: null, + ); + @override + void moveCurrentCellToEdgeOfColumns( + _i2.PlutoMoveDirection? direction, { + bool? force = false, + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #moveCurrentCellToEdgeOfColumns, + [direction], + { + #force: force, + #notify: notify, + }, + ), + returnValueForMissingStub: null, + ); + @override + void moveCurrentCellToEdgeOfRows( + _i2.PlutoMoveDirection? direction, { + bool? force = false, + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #moveCurrentCellToEdgeOfRows, + [direction], + { + #force: force, + #notify: notify, + }, + ), + returnValueForMissingStub: null, + ); + @override + void moveCurrentCellByRowIdx( + int? rowIdx, + _i2.PlutoMoveDirection? direction, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #moveCurrentCellByRowIdx, + [ + rowIdx, + direction, + ], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void moveSelectingCell(_i2.PlutoMoveDirection? direction) => + super.noSuchMethod( + Invocation.method( + #moveSelectingCell, + [direction], + ), + returnValueForMissingStub: null, + ); + @override + void moveSelectingCellToEdgeOfColumns( + _i2.PlutoMoveDirection? direction, { + bool? force = false, + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #moveSelectingCellToEdgeOfColumns, + [direction], + { + #force: force, + #notify: notify, + }, + ), + returnValueForMissingStub: null, + ); + @override + void moveSelectingCellToEdgeOfRows( + _i2.PlutoMoveDirection? direction, { + bool? force = false, + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #moveSelectingCellToEdgeOfRows, + [direction], + { + #force: force, + #notify: notify, + }, + ), + returnValueForMissingStub: null, + ); + @override + void moveSelectingCellByRowIdx( + int? rowIdx, + _i2.PlutoMoveDirection? direction, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #moveSelectingCellByRowIdx, + [ + rowIdx, + direction, + ], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setLayout(_i3.BoxConstraints? size) => super.noSuchMethod( + Invocation.method( + #setLayout, + [size], + ), + returnValueForMissingStub: null, + ); + @override + void setShowColumnTitle( + bool? flag, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setShowColumnTitle, + [flag], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setShowColumnFooter( + bool? flag, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setShowColumnFooter, + [flag], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setShowColumnFilter( + bool? flag, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setShowColumnFilter, + [flag], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setShowLoading( + bool? flag, { + _i2.PlutoGridLoadingLevel? level = _i2.PlutoGridLoadingLevel.grid, + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setShowLoading, + [flag], + { + #level: level, + #notify: notify, + }, + ), + returnValueForMissingStub: null, + ); + @override + void resetShowFrozenColumn() => super.noSuchMethod( + Invocation.method( + #resetShowFrozenColumn, + [], + ), + returnValueForMissingStub: null, + ); + @override + bool shouldShowFrozenColumns(double? width) => (super.noSuchMethod( + Invocation.method( + #shouldShowFrozenColumns, + [width], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool enoughFrozenColumnsWidth(double? width) => (super.noSuchMethod( + Invocation.method( + #enoughFrozenColumnsWidth, + [width], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void notifyResizingListeners() => super.noSuchMethod( + Invocation.method( + #notifyResizingListeners, + [], + ), + returnValueForMissingStub: null, + ); + @override + void setTextDirection(_i5.TextDirection? textDirection) => super.noSuchMethod( + Invocation.method( + #setTextDirection, + [textDirection], + ), + returnValueForMissingStub: null, + ); + @override + void performLayoutOnPostFrame() => super.noSuchMethod( + Invocation.method( + #performLayoutOnPostFrame, + [], + ), + returnValueForMissingStub: null, + ); + @override + void setGridGlobalOffset(_i5.Offset? offset) => super.noSuchMethod( + Invocation.method( + #setGridGlobalOffset, + [offset], + ), + returnValueForMissingStub: null, + ); + @override + void setPageSize( + int? pageSize, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setPageSize, + [pageSize], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setPage( + int? page, { + bool? resetCurrentState = true, + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setPage, + [page], + { + #resetCurrentState: resetCurrentState, + #notify: notify, + }, + ), + returnValueForMissingStub: null, + ); + @override + void resetPage({ + bool? resetCurrentState = true, + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #resetPage, + [], + { + #resetCurrentState: resetCurrentState, + #notify: notify, + }, + ), + returnValueForMissingStub: null, + ); + @override + bool isMainRow(_i2.PlutoRow? row) => (super.noSuchMethod( + Invocation.method( + #isMainRow, + [row], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool isNotMainGroupedRow(_i2.PlutoRow? row) => (super.noSuchMethod( + Invocation.method( + #isNotMainGroupedRow, + [row], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool isExpandedGroupedRow(_i2.PlutoRow? row) => (super.noSuchMethod( + Invocation.method( + #isExpandedGroupedRow, + [row], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void setRowGroup( + _i2.PlutoRowGroupDelegate? delegate, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setRowGroup, + [delegate], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void toggleExpandedRowGroup({ + required _i2.PlutoRow? rowGroup, + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #toggleExpandedRowGroup, + [], + { + #rowGroup: rowGroup, + #notify: notify, + }, + ), + returnValueForMissingStub: null, + ); + @override + void setRowGroupFilter(_i2.FilteredListFilter<_i2.PlutoRow>? filter) => + super.noSuchMethod( + Invocation.method( + #setRowGroupFilter, + [filter], + ), + returnValueForMissingStub: null, + ); + @override + void sortRowGroup({ + required _i2.PlutoColumn? column, + required int Function( + _i2.PlutoRow, + _i2.PlutoRow, + )? + compare, + }) => + super.noSuchMethod( + Invocation.method( + #sortRowGroup, + [], + { + #column: column, + #compare: compare, + }, + ), + returnValueForMissingStub: null, + ); + @override + void insertRowGroup( + int? index, + List<_i2.PlutoRow>? rows, + ) => + super.noSuchMethod( + Invocation.method( + #insertRowGroup, + [ + index, + rows, + ], + ), + returnValueForMissingStub: null, + ); + @override + void removeRowAndGroupByKey(Iterable<_i3.Key>? keys) => super.noSuchMethod( + Invocation.method( + #removeRowAndGroupByKey, + [keys], + ), + returnValueForMissingStub: null, + ); + @override + void removeColumnsInRowGroupByColumn( + List<_i2.PlutoColumn>? columns, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #removeColumnsInRowGroupByColumn, + [columns], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void updateRowGroupByHideColumn(List<_i2.PlutoColumn>? columns) => + super.noSuchMethod( + Invocation.method( + #updateRowGroupByHideColumn, + [columns], + ), + returnValueForMissingStub: null, + ); + @override + int? getRowIdxByOffset(double? offset) => (super.noSuchMethod( + Invocation.method( + #getRowIdxByOffset, + [offset], + ), + returnValueForMissingStub: null, + ) as int?); + @override + _i2.PlutoRow getNewRow() => (super.noSuchMethod( + Invocation.method( + #getNewRow, + [], + ), + returnValue: _FakePlutoRow_18( + this, + Invocation.method( + #getNewRow, + [], + ), + ), + returnValueForMissingStub: _FakePlutoRow_18( + this, + Invocation.method( + #getNewRow, + [], + ), + ), + ) as _i2.PlutoRow); + @override + List<_i2.PlutoRow> getNewRows({int? count = 1}) => (super.noSuchMethod( + Invocation.method( + #getNewRows, + [], + {#count: count}, + ), + returnValue: <_i2.PlutoRow>[], + returnValueForMissingStub: <_i2.PlutoRow>[], + ) as List<_i2.PlutoRow>); + @override + void setRowChecked( + _i2.PlutoRow? row, + bool? flag, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setRowChecked, + [ + row, + flag, + ], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void insertRows( + int? rowIdx, + List<_i2.PlutoRow>? rows, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #insertRows, + [ + rowIdx, + rows, + ], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void prependNewRows({int? count = 1}) => super.noSuchMethod( + Invocation.method( + #prependNewRows, + [], + {#count: count}, + ), + returnValueForMissingStub: null, + ); + @override + void prependRows(List<_i2.PlutoRow>? rows) => super.noSuchMethod( + Invocation.method( + #prependRows, + [rows], + ), + returnValueForMissingStub: null, + ); + @override + void appendNewRows({int? count = 1}) => super.noSuchMethod( + Invocation.method( + #appendNewRows, + [], + {#count: count}, + ), + returnValueForMissingStub: null, + ); + @override + void appendRows(List<_i2.PlutoRow>? rows) => super.noSuchMethod( + Invocation.method( + #appendRows, + [rows], + ), + returnValueForMissingStub: null, + ); + @override + void removeCurrentRow() => super.noSuchMethod( + Invocation.method( + #removeCurrentRow, + [], + ), + returnValueForMissingStub: null, + ); + @override + void removeRows( + List<_i2.PlutoRow>? rows, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #removeRows, + [rows], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void removeAllRows({bool? notify = true}) => super.noSuchMethod( + Invocation.method( + #removeAllRows, + [], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void moveRowsByOffset( + List<_i2.PlutoRow>? rows, + double? offset, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #moveRowsByOffset, + [ + rows, + offset, + ], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void moveRowsByIndex( + List<_i2.PlutoRow>? rows, + int? indexToMove, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #moveRowsByIndex, + [ + rows, + indexToMove, + ], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void toggleAllRowChecked( + bool? flag, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #toggleAllRowChecked, + [flag], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + _i5.Offset toDirectionalOffset(_i5.Offset? offset) => (super.noSuchMethod( + Invocation.method( + #toDirectionalOffset, + [offset], + ), + returnValue: _FakeOffset_13( + this, + Invocation.method( + #toDirectionalOffset, + [offset], + ), + ), + returnValueForMissingStub: _FakeOffset_13( + this, + Invocation.method( + #toDirectionalOffset, + [offset], + ), + ), + ) as _i5.Offset); + @override + void scrollByDirection( + _i2.PlutoMoveDirection? direction, + double? offset, + ) => + super.noSuchMethod( + Invocation.method( + #scrollByDirection, + [ + direction, + offset, + ], + ), + returnValueForMissingStub: null, + ); + @override + bool canHorizontalCellScrollByDirection( + _i2.PlutoMoveDirection? direction, + _i2.PlutoColumn? columnToMove, + ) => + (super.noSuchMethod( + Invocation.method( + #canHorizontalCellScrollByDirection, + [ + direction, + columnToMove, + ], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void moveScrollByRow( + _i2.PlutoMoveDirection? direction, + int? rowIdx, + ) => + super.noSuchMethod( + Invocation.method( + #moveScrollByRow, + [ + direction, + rowIdx, + ], + ), + returnValueForMissingStub: null, + ); + @override + void moveScrollByColumn( + _i2.PlutoMoveDirection? direction, + int? columnIdx, + ) => + super.noSuchMethod( + Invocation.method( + #moveScrollByColumn, + [ + direction, + columnIdx, + ], + ), + returnValueForMissingStub: null, + ); + @override + bool needMovingScroll( + _i5.Offset? offset, + _i2.PlutoMoveDirection? move, + ) => + (super.noSuchMethod( + Invocation.method( + #needMovingScroll, + [ + offset, + move, + ], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void updateCorrectScrollOffset() => super.noSuchMethod( + Invocation.method( + #updateCorrectScrollOffset, + [], + ), + returnValueForMissingStub: null, + ); + @override + void updateScrollViewport() => super.noSuchMethod( + Invocation.method( + #updateScrollViewport, + [], + ), + returnValueForMissingStub: null, + ); + @override + void resetScrollToZero() => super.noSuchMethod( + Invocation.method( + #resetScrollToZero, + [], + ), + returnValueForMissingStub: null, + ); + @override + void setSelecting( + bool? flag, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setSelecting, + [flag], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setSelectingMode( + _i2.PlutoGridSelectingMode? mode, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setSelectingMode, + [mode], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setAllCurrentSelecting() => super.noSuchMethod( + Invocation.method( + #setAllCurrentSelecting, + [], + ), + returnValueForMissingStub: null, + ); + @override + void setCurrentSelectingPosition({ + _i2.PlutoGridCellPosition? cellPosition, + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setCurrentSelectingPosition, + [], + { + #cellPosition: cellPosition, + #notify: notify, + }, + ), + returnValueForMissingStub: null, + ); + @override + void setCurrentSelectingPositionByCellKey( + _i3.Key? cellKey, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setCurrentSelectingPositionByCellKey, + [cellKey], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => + super.noSuchMethod( + Invocation.method( + #setCurrentSelectingPositionWithOffset, + [offset], + ), + returnValueForMissingStub: null, + ); + @override + void setCurrentSelectingRowsByRange( + int? from, + int? to, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #setCurrentSelectingRowsByRange, + [ + from, + to, + ], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( + Invocation.method( + #clearCurrentSelecting, + [], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + void toggleSelectingRow( + int? rowIdx, { + bool? notify = true, + }) => + super.noSuchMethod( + Invocation.method( + #toggleSelectingRow, + [rowIdx], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); + @override + bool isSelectingInteraction() => (super.noSuchMethod( + Invocation.method( + #isSelectingInteraction, + [], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool isSelectedRow(_i3.Key? rowKey) => (super.noSuchMethod( + Invocation.method( + #isSelectedRow, + [rowKey], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool isSelectedCell( + _i2.PlutoCell? cell, + _i2.PlutoColumn? column, + int? rowIdx, + ) => + (super.noSuchMethod( + Invocation.method( + #isSelectedCell, + [ + cell, + column, + rowIdx, + ], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void handleAfterSelectingRow( + _i2.PlutoCell? cell, + dynamic value, + ) => + super.noSuchMethod( + Invocation.method( + #handleAfterSelectingRow, + [ + cell, + value, + ], + ), + returnValueForMissingStub: null, + ); + @override + void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( + Invocation.method( + #updateVisibilityLayout, + [], + {#notify: notify}, + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [PlutoGridEventManager]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockPlutoGridEventManager extends _i1.Mock + implements _i2.PlutoGridEventManager { + @override + _i2.PlutoGridStateManager get stateManager => (super.noSuchMethod( + Invocation.getter(#stateManager), + returnValue: _FakePlutoGridStateManager_19( + this, + Invocation.getter(#stateManager), + ), + returnValueForMissingStub: _FakePlutoGridStateManager_19( + this, + Invocation.getter(#stateManager), + ), + ) as _i2.PlutoGridStateManager); + @override + _i4.PublishSubject<_i2.PlutoGridEvent> get subject => (super.noSuchMethod( + Invocation.getter(#subject), + returnValue: _FakePublishSubject_6<_i2.PlutoGridEvent>( + this, + Invocation.getter(#subject), + ), + returnValueForMissingStub: _FakePublishSubject_6<_i2.PlutoGridEvent>( + this, + Invocation.getter(#subject), + ), + ) as _i4.PublishSubject<_i2.PlutoGridEvent>); + @override + _i6.StreamSubscription get subscription => (super.noSuchMethod( + Invocation.getter(#subscription), + returnValue: _FakeStreamSubscription_20( + this, + Invocation.getter(#subscription), + ), + returnValueForMissingStub: _FakeStreamSubscription_20( + this, + Invocation.getter(#subscription), + ), + ) as _i6.StreamSubscription); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + void init() => super.noSuchMethod( + Invocation.method( + #init, + [], + ), + returnValueForMissingStub: null, + ); + @override + void addEvent(_i2.PlutoGridEvent? event) => super.noSuchMethod( + Invocation.method( + #addEvent, + [event], + ), + returnValueForMissingStub: null, + ); + @override + _i6.StreamSubscription<_i2.PlutoGridEvent> listener( + void Function(_i2.PlutoGridEvent)? onData) => + (super.noSuchMethod( + Invocation.method( + #listener, + [onData], + ), + returnValue: _FakeStreamSubscription_20<_i2.PlutoGridEvent>( + this, + Invocation.method( + #listener, + [onData], + ), + ), + returnValueForMissingStub: + _FakeStreamSubscription_20<_i2.PlutoGridEvent>( + this, + Invocation.method( + #listener, + [onData], + ), + ), + ) as _i6.StreamSubscription<_i2.PlutoGridEvent>); +} + +/// A class which mocks [PlutoGridScrollController]. +/// +/// See the documentation for Mockito's code generation for more information. +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 + void setBodyRowsHorizontal(_i3.ScrollController? scrollController) => + super.noSuchMethod( + Invocation.method( + #setBodyRowsHorizontal, + [scrollController], + ), + returnValueForMissingStub: null, + ); + @override + void setBodyRowsVertical(_i3.ScrollController? scrollController) => + super.noSuchMethod( + Invocation.method( + #setBodyRowsVertical, + [scrollController], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [LinkedScrollControllerGroup]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockLinkedScrollControllerGroup extends _i1.Mock + implements _i2.LinkedScrollControllerGroup { + @override + double get offset => (super.noSuchMethod( + Invocation.getter(#offset), + returnValue: 0.0, + returnValueForMissingStub: 0.0, + ) as double); + @override + _i3.ScrollController addAndGet() => (super.noSuchMethod( + Invocation.method( + #addAndGet, + [], + ), + returnValue: _FakeScrollController_21( + this, + Invocation.method( + #addAndGet, + [], + ), + ), + returnValueForMissingStub: _FakeScrollController_21( + this, + Invocation.method( + #addAndGet, + [], + ), + ), + ) as _i3.ScrollController); + @override + void addOffsetChangedListener(_i5.VoidCallback? onChanged) => + super.noSuchMethod( + Invocation.method( + #addOffsetChangedListener, + [onChanged], + ), + returnValueForMissingStub: null, + ); + @override + void removeOffsetChangedListener(_i5.VoidCallback? listener) => + super.noSuchMethod( + Invocation.method( + #removeOffsetChangedListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future animateTo( + double? offset, { + required _i3.Curve? curve, + required Duration? duration, + }) => + (super.noSuchMethod( + Invocation.method( + #animateTo, + [offset], + { + #curve: curve, + #duration: duration, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void jumpTo(double? value) => super.noSuchMethod( + Invocation.method( + #jumpTo, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void resetScroll() => super.noSuchMethod( + Invocation.method( + #resetScroll, + [], + ), + returnValueForMissingStub: null, + ); + @override + void applyViewportDimension(double? value) => super.noSuchMethod( + Invocation.method( + #applyViewportDimension, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [ScrollController]. +/// +/// 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 + 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), + returnValue: _FakeScrollPosition_22( + this, + Invocation.getter(#position), + ), + returnValueForMissingStub: _FakeScrollPosition_22( + this, + 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, { + required Duration? duration, + required _i3.Curve? curve, + }) => + (super.noSuchMethod( + Invocation.method( + #animateTo, + [offset], + { + #duration: duration, + #curve: curve, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void jumpTo(double? value) => super.noSuchMethod( + Invocation.method( + #jumpTo, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void attach(_i3.ScrollPosition? position) => super.noSuchMethod( + Invocation.method( + #attach, + [position], + ), + returnValueForMissingStub: null, + ); + @override + void detach(_i3.ScrollPosition? position) => super.noSuchMethod( + Invocation.method( + #detach, + [position], + ), + returnValueForMissingStub: null, + ); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i3.ScrollPosition createScrollPosition( + _i3.ScrollPhysics? physics, + _i3.ScrollContext? context, + _i3.ScrollPosition? oldPosition, + ) => + (super.noSuchMethod( + Invocation.method( + #createScrollPosition, + [ + physics, + context, + oldPosition, + ], + ), + returnValue: _FakeScrollPosition_22( + this, + Invocation.method( + #createScrollPosition, + [ + physics, + context, + oldPosition, + ], + ), + ), + returnValueForMissingStub: _FakeScrollPosition_22( + this, + Invocation.method( + #createScrollPosition, + [ + physics, + context, + oldPosition, + ], + ), + ), + ) as _i3.ScrollPosition); + @override + void debugFillDescription(List? description) => super.noSuchMethod( + Invocation.method( + #debugFillDescription, + [description], + ), + returnValueForMissingStub: null, + ); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [ScrollPosition]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockScrollPosition extends _i1.Mock implements _i3.ScrollPosition { + @override + _i3.ScrollPhysics get physics => (super.noSuchMethod( + Invocation.getter(#physics), + returnValue: _FakeScrollPhysics_23( + this, + Invocation.getter(#physics), + ), + returnValueForMissingStub: _FakeScrollPhysics_23( + this, + Invocation.getter(#physics), + ), + ) as _i3.ScrollPhysics); + @override + _i3.ScrollContext get context => (super.noSuchMethod( + Invocation.getter(#context), + returnValue: _FakeScrollContext_24( + this, + Invocation.getter(#context), + ), + returnValueForMissingStub: _FakeScrollContext_24( + this, + 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 allowImplicitScrolling => (super.noSuchMethod( + Invocation.getter(#allowImplicitScrolling), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + _i9.ScrollDirection get userScrollDirection => (super.noSuchMethod( + Invocation.getter(#userScrollDirection), + returnValue: _i9.ScrollDirection.idle, + returnValueForMissingStub: _i9.ScrollDirection.idle, + ) as _i9.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 + void absorb(_i3.ScrollPosition? other) => super.noSuchMethod( + Invocation.method( + #absorb, + [other], + ), + returnValueForMissingStub: null, + ); + @override + double setPixels(double? newPixels) => (super.noSuchMethod( + Invocation.method( + #setPixels, + [newPixels], + ), + returnValue: 0.0, + returnValueForMissingStub: 0.0, + ) as double); + @override + void correctPixels(double? value) => super.noSuchMethod( + Invocation.method( + #correctPixels, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void correctBy(double? correction) => super.noSuchMethod( + Invocation.method( + #correctBy, + [correction], + ), + returnValueForMissingStub: null, + ); + @override + void forcePixels(double? value) => super.noSuchMethod( + Invocation.method( + #forcePixels, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void saveScrollOffset() => super.noSuchMethod( + Invocation.method( + #saveScrollOffset, + [], + ), + returnValueForMissingStub: null, + ); + @override + void restoreScrollOffset() => super.noSuchMethod( + Invocation.method( + #restoreScrollOffset, + [], + ), + returnValueForMissingStub: null, + ); + @override + void restoreOffset( + double? offset, { + bool? initialRestore = false, + }) => + super.noSuchMethod( + Invocation.method( + #restoreOffset, + [offset], + {#initialRestore: initialRestore}, + ), + returnValueForMissingStub: null, + ); + @override + void saveOffset() => super.noSuchMethod( + Invocation.method( + #saveOffset, + [], + ), + returnValueForMissingStub: null, + ); + @override + double applyBoundaryConditions(double? value) => (super.noSuchMethod( + Invocation.method( + #applyBoundaryConditions, + [value], + ), + returnValue: 0.0, + returnValueForMissingStub: 0.0, + ) as double); + @override + bool applyViewportDimension(double? viewportDimension) => (super.noSuchMethod( + Invocation.method( + #applyViewportDimension, + [viewportDimension], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool applyContentDimensions( + double? minScrollExtent, + double? maxScrollExtent, + ) => + (super.noSuchMethod( + Invocation.method( + #applyContentDimensions, + [ + minScrollExtent, + maxScrollExtent, + ], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool correctForNewDimensions( + _i3.ScrollMetrics? oldPosition, + _i3.ScrollMetrics? newPosition, + ) => + (super.noSuchMethod( + Invocation.method( + #correctForNewDimensions, + [ + oldPosition, + newPosition, + ], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void applyNewDimensions() => super.noSuchMethod( + Invocation.method( + #applyNewDimensions, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future ensureVisible( + _i3.RenderObject? object, { + double? alignment = 0.0, + Duration? duration = Duration.zero, + _i3.Curve? curve = _i3.Curves.ease, + _i3.ScrollPositionAlignmentPolicy? alignmentPolicy = + _i3.ScrollPositionAlignmentPolicy.explicit, + _i3.RenderObject? targetRenderObject, + }) => + (super.noSuchMethod( + Invocation.method( + #ensureVisible, + [object], + { + #alignment: alignment, + #duration: duration, + #curve: curve, + #alignmentPolicy: alignmentPolicy, + #targetRenderObject: targetRenderObject, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + _i6.Future animateTo( + double? to, { + required Duration? duration, + required _i3.Curve? curve, + }) => + (super.noSuchMethod( + Invocation.method( + #animateTo, + [to], + { + #duration: duration, + #curve: curve, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void jumpTo(double? value) => super.noSuchMethod( + Invocation.method( + #jumpTo, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void pointerScroll(double? delta) => super.noSuchMethod( + Invocation.method( + #pointerScroll, + [delta], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future moveTo( + double? to, { + Duration? duration, + _i3.Curve? curve, + bool? clamp = true, + }) => + (super.noSuchMethod( + Invocation.method( + #moveTo, + [to], + { + #duration: duration, + #curve: curve, + #clamp: clamp, + }, + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void jumpToWithoutSettling(double? value) => super.noSuchMethod( + Invocation.method( + #jumpToWithoutSettling, + [value], + ), + returnValueForMissingStub: null, + ); + @override + _i3.ScrollHoldController hold(_i5.VoidCallback? holdCancelCallback) => + (super.noSuchMethod( + Invocation.method( + #hold, + [holdCancelCallback], + ), + returnValue: _FakeScrollHoldController_26( + this, + Invocation.method( + #hold, + [holdCancelCallback], + ), + ), + returnValueForMissingStub: _FakeScrollHoldController_26( + this, + Invocation.method( + #hold, + [holdCancelCallback], + ), + ), + ) as _i3.ScrollHoldController); + @override + _i7.Drag drag( + _i3.DragStartDetails? details, + _i5.VoidCallback? dragCancelCallback, + ) => + (super.noSuchMethod( + Invocation.method( + #drag, + [ + details, + dragCancelCallback, + ], + ), + returnValue: _FakeDrag_27( + this, + Invocation.method( + #drag, + [ + details, + dragCancelCallback, + ], + ), + ), + returnValueForMissingStub: _FakeDrag_27( + this, + Invocation.method( + #drag, + [ + details, + dragCancelCallback, + ], + ), + ), + ) as _i7.Drag); + @override + void beginActivity(_i3.ScrollActivity? newActivity) => super.noSuchMethod( + Invocation.method( + #beginActivity, + [newActivity], + ), + returnValueForMissingStub: null, + ); + @override + void didStartScroll() => super.noSuchMethod( + Invocation.method( + #didStartScroll, + [], + ), + returnValueForMissingStub: null, + ); + @override + void didUpdateScrollPositionBy(double? delta) => super.noSuchMethod( + Invocation.method( + #didUpdateScrollPositionBy, + [delta], + ), + returnValueForMissingStub: null, + ); + @override + void didEndScroll() => super.noSuchMethod( + Invocation.method( + #didEndScroll, + [], + ), + returnValueForMissingStub: null, + ); + @override + void didOverscrollBy(double? value) => super.noSuchMethod( + Invocation.method( + #didOverscrollBy, + [value], + ), + returnValueForMissingStub: null, + ); + @override + void didUpdateScrollDirection(_i9.ScrollDirection? direction) => + super.noSuchMethod( + Invocation.method( + #didUpdateScrollDirection, + [direction], + ), + returnValueForMissingStub: null, + ); + @override + void didUpdateScrollMetrics() => super.noSuchMethod( + Invocation.method( + #didUpdateScrollMetrics, + [], + ), + returnValueForMissingStub: null, + ); + @override + bool recommendDeferredLoading(_i3.BuildContext? context) => + (super.noSuchMethod( + Invocation.method( + #recommendDeferredLoading, + [context], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); + @override + void debugFillDescription(List? description) => super.noSuchMethod( + Invocation.method( + #debugFillDescription, + [description], + ), + returnValueForMissingStub: null, + ); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + _i3.ScrollMetrics copyWith({ + double? minScrollExtent, + double? maxScrollExtent, + double? pixels, + double? viewportDimension, + _i3.AxisDirection? axisDirection, + }) => + (super.noSuchMethod( + Invocation.method( + #copyWith, + [], + { + #minScrollExtent: minScrollExtent, + #maxScrollExtent: maxScrollExtent, + #pixels: pixels, + #viewportDimension: viewportDimension, + #axisDirection: axisDirection, + }, + ), + returnValue: _FakeScrollMetrics_28( + this, + Invocation.method( + #copyWith, + [], + { + #minScrollExtent: minScrollExtent, + #maxScrollExtent: maxScrollExtent, + #pixels: pixels, + #viewportDimension: viewportDimension, + #axisDirection: axisDirection, + }, + ), + ), + returnValueForMissingStub: _FakeScrollMetrics_28( + this, + Invocation.method( + #copyWith, + [], + { + #minScrollExtent: minScrollExtent, + #maxScrollExtent: maxScrollExtent, + #pixels: pixels, + #viewportDimension: viewportDimension, + #axisDirection: axisDirection, + }, + ), + ), + ) as _i3.ScrollMetrics); +} + +/// A class which mocks [StreamSubscription]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockStreamSubscription extends _i1.Mock + implements _i6.StreamSubscription { + @override + bool get isPaused => (super.noSuchMethod( + Invocation.getter(#isPaused), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + _i6.Future cancel() => (super.noSuchMethod( + Invocation.method( + #cancel, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override + void onData(void Function(T)? handleData) => super.noSuchMethod( + Invocation.method( + #onData, + [handleData], + ), + returnValueForMissingStub: null, + ); + @override + void onError(Function? handleError) => super.noSuchMethod( + Invocation.method( + #onError, + [handleError], + ), + returnValueForMissingStub: null, + ); + @override + void onDone(void Function()? handleDone) => super.noSuchMethod( + Invocation.method( + #onDone, + [handleDone], + ), + returnValueForMissingStub: null, + ); + @override + void pause([_i6.Future? resumeSignal]) => super.noSuchMethod( + Invocation.method( + #pause, + [resumeSignal], + ), + returnValueForMissingStub: null, + ); + @override + void resume() => super.noSuchMethod( + Invocation.method( + #resume, + [], + ), + returnValueForMissingStub: null, + ); + @override + _i6.Future asFuture([E? futureValue]) => (super.noSuchMethod( + Invocation.method( + #asFuture, + [futureValue], + ), + returnValue: _i6.Future.value(null), + returnValueForMissingStub: _i6.Future.value(null), + ) as _i6.Future); +} + +/// A class which mocks [FocusNode]. +/// +/// 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), + returnValue: _FakeSize_29( + this, + Invocation.getter(#size), + ), + returnValueForMissingStub: _FakeSize_29( + this, + Invocation.getter(#size), + ), + ) as _i5.Size); + @override + _i5.Offset get offset => (super.noSuchMethod( + Invocation.getter(#offset), + returnValue: _FakeOffset_13( + this, + Invocation.getter(#offset), + ), + returnValueForMissingStub: _FakeOffset_13( + this, + Invocation.getter(#offset), + ), + ) as _i5.Offset); + @override + _i5.Rect get rect => (super.noSuchMethod( + Invocation.getter(#rect), + returnValue: _FakeRect_30( + this, + Invocation.getter(#rect), + ), + returnValueForMissingStub: _FakeRect_30( + this, + Invocation.getter(#rect), + ), + ) as _i5.Rect); + @override + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void unfocus( + {_i3.UnfocusDisposition? disposition = + _i3.UnfocusDisposition.scope}) => + super.noSuchMethod( + Invocation.method( + #unfocus, + [], + {#disposition: disposition}, + ), + returnValueForMissingStub: null, + ); + @override + bool consumeKeyboardToken() => (super.noSuchMethod( + Invocation.method( + #consumeKeyboardToken, + [], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + _i3.FocusAttachment attach( + _i3.BuildContext? context, { + _i3.FocusOnKeyEventCallback? onKeyEvent, + _i3.FocusOnKeyCallback? onKey, + }) => + (super.noSuchMethod( + Invocation.method( + #attach, + [context], + { + #onKeyEvent: onKeyEvent, + #onKey: onKey, + }, + ), + returnValue: _FakeFocusAttachment_31( + this, + Invocation.method( + #attach, + [context], + { + #onKeyEvent: onKeyEvent, + #onKey: onKey, + }, + ), + ), + returnValueForMissingStub: _FakeFocusAttachment_31( + this, + Invocation.method( + #attach, + [context], + { + #onKeyEvent: onKeyEvent, + #onKey: onKey, + }, + ), + ), + ) as _i3.FocusAttachment); + @override + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); + @override + void requestFocus([_i3.FocusNode? node]) => super.noSuchMethod( + Invocation.method( + #requestFocus, + [node], + ), + returnValueForMissingStub: null, + ); + @override + bool nextFocus() => (super.noSuchMethod( + Invocation.method( + #nextFocus, + [], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool previousFocus() => (super.noSuchMethod( + Invocation.method( + #previousFocus, + [], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + bool focusInDirection(_i3.TraversalDirection? direction) => + (super.noSuchMethod( + Invocation.method( + #focusInDirection, + [direction], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + @override + void debugFillProperties(_i10.DiagnosticPropertiesBuilder? properties) => + super.noSuchMethod( + Invocation.method( + #debugFillProperties, + [properties], + ), + returnValueForMissingStub: null, + ); + @override + List<_i3.DiagnosticsNode> debugDescribeChildren() => (super.noSuchMethod( + Invocation.method( + #debugDescribeChildren, + [], + ), + returnValue: <_i3.DiagnosticsNode>[], + returnValueForMissingStub: <_i3.DiagnosticsNode>[], + ) as List<_i3.DiagnosticsNode>); + @override + String toStringShort() => (super.noSuchMethod( + Invocation.method( + #toStringShort, + [], + ), + returnValue: '', + returnValueForMissingStub: '', + ) as String); + @override + String toString({_i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.info}) => + super.toString(); + @override + String toStringShallow({ + String? joiner = r', ', + _i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.debug, + }) => + (super.noSuchMethod( + Invocation.method( + #toStringShallow, + [], + { + #joiner: joiner, + #minLevel: minLevel, + }, + ), + returnValue: '', + returnValueForMissingStub: '', + ) as String); + @override + String toStringDeep({ + String? prefixLineOne = r'', + String? prefixOtherLines, + _i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.debug, + }) => + (super.noSuchMethod( + Invocation.method( + #toStringDeep, + [], + { + #prefixLineOne: prefixLineOne, + #prefixOtherLines: prefixOtherLines, + #minLevel: minLevel, + }, + ), + returnValue: '', + returnValueForMissingStub: '', + ) as String); + @override + _i3.DiagnosticsNode toDiagnosticsNode({ + String? name, + _i10.DiagnosticsTreeStyle? style, + }) => + (super.noSuchMethod( + Invocation.method( + #toDiagnosticsNode, + [], + { + #name: name, + #style: style, + }, + ), + returnValue: _FakeDiagnosticsNode_32( + this, + Invocation.method( + #toDiagnosticsNode, + [], + { + #name: name, + #style: style, + }, + ), + ), + returnValueForMissingStub: _FakeDiagnosticsNode_32( + this, + Invocation.method( + #toDiagnosticsNode, + [], + { + #name: name, + #style: style, + }, + ), + ), + ) as _i3.DiagnosticsNode); + @override + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #removeListener, + [listener], + ), + returnValueForMissingStub: null, + ); + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); +} diff --git a/test/scenario/editing_cell_state/number_cell_editing_test.dart b/test/scenario/editing_cell_state/number_cell_editing_test.dart index 1fe2c5944..95bc22338 100644 --- a/test/scenario/editing_cell_state/number_cell_editing_test.dart +++ b/test/scenario/editing_cell_state/number_cell_editing_test.dart @@ -92,12 +92,12 @@ void main() { PlutoRow(cells: {'column': PlutoCell(value: 12345.11)}), ]; - final mock = MockOnChangeListener(); + final mock = MockMethods(); await tester.pumpWidget(buildGrid( columns: columns, rows: rows, - onChanged: mock.onChangeOneParamListener, + onChanged: mock.oneParamReturnVoid, )); final cellWidget = find.text('12,345.01'); @@ -111,7 +111,7 @@ void main() { await tester.enterText(find.text('12345.01'), '12345.01'); await tester.sendKeyEvent(LogicalKeyboardKey.enter); - verifyNever(mock.onChangeOneParamListener(any)); + verifyNever(mock.oneParamReturnVoid(any)); expect(stateManager.rows.first.cells['column']?.value, 12345.01); }); @@ -130,12 +130,12 @@ void main() { PlutoRow(cells: {'column': PlutoCell(value: 12345.11)}), ]; - final mock = MockOnChangeListener(); + final mock = MockMethods(); await tester.pumpWidget(buildGrid( columns: columns, rows: rows, - onChanged: mock.onChangeOneParamListener, + onChanged: mock.oneParamReturnVoid, )); final cellWidget = find.text('12,345.01'); @@ -149,7 +149,7 @@ void main() { await tester.enterText(find.text('12345.01'), '12345.99'); await tester.sendKeyEvent(LogicalKeyboardKey.enter); - verify(mock.onChangeOneParamListener(any)).called(1); + verify(mock.oneParamReturnVoid(any)).called(1); expect(stateManager.rows.first.cells['column']?.value, 12345.99); }); }); @@ -222,12 +222,12 @@ void main() { PlutoRow(cells: {'column': PlutoCell(value: 12345.11)}), ]; - final mock = MockOnChangeListener(); + final mock = MockMethods(); await tester.pumpWidget(buildGrid( columns: columns, rows: rows, - onChanged: mock.onChangeOneParamListener, + onChanged: mock.oneParamReturnVoid, )); final cellWidget = find.text('12.345,01'); @@ -241,7 +241,7 @@ void main() { await tester.enterText(find.text('12345,01'), '12345,01'); await tester.sendKeyEvent(LogicalKeyboardKey.enter); - verifyNever(mock.onChangeOneParamListener(any)); + verifyNever(mock.oneParamReturnVoid(any)); expect(stateManager.rows.first.cells['column']?.value, 12345.01); }); @@ -260,12 +260,12 @@ void main() { PlutoRow(cells: {'column': PlutoCell(value: 12345.11)}), ]; - final mock = MockOnChangeListener(); + final mock = MockMethods(); await tester.pumpWidget(buildGrid( columns: columns, rows: rows, - onChanged: mock.onChangeOneParamListener, + onChanged: mock.oneParamReturnVoid, )); final cellWidget = find.text('12.345,01'); @@ -279,7 +279,7 @@ void main() { await tester.enterText(find.text('12345,01'), '12345,99'); await tester.sendKeyEvent(LogicalKeyboardKey.enter); - verify(mock.onChangeOneParamListener(any)).called(1); + verify(mock.oneParamReturnVoid(any)).called(1); expect(stateManager.rows.first.cells['column']?.value, 12345.99); }); }); diff --git a/test/scenario/grouping_columns/rendering_test.dart b/test/scenario/grouping_columns/rendering_test.dart new file mode 100644 index 000000000..cc3656535 --- /dev/null +++ b/test/scenario/grouping_columns/rendering_test.dart @@ -0,0 +1,141 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:pluto_grid/pluto_grid.dart'; + +import '../../helper/column_helper.dart'; +import '../../helper/row_helper.dart'; +import '../../helper/test_helper_util.dart'; + +void main() { + late PlutoGridStateManager stateManager; + + Future buildGrid({ + required WidgetTester tester, + required List columns, + required List rows, + List? columnGroups, + }) async { + await TestHelperUtil.changeWidth(tester: tester, width: 1200, height: 800); + + await tester.pumpWidget( + MaterialApp( + home: Material( + child: PlutoGrid( + columns: columns, + rows: rows, + columnGroups: columnGroups, + onLoaded: (PlutoGridOnLoadedEvent event) { + stateManager = event.stateManager; + }, + ), + ), + ), + ); + + await tester.pumpAndSettle(); + } + + testWidgets('1뎁스로 그룹핑 한 컬럼 그룹들이 렌더링 되어야 한다.', (tester) async { + final columns = ColumnHelper.textColumn('column', count: 5, start: 1); + + final rows = RowHelper.count(10, columns); + + final columnGroups = [ + PlutoColumnGroup(title: 'groupA', fields: ['column1', 'column2']), + PlutoColumnGroup(title: 'groupB', fields: ['column3', 'column4']), + PlutoColumnGroup(title: 'groupC', fields: ['column5']), + ]; + + await buildGrid( + tester: tester, + columns: columns, + rows: rows, + columnGroups: columnGroups, + ); + + expect(find.text('groupA'), findsOneWidget); + expect(find.text('groupB'), findsOneWidget); + expect(find.text('groupC'), findsOneWidget); + }); + + testWidgets('expanded 그룹 컬럼은 렌더링 되지 않아야 한다.', (tester) async { + final columns = ColumnHelper.textColumn('column', count: 5, start: 1); + + final rows = RowHelper.count(10, columns); + + final columnGroups = [ + PlutoColumnGroup(title: 'groupA', fields: ['column1', 'column2']), + PlutoColumnGroup(title: 'groupB', fields: ['column3', 'column4']), + PlutoColumnGroup( + title: 'groupC', + fields: ['column5'], + expandedColumn: true, + ), + ]; + + await buildGrid( + tester: tester, + columns: columns, + rows: rows, + columnGroups: columnGroups, + ); + + expect(find.text('groupA'), findsOneWidget); + expect(find.text('groupB'), findsOneWidget); + expect(find.text('groupC'), findsNothing); + }); + + testWidgets('column3 을 hide 하면 groupB 는 hide 되지 않아야 한다.', (tester) async { + final columns = ColumnHelper.textColumn('column', count: 5, start: 1); + + final rows = RowHelper.count(10, columns); + + final columnGroups = [ + PlutoColumnGroup(title: 'groupA', fields: ['column1', 'column2']), + PlutoColumnGroup(title: 'groupB', fields: ['column3', 'column4']), + PlutoColumnGroup(title: 'groupC', fields: ['column5']), + ]; + + await buildGrid( + tester: tester, + columns: columns, + rows: rows, + columnGroups: columnGroups, + ); + + expect(find.text('groupB'), findsOneWidget); + expect(find.text('column3'), findsOneWidget); + expect(find.text('column4'), findsOneWidget); + stateManager.hideColumn(columns[2], true); + await tester.pumpAndSettle(); + + expect(find.text('groupB'), findsOneWidget); + expect(find.text('column3'), findsNothing); + expect(find.text('column4'), findsOneWidget); + }); + + testWidgets('column5 를 hide 하면 groupC 도 hide 되어야 한다.', (tester) async { + final columns = ColumnHelper.textColumn('column', count: 5, start: 1); + + final rows = RowHelper.count(10, columns); + + final columnGroups = [ + PlutoColumnGroup(title: 'groupA', fields: ['column1', 'column2']), + PlutoColumnGroup(title: 'groupB', fields: ['column3', 'column4']), + PlutoColumnGroup(title: 'groupC', fields: ['column5']), + ]; + + await buildGrid( + tester: tester, + columns: columns, + rows: rows, + columnGroups: columnGroups, + ); + + expect(find.text('groupC'), findsOneWidget); + stateManager.hideColumn(columns[4], true); + await tester.pumpAndSettle(); + + expect(find.text('groupC'), findsNothing); + }); +} diff --git a/test/scenario/grouping_rows/checkbox_test.dart b/test/scenario/grouping_rows/checkbox_test.dart new file mode 100644 index 000000000..054002d8e --- /dev/null +++ b/test/scenario/grouping_rows/checkbox_test.dart @@ -0,0 +1,313 @@ +// ignore_for_file: non_constant_identifier_names + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid/src/ui/ui.dart'; + +import '../../helper/test_helper_util.dart'; + +void main() { + late PlutoGridStateManager stateManager; + + Future buildGrid({ + required WidgetTester tester, + required List columns, + required List rows, + required PlutoRowGroupDelegate delegate, + Widget Function(PlutoGridStateManager)? createFooter, + }) async { + await TestHelperUtil.changeWidth(tester: tester, width: 1200, height: 800); + + await tester.pumpWidget( + MaterialApp( + home: Material( + child: PlutoGrid( + columns: columns, + rows: rows, + createFooter: createFooter, + onLoaded: (PlutoGridOnLoadedEvent event) { + stateManager = event.stateManager; + stateManager.setRowGroup(delegate); + }, + ), + ), + ), + ); + + await tester.pumpAndSettle(); + } + + Finder findExpandIcon(String cellValue) { + return find.descendant( + of: find.ancestor( + of: find.text(cellValue), + matching: find.byType(PlutoDefaultCell), + ), + matching: find.byType(IconButton), + ); + } + + Finder findAllCheckbox(String columnTitle) { + return find.descendant( + of: find.ancestor( + of: find.text('column1'), + matching: find.byType(PlutoColumnTitle), + ), + matching: find.byType(Checkbox), + ); + } + + Checkbox findAllCheckboxWidget(String cellValue) { + return findAllCheckbox(cellValue).first.evaluate().first.widget as Checkbox; + } + + Finder findCheckbox(String cellValue) { + return find.descendant( + of: find.ancestor( + of: find.text(cellValue), + matching: find.byType(PlutoDefaultCell), + ), + matching: find.byType(Checkbox), + ); + } + + Checkbox findCheckboxWidget(String cellValue) { + return findCheckbox(cellValue).first.evaluate().first.widget as Checkbox; + } + + group('PlutoRowGroupTreeDelegate - 3 뎁스로 그룹핑.', () { + late List columns; + + late List rows; + + late PlutoRowGroupDelegate delegate; + + setUp(() { + columns = [ + PlutoColumn( + title: 'column1', + field: 'column1', + type: PlutoColumnType.text(), + enableRowChecked: true, + ), + PlutoColumn( + title: 'column2', field: 'column2', type: PlutoColumnType.text()), + PlutoColumn( + title: 'column3', field: 'column3', type: PlutoColumnType.text()), + PlutoColumn( + title: 'column4', field: 'column4', type: PlutoColumnType.text()), + PlutoColumn( + title: 'column5', field: 'column5', type: PlutoColumnType.text()), + ]; + + rows = [ + createRow('A', 'a1', 'a2', 'a3', 'a4', columns), + createGroup('B', 'b1', 'b2', 'b3', 'b4', columns, [ + createRow('B1', 'b1-1', 'b1-2', 'b1-3', 'b1-3', columns), + createRow('B2', 'b2-1', 'b2-2', 'b2-3', 'b2-4', columns), + createRow('B3', 'b3-1', 'b3-2', 'b3-3', 'b3-4', columns), + createGroup('B4', 'b4-1', 'b4-2', 'b4-3', 'b4-4', columns, [ + createRow('B41', 'b41-1', 'b41-2', 'b41-3', 'b41-4', columns), + createRow('B42', 'b42-1', 'b42-2', 'b42-3', 'b42-4', columns), + createGroup('B43', 'b43-1', 'b43-2', 'b43-3', 'b43-4', columns, [ + createRow( + 'B431', 'b431-1', 'b431-2', 'b431-3', 'b431-4', columns), + createRow( + 'B432', 'b432-1', 'b432-2', 'b432-3', 'b432-4', columns), + ]), + ]), + ]), + createRow('C', 'c1', 'c2', 'c3', 'c4', columns), + createRow('D', 'd1', 'd2', 'd3', 'd4', columns), + createGroup('E', 'e1', 'e2', 'e3', 'e4', columns, [ + createRow('E1', 'e1-1', 'e1-2', 'e1-3', 'e1-4', columns), + createRow('E2', 'e2-1', 'e2-2', 'e2-3', 'e2-4', columns), + ]), + ]; + + delegate = PlutoRowGroupTreeDelegate( + resolveColumnDepth: (column) => + int.parse(column.field.replaceAll('column', '')) - 1, + showText: (cell) => true, + ); + }); + + testWidgets('전체 체크박스를 체크하면 모든 그룹과 행이 체크 되어야 한다.', (tester) async { + await buildGrid( + tester: tester, + columns: columns, + rows: rows, + delegate: delegate, + ); + + final allCheckBox = findAllCheckbox('column1'); + expect(allCheckBox, findsOneWidget); + + await tester.tap(allCheckBox); + await tester.pumpAndSettle(); + + expect(findCheckboxWidget('A').value, true); + expect(findCheckboxWidget('B').value, true); + expect(findCheckboxWidget('C').value, true); + expect(findCheckboxWidget('D').value, true); + expect(findCheckboxWidget('E').value, true); + }); + + testWidgets('E 그룹을 체크 하면 E 그룹의 하위 행들이 체크 되어야 한다.', (tester) async { + await buildGrid( + tester: tester, + columns: columns, + rows: rows, + delegate: delegate, + ); + + // 최초 아무것도 체크 되지 않은 상태 tristate 는 false + expect(findAllCheckboxWidget('column1').value, false); + + await tester.tap(findCheckbox('E')); + await tester.pumpAndSettle(); + + // 행 하나가 체크 되어 tristate 가 null + expect(findAllCheckboxWidget('column1').value, null); + + expect(findCheckboxWidget('E').value, true); + + await tester.tap(findExpandIcon('E')); + await tester.pumpAndSettle(); + + expect(findCheckboxWidget('E1').value, true); + expect(findCheckboxWidget('E2').value, true); + }); + + testWidgets( + 'E 그룹을 체크후 하위 행 E1을 체크 해제 하면, ' + 'All 체크박스와 E 그룹의 체크박스의 tristate 가 null 이어야 한다.', + (tester) async { + await buildGrid( + tester: tester, + columns: columns, + rows: rows, + delegate: delegate, + ); + + await tester.tap(findCheckbox('E')); + await tester.pumpAndSettle(); + + await tester.tap(findExpandIcon('E')); + await tester.pumpAndSettle(); + + await tester.tap(findCheckbox('E1')); + await tester.pumpAndSettle(); + + expect(findAllCheckboxWidget('column1').value, null); + expect(findCheckboxWidget('E').value, null); + + expect(findCheckboxWidget('E1').value, false); + expect(findCheckboxWidget('E2').value, true); + }, + ); + + testWidgets('전체 체크박스를 체크후 하위 그룹을 열면 하위 행들이 체크 되어 있어야 한다.', (tester) async { + await buildGrid( + tester: tester, + columns: columns, + rows: rows, + delegate: delegate, + ); + + final allCheckBox = findAllCheckbox('column1'); + expect(allCheckBox, findsOneWidget); + + await tester.tap(allCheckBox); + await tester.pumpAndSettle(); + + final B_GROUP_EXPAND_ICON = findExpandIcon('B'); + await tester.tap(B_GROUP_EXPAND_ICON); + await tester.pumpAndSettle(); + + expect(find.text('B1'), findsOneWidget); + expect(find.text('B2'), findsOneWidget); + expect(find.text('B3'), findsOneWidget); + expect(find.text('B4'), findsOneWidget); + expect(findCheckboxWidget('B1').value, true); + expect(findCheckboxWidget('B2').value, true); + expect(findCheckboxWidget('B3').value, true); + expect(findCheckboxWidget('B4').value, true); + + // showFirstExpandableIcon 가 false 이므로 두번째 컬럼의 셀에 확장 아이콘이 있다. + final B4_GROUP_EXPAND_ICON = findExpandIcon('b4-1'); + await tester.tap(B4_GROUP_EXPAND_ICON); + await tester.pumpAndSettle(); + + expect(find.text('B41'), findsOneWidget); + expect(find.text('B42'), findsOneWidget); + expect(find.text('B43'), findsOneWidget); + expect(findCheckboxWidget('B41').value, true); + expect(findCheckboxWidget('B42').value, true); + expect(findCheckboxWidget('B43').value, true); + + // showFirstExpandableIcon 가 false 이므로 세번째 컬럼의 셀에 확장 아이콘이 있다. + final B43_GROUP_EXPAND_ICON = findExpandIcon('b43-2'); + await tester.tap(B43_GROUP_EXPAND_ICON); + await tester.pumpAndSettle(); + + expect(find.text('B431'), findsOneWidget); + expect(find.text('B432'), findsOneWidget); + expect(findCheckboxWidget('B431').value, true); + expect(findCheckboxWidget('B432').value, true); + }); + }); +} + +PlutoRow createRow( + String value1, + String value2, + String value3, + String value4, + String value5, + List columns, [ + PlutoRowType? type, +]) { + final Map cells = {}; + + final row = PlutoRow(cells: cells, type: type); + + cells['column1'] = PlutoCell(value: value1) + ..setRow(row) + ..setColumn(columns[0]); + cells['column2'] = PlutoCell(value: value2) + ..setRow(row) + ..setColumn(columns[1]); + cells['column3'] = PlutoCell(value: value3) + ..setRow(row) + ..setColumn(columns[2]); + cells['column4'] = PlutoCell(value: value4) + ..setRow(row) + ..setColumn(columns[3]); + cells['column5'] = PlutoCell(value: value5) + ..setRow(row) + ..setColumn(columns[4]); + + return row; +} + +PlutoRow createGroup( + String value1, + String value2, + String value3, + String value4, + String value5, + List columns, + List children, +) { + return createRow( + value1, + value2, + value3, + value4, + value5, + columns, + PlutoRowType.group(children: FilteredList(initialList: children)), + ); +} diff --git a/test/scenario/grouping_rows/rendering_test.dart b/test/scenario/grouping_rows/rendering_test.dart new file mode 100644 index 000000000..b75516ebc --- /dev/null +++ b/test/scenario/grouping_rows/rendering_test.dart @@ -0,0 +1,376 @@ +// ignore_for_file: non_constant_identifier_names + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid/src/ui/ui.dart'; + +import '../../helper/column_helper.dart'; +import '../../helper/test_helper_util.dart'; + +void main() { + late PlutoGridStateManager stateManager; + + Future buildGrid({ + required WidgetTester tester, + required List columns, + required List rows, + required PlutoRowGroupDelegate delegate, + Widget Function(PlutoGridStateManager)? createFooter, + }) async { + await TestHelperUtil.changeWidth(tester: tester, width: 1200, height: 800); + + await tester.pumpWidget( + MaterialApp( + home: Material( + child: PlutoGrid( + columns: columns, + rows: rows, + createFooter: createFooter, + onLoaded: (PlutoGridOnLoadedEvent event) { + stateManager = event.stateManager; + stateManager.setRowGroup(delegate); + }, + ), + ), + ), + ); + + await tester.pumpAndSettle(); + } + + group('PlutoRowGroupTreeDelegate - 3 뎁스로 그룹핑.', () { + late List columns; + + late List rows; + + setUp(() { + columns = [ + PlutoColumn( + title: 'column1', field: 'column1', type: PlutoColumnType.text()), + PlutoColumn( + title: 'column2', field: 'column2', type: PlutoColumnType.text()), + PlutoColumn( + title: 'column3', field: 'column3', type: PlutoColumnType.text()), + PlutoColumn( + title: 'column4', field: 'column4', type: PlutoColumnType.text()), + PlutoColumn( + title: 'column5', field: 'column5', type: PlutoColumnType.text()), + ]; + + rows = [ + createRow('A', 'a1', 'a2', 'a3', 'a4', columns), + createGroup('B', 'b1', 'b2', 'b3', 'b4', columns, [ + createRow('B1', 'b1-1', 'b1-2', 'b1-3', 'b1-3', columns), + createRow('B2', 'b2-1', 'b2-2', 'b2-3', 'b2-4', columns), + createRow('B3', 'b3-1', 'b3-2', 'b3-3', 'b3-4', columns), + createGroup('B4', 'b4-1', 'b4-2', 'b4-3', 'b4-4', columns, [ + createRow('B41', 'b41-1', 'b41-2', 'b41-3', 'b41-4', columns), + createRow('B42', 'b42-1', 'b42-2', 'b42-3', 'b42-4', columns), + createGroup('B43', 'b43-1', 'b43-2', 'b43-3', 'b43-4', columns, [ + createRow( + 'B431', 'b431-1', 'b431-2', 'b431-3', 'b431-4', columns), + createRow( + 'B432', 'b432-1', 'b432-2', 'b432-3', 'b432-4', columns), + ]), + ]), + ]), + createRow('C', 'c1', 'c2', 'c3', 'c4', columns), + createRow('D', 'd1', 'd2', 'd3', 'd4', columns), + createGroup('E', 'e1', 'e2', 'e3', 'e4', columns, [ + createRow('E1', 'e1-1', 'e1-2', 'e1-3', 'e1-4', columns), + createRow('E2', 'e2-1', 'e2-2', 'e2-3', 'e2-4', columns), + ]), + ]; + }); + + testWidgets( + 'showFirstExpandableIcon 가 true 인 경우 첫번째 셀에 expand 아이콘이 렌더링 되어야 한다.', + (tester) async { + await buildGrid( + tester: tester, + columns: columns, + rows: rows, + delegate: PlutoRowGroupTreeDelegate( + resolveColumnDepth: (column) => + int.parse(column.field.replaceAll('column', '')) - 1, + showText: (cell) => true, + showFirstExpandableIcon: true, + ), + ); + + final B_CELL = find.ancestor( + of: find.text('B'), + matching: find.byType(PlutoDefaultCell), + ); + + final E_CELL = find.ancestor( + of: find.text('E'), + matching: find.byType(PlutoDefaultCell), + ); + + final B_EXPAND_ICON = find.descendant( + of: B_CELL, + matching: find.byType(IconButton), + ); + + final E_EXPAND_ICON = find.descendant( + of: E_CELL, + matching: find.byType(IconButton), + ); + + expect(B_EXPAND_ICON, findsOneWidget); + expect(E_EXPAND_ICON, findsOneWidget); + + await tester.tap(B_EXPAND_ICON); + await tester.pumpAndSettle(); + + // Normal row + { + final B1_ROW = stateManager.refRows[2]; + expect(B1_ROW.cells.values.first.value, 'B1'); + + final B1_CELL = find.ancestor( + of: find.text('B1'), + matching: find.byType(PlutoDefaultCell), + ); + + final B1_EXPAND_ICON = find.descendant( + of: B1_CELL, + matching: find.byType(IconButton), + ); + + final B1_SIZED_BOX = find + .descendant( + of: B1_CELL, + matching: find.byType(SizedBox), + ) + .first; + + final B1_SIZED_BOX_WIDGET = + B1_SIZED_BOX.evaluate().first.widget as SizedBox; + + final gap = stateManager.style.iconSize * 1.5; + // Normal 행은 (depth + 1) * gap + final depth = B1_ROW.depth + 1; + + expect(B1_CELL, findsOneWidget); + expect(B1_EXPAND_ICON, findsNothing); + expect(B1_SIZED_BOX_WIDGET.width, gap * depth); + } + + // Group row + { + final B4_ROW = stateManager.refRows[5]; + expect(B4_ROW.cells.values.first.value, 'B4'); + + final B4_CELL = find.ancestor( + of: find.text('B4'), + matching: find.byType(PlutoDefaultCell), + ); + + final B4_EXPAND_ICON = find.descendant( + of: B4_CELL, + matching: find.byType(IconButton), + ); + + final B4_SIZED_BOX = find + .descendant( + of: B4_CELL, + matching: find.byType(SizedBox), + ) + .first; + + final B4_SIZED_BOX_WIDGET = + B4_SIZED_BOX.evaluate().first.widget as SizedBox; + + final gap = stateManager.style.iconSize * 1.5; + final depth = B4_ROW.depth; + + expect(B4_CELL, findsOneWidget); + expect(B4_EXPAND_ICON, findsOneWidget); + expect(B4_SIZED_BOX_WIDGET.width, gap * depth); + } + }, + ); + }); + + group('PlutoRowGroupByColumnDelegate - 2개 컬럼으로 그룹핑.', () { + late List columns; + + late List rows; + + setUp(() { + columns = ColumnHelper.textColumn('column', count: 5, start: 1); + + rows = [ + createRow('A', 'a1', 'a1-1', 'a1-1', 'a1-1', columns), + createRow('A', 'a1', 'a1-2', 'a1-2', 'a1-2', columns), + createRow('A', 'a2', 'a2-1', 'a2-1', 'a2-1', columns), + createRow('A', 'a2', 'a2-2', 'a2-2', 'a2-2', columns), + createRow('A', 'a2', 'a2-3', 'a2-3', 'a2-3', columns), + createRow('A', 'a3', 'a3-1', 'a3-1', 'a3-1', columns), + createRow('B', 'b1', 'b1-1', 'b1-1', 'b1-1', columns), + createRow('B', 'b1', 'b1-2', 'b1-2', 'b1-2', columns), + createRow('B', 'b2', 'b2-1', 'b2-1', 'b2-1', columns), + createRow('B', 'b2', 'b2-2', 'b2-2', 'b2-2', columns), + createRow('B', 'b2', 'b2-3', 'b2-3', 'b2-3', columns), + createRow('B', 'b3', 'b3-1', 'b3-1', 'b3-1', columns), + ]; + }); + + testWidgets( + 'showFirstExpandableIcon 가 true 인 경우 expand 아이콘이 첫번째 컬럼에 렌더링 되어야 한다.', + (tester) async { + await buildGrid( + tester: tester, + columns: columns, + rows: rows, + delegate: PlutoRowGroupByColumnDelegate( + columns: [columns[0], columns[1]], + showFirstExpandableIcon: true, + ), + ); + + // 2 개의 컬럼으로 groupBy 후 expand 아이콘을 첫번째 컬럼에 강제로 표시하기 위해 + // 두번째 컬럼은 숨김 처리 한다. + stateManager.hideColumn(columns[1], true); + await tester.pumpAndSettle(); + + final A_CELL = find.ancestor( + of: find.text('A'), + matching: find.byType(PlutoDefaultCell), + ); + + final A_CELL_OFFSET = tester.getTopLeft(A_CELL); + + final A_EXPAND_ICON = find.descendant( + of: A_CELL, + matching: find.byType(IconButton), + ); + + expect(A_CELL, findsOneWidget); + expect(A_EXPAND_ICON, findsOneWidget); + + await tester.tap(A_EXPAND_ICON); + await tester.pumpAndSettle(); + + final A1_CELL = find.ancestor( + of: find.text('a1'), + matching: find.byType(PlutoDefaultCell), + ); + + final A1_EXPAND_ICON = find.descendant( + of: A1_CELL, + matching: find.byType(IconButton), + ); + + expect(A1_CELL, findsOneWidget); + expect(A1_EXPAND_ICON, findsOneWidget); + expect(tester.getTopLeft(A1_CELL).dx, A_CELL_OFFSET.dx); + }, + ); + + testWidgets( + 'showFirstExpandableIcon 가 false 인 경우 expand 아이콘이 컬럼 위치에 맞게 렌더링 되어야 한다.', + (tester) async { + await buildGrid( + tester: tester, + columns: columns, + rows: rows, + delegate: PlutoRowGroupByColumnDelegate( + columns: [columns[0], columns[1]], + showFirstExpandableIcon: false, + ), + ); + + final A_CELL = find.ancestor( + of: find.text('A'), + matching: find.byType(PlutoDefaultCell), + ); + + final A_CELL_OFFSET = tester.getTopLeft(A_CELL); + + final A_EXPAND_ICON = find.descendant( + of: A_CELL, + matching: find.byType(IconButton), + ); + + expect(A_CELL, findsOneWidget); + expect(A_EXPAND_ICON, findsOneWidget); + + await tester.tap(A_EXPAND_ICON); + await tester.pumpAndSettle(); + + final A1_CELL = find.ancestor( + of: find.text('a1'), + matching: find.byType(PlutoDefaultCell), + ); + + final A1_EXPAND_ICON = find.descendant( + of: A1_CELL, + matching: find.byType(IconButton), + ); + + expect(A1_CELL, findsOneWidget); + expect(A1_EXPAND_ICON, findsOneWidget); + expect( + tester.getTopLeft(A1_CELL).dx, + A_CELL_OFFSET.dx + PlutoGridSettings.columnWidth, + ); + }, + ); + }); +} + +PlutoRow createRow( + String value1, + String value2, + String value3, + String value4, + String value5, + List columns, [ + PlutoRowType? type, +]) { + final Map cells = {}; + + final row = PlutoRow(cells: cells, type: type); + + cells['column1'] = PlutoCell(value: value1) + ..setRow(row) + ..setColumn(columns[0]); + cells['column2'] = PlutoCell(value: value2) + ..setRow(row) + ..setColumn(columns[1]); + cells['column3'] = PlutoCell(value: value3) + ..setRow(row) + ..setColumn(columns[2]); + cells['column4'] = PlutoCell(value: value4) + ..setRow(row) + ..setColumn(columns[3]); + cells['column5'] = PlutoCell(value: value5) + ..setRow(row) + ..setColumn(columns[4]); + + return row; +} + +PlutoRow createGroup( + String value1, + String value2, + String value3, + String value4, + String value5, + List columns, + List children, +) { + return createRow( + value1, + value2, + value3, + value4, + value5, + columns, + PlutoRowType.group(children: FilteredList(initialList: children)), + ); +} diff --git a/test/scenario/grouping_rows/sorting_tree_group_test.dart b/test/scenario/grouping_rows/sorting_tree_group_test.dart new file mode 100644 index 000000000..0d2ffa282 --- /dev/null +++ b/test/scenario/grouping_rows/sorting_tree_group_test.dart @@ -0,0 +1,457 @@ +// ignore_for_file: non_constant_identifier_names + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:pluto_grid/pluto_grid.dart'; +import 'package:pluto_grid/src/ui/ui.dart'; + +import '../../helper/test_helper_util.dart'; + +void main() { + late PlutoGridStateManager stateManager; + + Future buildGrid({ + required WidgetTester tester, + required List columns, + required List rows, + Widget Function(PlutoGridStateManager)? createFooter, + }) async { + await TestHelperUtil.changeWidth(tester: tester, width: 1200, height: 800); + + await tester.pumpWidget( + MaterialApp( + home: Material( + child: PlutoGrid( + columns: columns, + rows: rows, + createFooter: createFooter, + onLoaded: (PlutoGridOnLoadedEvent event) { + stateManager = event.stateManager; + stateManager.setRowGroup(PlutoRowGroupTreeDelegate( + resolveColumnDepth: (column) => + int.parse(column.field.replaceAll('column', '')) - 1, + showText: (cell) => true, + )); + }, + ), + ), + ), + ); + + await tester.pumpAndSettle(); + } + + group('3 뎁스로 그룹핑.', () { + late List columns; + + late List rows; + + setUp(() { + columns = [ + PlutoColumn( + title: 'column1', field: 'column1', type: PlutoColumnType.text()), + PlutoColumn( + title: 'column2', field: 'column2', type: PlutoColumnType.text()), + PlutoColumn( + title: 'column3', field: 'column3', type: PlutoColumnType.text()), + PlutoColumn( + title: 'column4', field: 'column4', type: PlutoColumnType.text()), + PlutoColumn( + title: 'column5', field: 'column5', type: PlutoColumnType.text()), + ]; + + rows = [ + createRow('A', 'a1', 'a2', 'a3', 'a4', columns), + createGroup('B', 'b1', 'b2', 'b3', 'b4', columns, [ + createRow('B1', 'b1-1', 'b1-2', 'b1-3', 'b1-3', columns), + createRow('B2', 'b2-1', 'b2-2', 'b2-3', 'b2-4', columns), + createRow('B3', 'b3-1', 'b3-2', 'b3-3', 'b3-4', columns), + createGroup('B4', 'b4-1', 'b4-2', 'b4-3', 'b4-4', columns, [ + createRow('B41', 'b41-1', 'b41-2', 'b41-3', 'b41-4', columns), + createRow('B42', 'b42-1', 'b42-2', 'b42-3', 'b42-4', columns), + createGroup('B43', 'b43-1', 'b43-2', 'b43-3', 'b43-4', columns, [ + createRow( + 'B431', 'b431-1', 'b431-2', 'b431-3', 'b431-4', columns), + createRow( + 'B432', 'b432-1', 'b432-2', 'b432-3', 'b432-4', columns), + ]), + ]), + ]), + createRow('C', 'c1', 'c2', 'c3', 'c4', columns), + createRow('D', 'd1', 'd2', 'd3', 'd4', columns), + createGroup('E', 'e1', 'e2', 'e3', 'e4', columns, [ + createRow('E1', 'e1-1', 'e1-2', 'e1-3', 'e1-4', columns), + createRow('E2', 'e2-1', 'e2-2', 'e2-3', 'e2-4', columns), + ]), + ]; + }); + + testWidgets('5개의 행이 출력 되어야 한다.', (tester) async { + await buildGrid(tester: tester, columns: columns, rows: rows); + + final A = find.text('A'); + final B = find.text('B'); + final C = find.text('C'); + final D = find.text('D'); + final E = find.text('E'); + + expect(A, findsOneWidget); + expect(B, findsOneWidget); + expect(C, findsOneWidget); + expect(D, findsOneWidget); + expect(E, findsOneWidget); + }); + + testWidgets('기본 행의 순서가 위치에 맞아야 한다.', (tester) async { + await buildGrid(tester: tester, columns: columns, rows: rows); + + final A = tester.getTopLeft(find.text('A')); + final B = tester.getTopLeft(find.text('B')); + final C = tester.getTopLeft(find.text('C')); + final D = tester.getTopLeft(find.text('D')); + final E = tester.getTopLeft(find.text('E')); + + expect(A.dy, lessThan(B.dy)); + expect(B.dy, lessThan(C.dy)); + expect(C.dy, lessThan(D.dy)); + expect(D.dy, lessThan(E.dy)); + expect(E.dy, greaterThan(D.dy)); + }); + + testWidgets('column1 을 descending 정렬하면 순서가 바뀌어야 한다.', (tester) async { + await buildGrid(tester: tester, columns: columns, rows: rows); + + await tester.tap(find.text('column1')); + await tester.tap(find.text('column1')); + await tester.pumpAndSettle(); + + final A = tester.getTopLeft(find.text('A')); + final B = tester.getTopLeft(find.text('B')); + final C = tester.getTopLeft(find.text('C')); + final D = tester.getTopLeft(find.text('D')); + final E = tester.getTopLeft(find.text('E')); + + expect(E.dy, lessThan(D.dy)); + expect(D.dy, greaterThan(E.dy)); + expect(C.dy, greaterThan(D.dy)); + expect(B.dy, greaterThan(C.dy)); + expect(A.dy, greaterThan(B.dy)); + }); + + testWidgets('column2 을 descending 정렬하면 순서가 바뀌어야 한다.', (tester) async { + await buildGrid(tester: tester, columns: columns, rows: rows); + + await tester.tap(find.text('column2')); + await tester.tap(find.text('column2')); + await tester.pumpAndSettle(); + + final A1 = tester.getTopLeft(find.text('a1')); + final B1 = tester.getTopLeft(find.text('b1')); + final C1 = tester.getTopLeft(find.text('c1')); + final D1 = tester.getTopLeft(find.text('d1')); + final E1 = tester.getTopLeft(find.text('e1')); + + expect(E1.dy, lessThan(D1.dy)); + expect(D1.dy, greaterThan(E1.dy)); + expect(C1.dy, greaterThan(D1.dy)); + expect(B1.dy, greaterThan(C1.dy)); + expect(A1.dy, greaterThan(B1.dy)); + }); + + testWidgets('B 를 expand 후 column1 을 descending 정렬하면 순서가 바뀌어야 한다.', + (tester) async { + await buildGrid(tester: tester, columns: columns, rows: rows); + + final GROUP_B_TOGGLE_BTN = find + .descendant( + of: find.ancestor( + of: find.text('B'), + matching: find.byType(PlutoDefaultCell), + ), + matching: find.byType(IconButton), + ) + .first; + await tester.tap(GROUP_B_TOGGLE_BTN); + + await tester.tap(find.text('column1')); + await tester.tap(find.text('column1')); + await tester.pumpAndSettle(); + + final A = tester.getTopLeft(find.text('A')); + final B = tester.getTopLeft(find.text('B')); + final B1 = tester.getTopLeft(find.text('B1')); + final B2 = tester.getTopLeft(find.text('B2')); + final B3 = tester.getTopLeft(find.text('B3')); + final B4 = tester.getTopLeft(find.text('B4')); + final C = tester.getTopLeft(find.text('C')); + final D = tester.getTopLeft(find.text('D')); + final E = tester.getTopLeft(find.text('E')); + + expect(E.dy, lessThan(D.dy)); + expect(D.dy, lessThan(C.dy)); + expect(C.dy, lessThan(B.dy)); + expect(B.dy, lessThan(B4.dy)); + expect(B4.dy, lessThan(B3.dy)); + expect(B3.dy, lessThan(B2.dy)); + expect(B2.dy, lessThan(B1.dy)); + expect(B1.dy, lessThan(A.dy)); + expect(A.dy, greaterThan(B1.dy)); + }); + + testWidgets( + 'column1 을 descending 정렬후 B 를 expand 하면 B1~4 도 정렬 되어 출력 되어야 한다.', + (tester) async { + await buildGrid(tester: tester, columns: columns, rows: rows); + + await tester.tap(find.text('column1')); + await tester.tap(find.text('column1')); + await tester.pumpAndSettle(); + + { + final A = tester.getTopLeft(find.text('A')); + final B = tester.getTopLeft(find.text('B')); + final C = tester.getTopLeft(find.text('C')); + final D = tester.getTopLeft(find.text('D')); + final E = tester.getTopLeft(find.text('E')); + + expect(E.dy, lessThan(D.dy)); + expect(D.dy, greaterThan(E.dy)); + expect(C.dy, greaterThan(D.dy)); + expect(B.dy, greaterThan(C.dy)); + expect(A.dy, greaterThan(B.dy)); + } + + final GROUP_B_TOGGLE_BTN = find + .descendant( + of: find.ancestor( + of: find.text('B'), + matching: find.byType(PlutoDefaultCell), + ), + matching: find.byType(IconButton), + ) + .first; + await tester.tap(GROUP_B_TOGGLE_BTN); + + await tester.pumpAndSettle(); + + { + final A = tester.getTopLeft(find.text('A')); + final B = tester.getTopLeft(find.text('B')); + final B1 = tester.getTopLeft(find.text('B1')); + final B2 = tester.getTopLeft(find.text('B2')); + final B3 = tester.getTopLeft(find.text('B3')); + final B4 = tester.getTopLeft(find.text('B4')); + final C = tester.getTopLeft(find.text('C')); + final D = tester.getTopLeft(find.text('D')); + final E = tester.getTopLeft(find.text('E')); + + expect(E.dy, lessThan(D.dy)); + expect(D.dy, lessThan(C.dy)); + expect(C.dy, lessThan(B.dy)); + expect(B.dy, lessThan(B4.dy)); + expect(B4.dy, lessThan(B3.dy)); + expect(B3.dy, lessThan(B2.dy)); + expect(B2.dy, lessThan(B1.dy)); + expect(B1.dy, lessThan(A.dy)); + expect(A.dy, greaterThan(B1.dy)); + } + }); + + testWidgets( + 'column1 을 b 로 필터링 후 column1 을 descending 정렬후, ' + '필터를 풀면 순서가 바뀌어야 한다.', (tester) async { + await buildGrid(tester: tester, columns: columns, rows: rows); + + stateManager.setShowColumnFilter(true); + await tester.pumpAndSettle(); + + final COLUMN1_FILTER = find.descendant( + of: find.ancestor( + of: find.text('column1'), + matching: find.byType(PlutoBaseColumn), + ), + matching: find.byType(TextField)); + await tester.tap(COLUMN1_FILTER); + await tester.tap(COLUMN1_FILTER); + await tester.enterText(COLUMN1_FILTER, 'b'); + await tester.pumpAndSettle(const Duration(seconds: 1)); + + await tester.tap(find.byType(PlutoColumnTitle).first); + await tester.tap(find.byType(PlutoColumnTitle).first); + await tester.pumpAndSettle(); + expect(stateManager.getSortedColumn?.field, 'column1'); + + { + final A = find.text('A'); + final B = find.text('B'); + final C = find.text('C'); + final D = find.text('D'); + final E = find.text('E'); + + expect(A, findsNothing); + expect(B, findsOneWidget); + expect(C, findsNothing); + expect(D, findsNothing); + expect(E, findsNothing); + } + + stateManager.setFilter(null); + await tester.pumpAndSettle(); + + { + final A = tester.getTopLeft(find.text('A')); + final B = tester.getTopLeft(find.text('B')); + final C = tester.getTopLeft(find.text('C')); + final D = tester.getTopLeft(find.text('D')); + final E = tester.getTopLeft(find.text('E')); + + expect(E.dy, lessThan(D.dy)); + expect(D.dy, greaterThan(E.dy)); + expect(C.dy, greaterThan(D.dy)); + expect(B.dy, greaterThan(C.dy)); + expect(A.dy, greaterThan(B.dy)); + } + }); + + testWidgets( + '2개로 pagination 후 column3 을 정렬 하면 하면 페이지의 행들의 위치가 정렬 되어야 한다.', + (tester) async { + await buildGrid( + tester: tester, + columns: columns, + rows: rows, + createFooter: (s) { + s.setPageSize(2); + return PlutoPagination(s); + }, + ); + + { + final A = find.text('A'); + final B = find.text('B'); + final C = find.text('C'); + final D = find.text('D'); + final E = find.text('E'); + + expect(A, findsOneWidget); + expect(B, findsOneWidget); + + expect(C, findsNothing); + expect(D, findsNothing); + expect(E, findsNothing); + } + + await tester.tap(find.byType(PlutoColumnTitle).at(2)); + await tester.tap(find.byType(PlutoColumnTitle).at(2)); + await tester.pumpAndSettle(); + expect(stateManager.getSortedColumn?.field, 'column3'); + + { + final A = find.text('A'); + final B = find.text('B'); + final C = find.text('C'); + final D = find.text('D'); + final E = find.text('E'); + + expect(E, findsOneWidget); + expect(D, findsOneWidget); + expect(tester.getTopLeft(E).dy, lessThan(tester.getTopLeft(D).dy)); + + expect(C, findsNothing); + expect(B, findsNothing); + expect(A, findsNothing); + } + + { + stateManager.setPage(2); + await tester.pumpAndSettle(); + + final A = find.text('A'); + final B = find.text('B'); + final C = find.text('C'); + final D = find.text('D'); + final E = find.text('E'); + + expect(E, findsNothing); + expect(D, findsNothing); + + expect(C, findsOneWidget); + expect(B, findsOneWidget); + expect(tester.getTopLeft(C).dy, lessThan(tester.getTopLeft(B).dy)); + + expect(A, findsNothing); + } + + { + stateManager.setPage(3); + await tester.pumpAndSettle(); + + final A = find.text('A'); + final B = find.text('B'); + final C = find.text('C'); + final D = find.text('D'); + final E = find.text('E'); + + expect(E, findsNothing); + expect(D, findsNothing); + expect(C, findsNothing); + expect(B, findsNothing); + + expect(A, findsOneWidget); + } + }, + ); + }); +} + +PlutoRow createRow( + String value1, + String value2, + String value3, + String value4, + String value5, + List columns, [ + PlutoRowType? type, +]) { + final Map cells = {}; + + final row = PlutoRow(cells: cells, type: type); + + cells['column1'] = PlutoCell(value: value1) + ..setRow(row) + ..setColumn(columns[0]); + cells['column2'] = PlutoCell(value: value2) + ..setRow(row) + ..setColumn(columns[1]); + cells['column3'] = PlutoCell(value: value3) + ..setRow(row) + ..setColumn(columns[2]); + cells['column4'] = PlutoCell(value: value4) + ..setRow(row) + ..setColumn(columns[3]); + cells['column5'] = PlutoCell(value: value5) + ..setRow(row) + ..setColumn(columns[4]); + + return row; +} + +PlutoRow createGroup( + String value1, + String value2, + String value3, + String value4, + String value5, + List columns, + List children, +) { + return createRow( + value1, + value2, + value3, + value4, + value5, + columns, + PlutoRowType.group(children: FilteredList(initialList: children)), + ); +} diff --git a/test/scenario/hide_columns/hide_column_test.dart b/test/scenario/hide_columns/hide_column_test.dart index efa3978b3..cf57da810 100644 --- a/test/scenario/hide_columns/hide_column_test.dart +++ b/test/scenario/hide_columns/hide_column_test.dart @@ -58,7 +58,7 @@ void main() { withTenColumns.test( 'showSetColumnsPopup 을 호출 하면 컬럼 설정 팝업이 호출 되어야 한다.', (tester) async { - stateManager.showSetColumnsPopup(stateManager.gridFocusNode!.context!); + stateManager.showSetColumnsPopup(stateManager.gridFocusNode.context!); await tester.pumpAndSettle(); @@ -73,7 +73,7 @@ void main() { withTenColumns.test( '컬럼 설정 팝업에서 전체 체크 박스를 탭하면 전체 컬럼이 숨겨져야 한다.', (tester) async { - stateManager.showSetColumnsPopup(stateManager.gridFocusNode!.context!); + stateManager.showSetColumnsPopup(stateManager.gridFocusNode.context!); await tester.pumpAndSettle(); @@ -93,7 +93,7 @@ void main() { withTenColumns.test( '컬럼 설정 팝업에서 header0 컬럼의 체크 박스를 탭하면 header0 컬럼이 숨겨져야 한다.', (tester) async { - stateManager.showSetColumnsPopup(stateManager.gridFocusNode!.context!); + stateManager.showSetColumnsPopup(stateManager.gridFocusNode.context!); await tester.pumpAndSettle(); @@ -145,7 +145,7 @@ void main() { expect(stateManager.refColumns.length, 9); - stateManager.showSetColumnsPopup(stateManager.gridFocusNode!.context!); + stateManager.showSetColumnsPopup(stateManager.gridFocusNode.context!); await tester.pumpAndSettle(); @@ -197,7 +197,7 @@ void main() { expect(stateManager.refColumns.length, 0); - stateManager.showSetColumnsPopup(stateManager.gridFocusNode!.context!); + stateManager.showSetColumnsPopup(stateManager.gridFocusNode.context!); await tester.pumpAndSettle(); diff --git a/test/scenario/keyboard/behavior_esc_key_test.dart b/test/scenario/keyboard/behavior_esc_key_test.dart index 2d9ee5256..11ee3e594 100644 --- a/test/scenario/keyboard/behavior_esc_key_test.dart +++ b/test/scenario/keyboard/behavior_esc_key_test.dart @@ -1,11 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; import '../../helper/row_helper.dart'; +import '../../mock/mock_on_change_listener.dart'; void main() { group('ESC 키 테스트', () { @@ -15,50 +17,55 @@ void main() { PlutoGridStateManager? stateManager; - final withTheCellSelected = PlutoWidgetTestHelper( - '0, 0 셀이 선택 된 상태에서', - (tester) async { - columns = [ - ...ColumnHelper.textColumn('header', count: 10), - ]; - - rows = RowHelper.count(10, columns); - - await tester.pumpWidget( - MaterialApp( - home: Material( - child: PlutoGrid( - columns: columns, - rows: rows, - onLoaded: (PlutoGridOnLoadedEvent event) { - stateManager = event.stateManager; - }, + late MockMethods mock = MockMethods(); + + setUp(() { + mock = MockMethods(); + }); + + withTheCellSelected([PlutoGridMode mode = PlutoGridMode.normal]) { + return PlutoWidgetTestHelper( + '0, 0 셀이 선택 된 상태에서', + (tester) async { + columns = [ + ...ColumnHelper.textColumn('header', count: 10), + ]; + + rows = RowHelper.count(10, columns); + + await tester.pumpWidget( + MaterialApp( + home: Material( + child: PlutoGrid( + columns: columns, + rows: rows, + onLoaded: (PlutoGridOnLoadedEvent event) { + stateManager = event.stateManager; + }, + mode: mode, + onSelected: mock.oneParamReturnVoid, + ), ), ), - ), - ); + ); - await tester.pump(); + await tester.pump(); - await tester.tap(find.text('header0 value 0')); - }, - ); + await tester.tap(find.text('header0 value 0')); + }, + ); + } - withTheCellSelected.test( + withTheCellSelected(PlutoGridMode.select).test( '그리드가 Select 모드 라면 onSelected 이벤트가 발생 되어야 한다.', (tester) async { - stateManager!.setGridMode(PlutoGridMode.select); - - stateManager!.setOnSelected((event) { - expect(event.row, null); - expect(event.cell, null); - }); + verify(mock.oneParamReturnVoid(any)).called(1); await tester.sendKeyEvent(LogicalKeyboardKey.escape); }, ); - withTheCellSelected.test( + withTheCellSelected().test( '그리드가 Select 모드가 아니고, ' 'editing true 상태라면 editing 이 false 가 되어야 한다.', (tester) async { @@ -72,7 +79,7 @@ void main() { }, ); - withTheCellSelected.test( + withTheCellSelected().test( '그리드가 Select 모드가 아니고,' 'Cell 값이 변경 된 상태라면 원래 셀 값으로 되돌려 져야 한다.', (tester) async { diff --git a/test/scenario/keyboard/behavior_f3_key_test.dart b/test/scenario/keyboard/behavior_f3_key_test.dart index 943a7ee39..a3376461f 100644 --- a/test/scenario/keyboard/behavior_f3_key_test.dart +++ b/test/scenario/keyboard/behavior_f3_key_test.dart @@ -80,7 +80,7 @@ void main() { await tester.pump(); - expect(stateManager.gridFocusNode!.hasFocus, true); + expect(stateManager.gridFocusNode.hasFocus, true); expect(find.byType(PlutoGridFilterPopupHeader), findsNothing); }, @@ -97,7 +97,7 @@ void main() { await tester.pump(); - expect(stateManager.gridFocusNode!.hasFocus, true); + expect(stateManager.gridFocusNode.hasFocus, true); expect(find.byType(PlutoGridFilterPopupHeader), findsNothing); }, diff --git a/test/src/helper/filter_helper_test.dart b/test/src/helper/filter_helper_test.dart index 292d5f973..388d13d99 100644 --- a/test/src/helper/filter_helper_test.dart +++ b/test/src/helper/filter_helper_test.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; @@ -8,11 +7,8 @@ import '../../helper/column_helper.dart'; import '../../helper/row_helper.dart'; import '../../mock/mock_build_context.dart'; import '../../mock/mock_on_change_listener.dart'; -import 'filter_helper_test.mocks.dart'; +import '../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { group('createFilterRow', () { test( @@ -595,13 +591,13 @@ void main() { }); test('onChanged', () { - var mock = MockOnChangeListener(); + var mock = MockMethods(); var filterPopupState = FilterPopupState( context: MockBuildContext(), configuration: const PlutoGridConfiguration(), handleAddNewFilter: (_) {}, - handleApplyFilter: mock.onChangeOneParamListener, + handleApplyFilter: mock.oneParamReturnVoid, columns: ColumnHelper.textColumn('column'), filterRows: [], focusFirstFilterValue: true, @@ -609,7 +605,7 @@ void main() { filterPopupState.onChanged(PlutoGridOnChangedEvent()); - verify(mock.onChangeOneParamListener(any)).called(1); + verify(mock.oneParamReturnVoid(any)).called(1); }); test('onSelected', () { @@ -642,7 +638,7 @@ void main() { group('stateListener', () { test('filterRows 가 변경되지 않았으면 handleApplyFilter 가 호출되지 않아야 한다.', () { - var mock = MockOnChangeListener(); + var mock = MockMethods(); var columns = ColumnHelper.textColumn('column'); @@ -652,7 +648,7 @@ void main() { context: MockBuildContext(), configuration: const PlutoGridConfiguration(), handleAddNewFilter: (_) {}, - handleApplyFilter: mock.onChangeOneParamListener, + handleApplyFilter: mock.oneParamReturnVoid, columns: columns, filterRows: filterRows, focusFirstFilterValue: false, @@ -668,11 +664,11 @@ void main() { filterPopupState.stateListener(); - verifyNever(mock.onChangeOneParamListener(stateManager)); + verifyNever(mock.oneParamReturnVoid(stateManager)); }); test('filterRows 가 변경 되었으면 handleApplyFilter 가 호출 되어야 한다.', () { - var mock = MockOnChangeListener(); + var mock = MockMethods(); var columns = ColumnHelper.textColumn('column'); @@ -680,7 +676,7 @@ void main() { context: MockBuildContext(), configuration: const PlutoGridConfiguration(), handleAddNewFilter: (_) {}, - handleApplyFilter: mock.onChangeOneParamListener, + handleApplyFilter: mock.oneParamReturnVoid, columns: columns, filterRows: [], focusFirstFilterValue: false, @@ -696,7 +692,7 @@ void main() { filterPopupState.stateListener(); - verify(mock.onChangeOneParamListener(stateManager)).called(1); + verify(mock.oneParamReturnVoid(stateManager)).called(1); }); }); @@ -788,14 +784,14 @@ void main() { (tester) async { final stateManager = MockPlutoGridStateManager(); const configuration = PlutoGridConfiguration(); - final mockListener = MockOnChangeListener(); + final mockListener = MockMethods(); await tester.pumpWidget(MaterialApp( home: Material( child: PlutoGridFilterPopupHeader( stateManager: stateManager, configuration: configuration, - handleAddNewFilter: mockListener.onChangeOneParamListener, + handleAddNewFilter: mockListener.oneParamReturnVoid, ), ), )); @@ -809,7 +805,7 @@ void main() { Icons.add, ); - verify(mockListener.onChangeOneParamListener(any)).called(1); + verify(mockListener.oneParamReturnVoid(any)).called(1); }, ); @@ -818,7 +814,7 @@ void main() { (tester) async { final stateManager = MockPlutoGridStateManager(); const configuration = PlutoGridConfiguration(); - final mockListener = MockOnChangeListener(); + final mockListener = MockMethods(); when(stateManager.currentSelectingRows).thenReturn([]); @@ -827,7 +823,7 @@ void main() { child: PlutoGridFilterPopupHeader( stateManager: stateManager, configuration: configuration, - handleAddNewFilter: mockListener.onChangeOneParamListener, + handleAddNewFilter: mockListener.oneParamReturnVoid, ), ), )); @@ -850,7 +846,7 @@ void main() { (tester) async { final stateManager = MockPlutoGridStateManager(); const configuration = PlutoGridConfiguration(); - final mockListener = MockOnChangeListener(); + final mockListener = MockMethods(); final dummyRow = PlutoRow(cells: {'test': PlutoCell(value: '')}); @@ -861,7 +857,7 @@ void main() { child: PlutoGridFilterPopupHeader( stateManager: stateManager, configuration: configuration, - handleAddNewFilter: mockListener.onChangeOneParamListener, + handleAddNewFilter: mockListener.oneParamReturnVoid, ), ), )); diff --git a/test/src/helper/filter_helper_test.mocks.dart b/test/src/helper/filter_helper_test.mocks.dart deleted file mode 100644 index 898052ed4..000000000 --- a/test/src/helper/filter_helper_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/helper/filter_helper_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} diff --git a/test/src/helper/filtered_list_test.dart b/test/src/helper/filtered_list_test.dart index 03b661a9b..b1c0148a3 100644 --- a/test/src/helper/filtered_list_test.dart +++ b/test/src/helper/filtered_list_test.dart @@ -602,4 +602,66 @@ void main() { }, ); }); + + group('pagination and insertAll', () { + late List originalList; + + late FilteredList list; + + setUp(() { + originalList = [1, 2, 3, 4, 5, 6, 7, 8, 9]; + + list = FilteredList(initialList: originalList); + }); + + test('0, 3 으로 필터링 한 후 3 다음에 [31, 32] 가 insertAll 되어야 한다.', () { + list.setFilterRange(FilteredListRange(0, 3)); + + expect(list, [1, 2, 3]); + + list.insertAll(3, [31, 32]); + + expect(list.originalList, [1, 2, 3, 31, 32, 4, 5, 6, 7, 8, 9]); + }); + + test('0, 3 으로 필터링 한 후 1 앞에 [31, 32] 가 insertAll 되어야 한다.', () { + list.setFilterRange(FilteredListRange(0, 3)); + + expect(list, [1, 2, 3]); + + list.insertAll(0, [31, 32]); + + expect(list.originalList, [31, 32, 1, 2, 3, 4, 5, 6, 7, 8, 9]); + }); + + test('7, 9 으로 필터링 한 후 9 다음에 [91, 92] 가 insertAll 되어야 한다.', () { + list.setFilterRange(FilteredListRange(7, 9)); + + expect(list, [8, 9]); + + list.insertAll(2, [91, 92]); + + expect(list.originalList, [1, 2, 3, 4, 5, 6, 7, 8, 9, 91, 92]); + }); + + test('7, 9 으로 필터링 한 후 8 다음에 [91, 92] 가 insertAll 되어야 한다.', () { + list.setFilterRange(FilteredListRange(7, 9)); + + expect(list, [8, 9]); + + list.insertAll(1, [91, 92]); + + expect(list.originalList, [1, 2, 3, 4, 5, 6, 7, 8, 91, 92, 9]); + }); + + test('8, 10 으로 필터링 한 후 8 앞에 [91, 92] 가 insertAll 되어야 한다.', () { + list.setFilterRange(FilteredListRange(7, 9)); + + expect(list, [8, 9]); + + list.insertAll(0, [91, 92]); + + expect(list.originalList, [1, 2, 3, 4, 5, 6, 7, 91, 92, 8, 9]); + }); + }); } diff --git a/test/src/helper/pluto_row_group_delegate_test.dart b/test/src/helper/pluto_row_group_delegate_test.dart new file mode 100644 index 000000000..05196b9ba --- /dev/null +++ b/test/src/helper/pluto_row_group_delegate_test.dart @@ -0,0 +1,491 @@ +// ignore_for_file: non_constant_identifier_names + +import 'package:flutter_test/flutter_test.dart'; +import 'package:pluto_grid/pluto_grid.dart'; + +void main() { + PlutoRow createRow( + String value1, + String value2, + String value3, + String value4, + String value5, + List columns, [ + PlutoRowType? type, + ]) { + final Map cells = {}; + + final row = PlutoRow(cells: cells, type: type); + + cells['column1'] = PlutoCell(value: value1) + ..setRow(row) + ..setColumn(columns[0]); + cells['column2'] = PlutoCell(value: value2) + ..setRow(row) + ..setColumn(columns[1]); + cells['column3'] = PlutoCell(value: value3) + ..setRow(row) + ..setColumn(columns[2]); + cells['column4'] = PlutoCell(value: value4) + ..setRow(row) + ..setColumn(columns[3]); + cells['column5'] = PlutoCell(value: value5) + ..setRow(row) + ..setColumn(columns[4]); + + return row; + } + + PlutoRow createGroup( + String value1, + String value2, + String value3, + String value4, + String value5, + List columns, + List children, + ) { + return createRow( + value1, + value2, + value3, + value4, + value5, + columns, + PlutoRowType.group(children: FilteredList(initialList: children)), + ); + } + + test('PlutoRowGroupDelegateType', () { + const tree = PlutoRowGroupDelegateType.tree; + expect(tree.isTree, true); + expect(tree.isByColumn, false); + + const byColumn = PlutoRowGroupDelegateType.byColumn; + expect(byColumn.isTree, false); + expect(byColumn.isByColumn, true); + }); + + group('PlutoRowGroupTreeDelegate 최대 3뎁스로 그룹핑.', () { + late List columns; + + late List rows; + + setUp(() { + columns = [ + PlutoColumn( + title: 'column1', + field: 'column1', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column2', + field: 'column2', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column3', + field: 'column3', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column4', + field: 'column4', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column5', + field: 'column5', + type: PlutoColumnType.text(), + ), + ]; + + rows = [ + createRow('A', 'a1', 'a2', 'a3', 'a4', columns), + createGroup('B', 'b1', 'b2', 'b3', 'b4', columns, [ + createRow('B1', 'b1-1', 'b1-2', 'b1-3', 'b1-3', columns), + createRow('B2', 'b2-1', 'b2-2', 'b2-3', 'b2-4', columns), + createRow('B3', 'b3-1', 'b3-2', 'b3-3', 'b3-4', columns), + createGroup('B4', 'b4-1', 'b4-2', 'b4-3', 'b4-4', columns, [ + createRow('B41', 'b41-1', 'b41-2', 'b41-3', 'b41-4', columns), + createRow('B42', 'b42-1', 'b42-2', 'b42-3', 'b42-4', columns), + createGroup('B43', 'b43-1', 'b43-2', 'b43-3', 'b43-4', columns, [ + createRow( + 'B431', 'b431-1', 'b431-2', 'b431-3', 'b431-4', columns), + createRow( + 'B432', 'b432-1', 'b432-2', 'b432-3', 'b432-4', columns), + ]), + ]), + ]), + createRow('C', '1', '11', 'C111', '01', columns), + createRow('D', 'd1', 'd2', 'd3', 'd4', columns), + createGroup('E', 'e1', 'e2', 'e3', 'e4', columns, [ + createRow('E1', 'e1-1', 'e1-2', 'e1-3', 'e1-4', columns), + createRow('E2', 'e2-1', 'e2-2', 'e2-3', 'e2-4', columns), + ]), + ]; + }); + + PlutoRowGroupTreeDelegate createDelegate({ + int Function(PlutoColumn)? resolveColumnDepth, + bool Function(PlutoCell)? showText, + }) { + return PlutoRowGroupTreeDelegate( + resolveColumnDepth: resolveColumnDepth ?? + (column) => int.parse(column.field.replaceAll('column', '')) - 1, + showText: showText ?? (cell) => true, + ); + } + + group('toGroup', () { + test('리스트의 length 는 5 를 리턴해야 한다.', () { + final delegate = createDelegate(); + + final groups = delegate.toGroup(rows: rows); + + expect(groups.length, 5); + }); + + test('1, 4 번 행은 그룹이어야 한다.', () { + final delegate = createDelegate(); + + final groups = delegate.toGroup(rows: rows); + + expect(groups[0].type.isGroup, false); + expect(groups[1].type.isGroup, true); + expect(groups[2].type.isGroup, false); + expect(groups[3].type.isGroup, false); + expect(groups[4].type.isGroup, true); + }); + + test('B 그룹의 첫번째 뎁스의 자식의 길이가 4를 리턴해야 한다.', () { + final delegate = createDelegate(); + + final groups = delegate.toGroup(rows: rows); + + expect(groups[1].type.group.children.length, 4); + }); + + test('B 그룹의 행들이 위치에 맞게 parent 가 설정 되어야 한다.', () { + final delegate = createDelegate(); + + final groups = delegate.toGroup(rows: rows); + + final B = groups[1]; + final B1 = B.type.group.children[0]; + final B2 = B.type.group.children[1]; + final B3 = B.type.group.children[2]; + final B4 = B.type.group.children[3]; + final B41 = B4.type.group.children[0]; + final B42 = B4.type.group.children[1]; + final B43 = B4.type.group.children[2]; + final B431 = B43.type.group.children[0]; + final B432 = B43.type.group.children[1]; + + expect(B.parent, null); + expect(B1.parent, B); + expect(B2.parent, B); + expect(B3.parent, B); + expect(B4.parent, B); + expect(B41.parent, B4); + expect(B41.parent?.parent, B); + expect(B42.parent, B4); + expect(B42.parent?.parent, B); + expect(B43.parent, B4); + expect(B43.parent?.parent, B); + expect(B431.parent, B43); + expect(B431.parent?.parent, B4); + expect(B431.parent?.parent?.parent, B); + expect(B432.parent, B43); + expect(B432.parent?.parent, B4); + expect(B432.parent?.parent?.parent, B); + }); + + test('isEditableCell 이 설정한 showText 조건으로 리턴 되어야 한다.', () { + final delegate = createDelegate( + showText: (cell) => cell.column.field == 'column1', + ); + + final groups = delegate.toGroup(rows: rows); + + final sampleRow = groups.first; + + expect(delegate.isEditableCell(sampleRow.cells['column1']!), true); + expect(delegate.isEditableCell(sampleRow.cells['column2']!), false); + }); + + test('isExpandableCell 이 설정한 resolveColumnDepth 조건으로 리턴 되어야 한다.', () { + final delegate = createDelegate( + resolveColumnDepth: (column) => { + 'column1': 0, + 'column2': 1, + 'column3': 2, + 'column4': 3, + 'column5': 4, + }[column.field]!, + ); + + final groups = delegate.toGroup(rows: rows); + + final sampleRow = groups[0]; + final sampleGroupDepth0 = groups[1]; + final sampleGroupDepth1 = groups[1].type.group.children[3]; + + expect(delegate.isExpandableCell(sampleRow.cells['column1']!), false); + expect( + delegate.isExpandableCell(sampleGroupDepth0.cells['column1']!), + true, + ); + expect( + delegate.isExpandableCell(sampleGroupDepth0.cells['column2']!), + false, + ); + expect( + delegate.isExpandableCell(sampleGroupDepth1.cells['column1']!), + false, + ); + expect( + delegate.isExpandableCell(sampleGroupDepth1.cells['column2']!), + true, + ); + }); + }); + }); + + /// (G) A-1-11 + /// (R) -A111-01 + /// (G) -12 + /// (R) -A121-02 + /// (R) -A122-03 + /// (G) -2-21 + /// (R) -A211-04 + /// (G) B-1-11 + /// (R) -B111-05 + /// (G) -12 + /// (R) -B112-06 + /// (G) -2-21 + /// (R) -B211-07 + /// (G) -3-31 + /// (R) -B311-08 + /// (G) -4-41 + /// (R) -B411-09 + /// (G) -42 + /// (R) -B412-10 + group('PlutoRowGroupByColumnDelegate. 3개 컬럼으로 그룹핑.', () { + late PlutoRowGroupByColumnDelegate delegate; + + late List columns; + + late List rows; + + setUp(() { + columns = [ + PlutoColumn( + title: 'column1', + field: 'column1', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column2', + field: 'column2', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column3', + field: 'column3', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column4', + field: 'column4', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column5', + field: 'column5', + type: PlutoColumnType.text(), + ), + ]; + + rows = [ + createRow('A', '1', '11', 'A111', '01', columns), + createRow('A', '1', '12', 'A121', '02', columns), + createRow('A', '1', '12', 'A122', '03', columns), + createRow('A', '2', '21', 'A211', '04', columns), + createRow('B', '1', '11', 'B111', '05', columns), + createRow('B', '1', '12', 'B112', '06', columns), + createRow('B', '2', '21', 'B211', '07', columns), + createRow('B', '3', '31', 'B311', '08', columns), + createRow('B', '4', '41', 'B411', '09', columns), + createRow('B', '4', '42', 'B412', '10', columns), + ]; + + delegate = PlutoRowGroupByColumnDelegate(columns: [ + columns[0], + columns[1], + columns[2], + ]); + }); + + test('type 이 byColumn 을 리턴해야 한다.', () { + expect(delegate.type, PlutoRowGroupDelegateType.byColumn); + }); + + test('enabled 가 true 를 리턴해야 한다.', () { + expect(delegate.enabled, true); + }); + + test('visibleColumns.length 가 3 이어야 한다.', () { + expect(delegate.visibleColumns.length, 3); + }); + + test('visibleColumns 1개 hide 하면 length 가 2 를 리턴해야 한다.', () { + delegate.visibleColumns.first.hide = true; + expect(delegate.enabled, true); + expect(delegate.visibleColumns.length, 2); + }); + + test( + 'visibleColumns 를 모두 hide 하면, ' + 'length 가 0 을 리턴하고 enabled 가 false 를 리턴해야 한다.', + () { + setHide(c) => c.hide = true; + delegate.visibleColumns.forEach(setHide); + expect(delegate.enabled, false); + expect(delegate.visibleColumns.length, 0); + }, + ); + + test('셀의 행이 그룹이 아니면 isEditableCell 이 true 를 리턴해야 한다.', () { + final sampleColumn = columns[3]; // 그룹 컬럼이 아님. + final sampleRow = PlutoRow(cells: {}, type: PlutoRowType.normal()); + final sampleCell = PlutoCell() + ..setRow(sampleRow) + ..setColumn(sampleColumn); + + expect(delegate.isEditableCell(sampleCell), true); + }); + + test('셀의 행이 그룹이면 isEditableCell 이 false 를 리턴해야 한다.', () { + final sampleColumn = columns[1]; + final sampleGroup = PlutoRow( + cells: {}, + type: PlutoRowType.group(children: FilteredList()), + ); + final sampleCell = PlutoCell() + ..setRow(sampleGroup) + ..setColumn(sampleColumn); + + expect(delegate.isEditableCell(sampleCell), false); + }); + + test('셀의 행이 그룹이 아니면 isExpandableCell 이 false 를 리턴해야 한다.', () { + final sampleColumn = columns[1]; + final sampleRow = PlutoRow(cells: {}, type: PlutoRowType.normal()); + final sampleCell = PlutoCell() + ..setRow(sampleRow) + ..setColumn(sampleColumn); + + expect(delegate.isExpandableCell(sampleCell), false); + }); + + test( + '셀의 행이 그룹이고 컬럼도 그룹컬럼이며 둘의 depth 가 맞다면, ' + 'isExpandableCell 이 true 를 리턴해야 한다.', + () { + final grouped = delegate.toGroup(rows: rows); + final sampleColumn = columns[0]; // 0 depth + final sampleGroup = grouped.first; // 0 depth + final sampleCell = PlutoCell() + ..setRow(sampleGroup) + ..setColumn(sampleColumn); + + expect(delegate.isExpandableCell(sampleCell), true); + }, + ); + + test( + '셀의 행이 그룹이고 컬럼도 그룹컬럼이며 둘의 depth 가 다르면, ' + 'isExpandableCell 이 false 를 리턴해야 한다.', + () { + final grouped = delegate.toGroup(rows: rows); + final sampleColumn = columns[1]; // 1 depth + final sampleGroup = grouped.first; // 0 depth + final sampleCell = PlutoCell() + ..setRow(sampleGroup) + ..setColumn(sampleColumn); + + expect(delegate.isExpandableCell(sampleCell), false); + }, + ); + + test('그룹 설정 된 column1 을 isRowGroupColumn 로 호출하면 true 를 리턴해야 한다.', () { + final sampleColumn = columns[1]; + + expect(delegate.isRowGroupColumn(sampleColumn), true); + }); + + test('그룹 설정 되지 않은 column4 을 isRowGroupColumn 로 호출하면 false 를 리턴해야 한다.', () { + final sampleColumn = columns[4]; + + expect(delegate.isRowGroupColumn(sampleColumn), false); + }); + + group('toGroup', () { + test('2개의 그룹행을 리턴해야 한다.', () { + final grouped = delegate.toGroup(rows: rows); + + expect(grouped.length, 2); + }); + + test('첫번째 그룹의 자식들의 길이와 parent 가 상태에 맞게 설정 되어야 한다.', () { + /// (G) A-1-11 + /// (R) -A111-01 + /// (G) -12 + /// (R) -A121-02 + /// (R) -A122-03 + /// (G) -2-21 + /// (R) -A211-04 + final grouped = delegate.toGroup(rows: rows); + final A = grouped.first; + final A_CHILDREN = A.type.group.children; + expect(A.parent, null); + expect(A_CHILDREN.length, 2); + expect(A_CHILDREN[0].parent, A); + expect(A_CHILDREN[1].parent, A); + + final A_1 = A_CHILDREN[0]; + final A_1_CHILDREN = A_1.type.group.children; + expect(A_1_CHILDREN.length, 2); + expect(A_1_CHILDREN[0].parent, A_1); + expect(A_1_CHILDREN[1].parent, A_1); + + final A_1_11 = A_1_CHILDREN[0]; + expect(A_1_11.type.group.children.length, 1); + final A111_01 = A_1_11.type.group.children[0]; + expect(A111_01.parent, A_1_11); + expect(A111_01.type.isNormal, true); + + final A_1_12 = A_1_CHILDREN[1]; + expect(A_1_12.type.group.children.length, 2); + final A121_02 = A_1_12.type.group.children[0]; + expect(A121_02.parent, A_1_12); + expect(A121_02.type.isNormal, true); + final A122_03 = A_1_12.type.group.children[1]; + expect(A122_03.parent, A_1_12); + expect(A122_03.type.isNormal, true); + + final A_2 = A_CHILDREN[1]; + final A_2_CHILDREN = A_2.type.group.children; + expect(A_2_CHILDREN.length, 1); + + final A_2_21 = A_2_CHILDREN[0]; + final A_2_21_CHILDREN = A_2_21.type.group.children; + expect(A_2_21_CHILDREN.length, 1); + final A2111_04 = A_2_21_CHILDREN[0]; + expect(A2111_04.parent, A_2_21); + expect(A2111_04.type.isNormal, true); + }); + }); + }); +} diff --git a/test/src/helper/pluto_row_group_helper_test.dart b/test/src/helper/pluto_row_group_helper_test.dart new file mode 100644 index 000000000..9e8d1724c --- /dev/null +++ b/test/src/helper/pluto_row_group_helper_test.dart @@ -0,0 +1,114 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/mockito.dart'; +import 'package:pluto_grid/pluto_grid.dart'; + +import '../../mock/mock_on_change_listener.dart'; + +void main() { + final mock = MockMethods(); + + group('applyFilter', () { + test('rows 가 비어있는 경우 filter 가 호출되지 않아야 한다.', () { + final FilteredList rows = FilteredList(); + + final mockFilter = mock.oneParamReturnBool; + + expect(rows.originalList.length, 0); + + PlutoRowGroupHelper.applyFilter(rows: rows, filter: mockFilter); + + verifyNever(mockFilter(any)); + }); + + test('row 가 있는 경우 filter 가 호출 되어야 한다.', () { + final FilteredList rows = FilteredList(initialList: [ + PlutoRow(cells: {}), + ]); + + final mockFilter = mock.oneParamReturnBool; + + expect(rows.originalList.length, 1); + + when(mockFilter(any)).thenReturn(true); + + PlutoRowGroupHelper.applyFilter(rows: rows, filter: mockFilter); + + verify(mockFilter(any)).called(1); + }); + + test('filter 가 설정 된 상태에서 null 로 호출하면 필터가 삭제 되어야 한다.', () { + final FilteredList rows = FilteredList(initialList: [ + PlutoRow(cells: {'column1': PlutoCell(value: 'test1')}), + PlutoRow(cells: {'column1': PlutoCell(value: 'test2')}), + PlutoRow(cells: {'column1': PlutoCell(value: 'test3')}), + ]); + + filter(PlutoRow row) => row.cells['column1']!.value == 'test1'; + + expect(rows.length, 3); + + PlutoRowGroupHelper.applyFilter(rows: rows, filter: filter); + + expect(rows.length, 1); + + expect(rows.hasFilter, true); + + PlutoRowGroupHelper.applyFilter(rows: rows, filter: null); + + expect(rows.length, 3); + + expect(rows.hasFilter, false); + }); + + test('그룹 행이 포함 된 경우 그룹행의 filter 를 포함해서 호출 되어야 한다.', () { + final FilteredList rows = FilteredList(initialList: [ + PlutoRow(cells: {'column1': PlutoCell(value: 'test1')}), + PlutoRow(cells: {'column1': PlutoCell(value: 'test2')}), + PlutoRow( + cells: {'column1': PlutoCell(value: 'test3')}, + type: PlutoRowType.group( + children: FilteredList(initialList: [ + PlutoRow(cells: {'column1': PlutoCell(value: 'group1')}), + PlutoRow(cells: {'column1': PlutoCell(value: 'group2')}), + ]), + ), + ), + ]); + + final mockFilter = mock.oneParamReturnBool; + + when(mockFilter(any)).thenReturn(true); + + PlutoRowGroupHelper.applyFilter(rows: rows, filter: mockFilter); + + verify(mockFilter(any)).called(greaterThanOrEqualTo(2)); + }); + + test('그룹의 자식 행을 필터링 한 후 필터를 제거하면 자식 행이 리스트에 포함 되어야 한다.', () { + final FilteredList rows = FilteredList(initialList: [ + PlutoRow(cells: {'column1': PlutoCell(value: 'test1')}), + PlutoRow(cells: {'column1': PlutoCell(value: 'test2')}), + PlutoRow( + cells: {'column1': PlutoCell(value: 'test3')}, + type: PlutoRowType.group( + children: FilteredList(initialList: [ + PlutoRow(cells: {'column1': PlutoCell(value: 'group1')}), + PlutoRow(cells: {'column1': PlutoCell(value: 'group2')}), + ]), + ), + ), + ]); + + filter(PlutoRow row) => + !row.cells['column1']!.value.toString().startsWith('group'); + + PlutoRowGroupHelper.applyFilter(rows: rows, filter: filter); + + expect(rows[2].type.group.children.length, 0); + + PlutoRowGroupHelper.applyFilter(rows: rows, filter: null); + + expect(rows[2].type.group.children.length, 2); + }); + }); +} diff --git a/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart b/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart index cb46fa082..af557e135 100644 --- a/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart +++ b/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart @@ -1,20 +1,11 @@ -import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../matcher/pluto_object_matcher.dart'; -import 'pluto_grid_cell_gesture_event_test.mocks.dart'; - -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) +import '../../../mock/shared_mocks.mocks.dart'; + void main() { late MockPlutoGridStateManager stateManager; late MockPlutoGridScrollController scroll; diff --git a/test/src/manager/event/pluto_grid_cell_gesture_event_test.mocks.dart b/test/src/manager/event/pluto_grid_cell_gesture_event_test.mocks.dart deleted file mode 100644 index f4709742b..000000000 --- a/test/src/manager/event/pluto_grid_cell_gesture_event_test.mocks.dart +++ /dev/null @@ -1,1462 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/manager/event/pluto_grid_cell_gesture_event_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i6; -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -class _FakePlutoGridStateManager_14 extends _i1.Fake - implements _i3.PlutoGridStateManager {} - -class _FakeStreamSubscription_15 extends _i1.Fake - implements _i6.StreamSubscription {} - -class _FakeScrollController_16 extends _i1.Fake - implements _i4.ScrollController {} - -class _FakeScrollPosition_17 extends _i1.Fake implements _i4.ScrollPosition {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} - -/// A class which mocks [PlutoGridEventManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridEventManager extends _i1.Mock - implements _i3.PlutoGridEventManager { - @override - _i3.PlutoGridStateManager get stateManager => - (super.noSuchMethod(Invocation.getter(#stateManager), - returnValue: _FakePlutoGridStateManager_14()) - as _i3.PlutoGridStateManager); - @override - _i2.PublishSubject<_i3.PlutoGridEvent> get subject => - (super.noSuchMethod(Invocation.getter(#subject), - returnValue: _FakePublishSubject_0<_i3.PlutoGridEvent>()) - as _i2.PublishSubject<_i3.PlutoGridEvent>); - @override - _i6.StreamSubscription get subscription => - (super.noSuchMethod(Invocation.getter(#subscription), - returnValue: _FakeStreamSubscription_15()) - as _i6.StreamSubscription); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); - @override - void addEvent(_i3.PlutoGridEvent? event) => - super.noSuchMethod(Invocation.method(#addEvent, [event]), - returnValueForMissingStub: null); - @override - _i6.StreamSubscription<_i3.PlutoGridEvent> listener( - void Function(_i3.PlutoGridEvent)? onData) => - (super.noSuchMethod(Invocation.method(#listener, [onData]), - returnValue: _FakeStreamSubscription_15<_i3.PlutoGridEvent>()) - as _i6.StreamSubscription<_i3.PlutoGridEvent>); -} - -/// A class which mocks [PlutoGridScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridScrollController extends _i1.Mock - implements _i3.PlutoGridScrollController { - @override - set vertical(_i3.LinkedScrollControllerGroup? _vertical) => - super.noSuchMethod(Invocation.setter(#vertical, _vertical), - returnValueForMissingStub: null); - @override - set horizontal(_i3.LinkedScrollControllerGroup? _horizontal) => - super.noSuchMethod(Invocation.setter(#horizontal, _horizontal), - returnValueForMissingStub: null); - @override - double get maxScrollHorizontal => - (super.noSuchMethod(Invocation.getter(#maxScrollHorizontal), - returnValue: 0.0) as double); - @override - double get maxScrollVertical => (super - .noSuchMethod(Invocation.getter(#maxScrollVertical), returnValue: 0.0) - as double); - @override - double get verticalOffset => - (super.noSuchMethod(Invocation.getter(#verticalOffset), returnValue: 0.0) - as double); - @override - double get horizontalOffset => (super - .noSuchMethod(Invocation.getter(#horizontalOffset), returnValue: 0.0) - as double); - @override - void setBodyRowsHorizontal(_i4.ScrollController? scrollController) => - super.noSuchMethod( - Invocation.method(#setBodyRowsHorizontal, [scrollController]), - returnValueForMissingStub: null); - @override - void setBodyRowsVertical(_i4.ScrollController? scrollController) => super - .noSuchMethod(Invocation.method(#setBodyRowsVertical, [scrollController]), - returnValueForMissingStub: null); -} - -/// A class which mocks [LinkedScrollControllerGroup]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockLinkedScrollControllerGroup extends _i1.Mock - implements _i3.LinkedScrollControllerGroup { - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - _i4.ScrollController addAndGet() => - (super.noSuchMethod(Invocation.method(#addAndGet, []), - returnValue: _FakeScrollController_16()) as _i4.ScrollController); - @override - void addOffsetChangedListener(_i5.VoidCallback? onChanged) => super - .noSuchMethod(Invocation.method(#addOffsetChangedListener, [onChanged]), - returnValueForMissingStub: null); - @override - void removeOffsetChangedListener(_i5.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#removeOffsetChangedListener, [listener]), - returnValueForMissingStub: null); - @override - _i6.Future animateTo(double? offset, - {_i4.Curve? curve, Duration? duration}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#curve: curve, #duration: duration}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void resetScroll() => super.noSuchMethod(Invocation.method(#resetScroll, []), - returnValueForMissingStub: null); - @override - void applyViewportDimension(double? value) => - super.noSuchMethod(Invocation.method(#applyViewportDimension, [value]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [ScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScrollController extends _i1.Mock implements _i4.ScrollController { - @override - bool get keepScrollOffset => - (super.noSuchMethod(Invocation.getter(#keepScrollOffset), - returnValue: false) as bool); - @override - double get initialScrollOffset => - (super.noSuchMethod(Invocation.getter(#initialScrollOffset), - returnValue: 0.0) as double); - @override - Iterable<_i4.ScrollPosition> get positions => - (super.noSuchMethod(Invocation.getter(#positions), - returnValue: <_i4.ScrollPosition>[]) as Iterable<_i4.ScrollPosition>); - @override - bool get hasClients => - (super.noSuchMethod(Invocation.getter(#hasClients), returnValue: false) - as bool); - @override - _i4.ScrollPosition get position => - (super.noSuchMethod(Invocation.getter(#position), - returnValue: _FakeScrollPosition_17()) as _i4.ScrollPosition); - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future animateTo(double? offset, - {Duration? duration, _i4.Curve? curve}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#duration: duration, #curve: curve}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void attach(_i4.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#attach, [position]), - returnValueForMissingStub: null); - @override - void detach(_i4.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#detach, [position]), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i4.ScrollPosition createScrollPosition(_i4.ScrollPhysics? physics, - _i4.ScrollContext? context, _i4.ScrollPosition? oldPosition) => - (super.noSuchMethod( - Invocation.method( - #createScrollPosition, [physics, context, oldPosition]), - returnValue: _FakeScrollPosition_17()) as _i4.ScrollPosition); - @override - void debugFillDescription(List? description) => super.noSuchMethod( - Invocation.method(#debugFillDescription, [description]), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} diff --git a/test/src/manager/event/pluto_grid_scroll_update_event_test.dart b/test/src/manager/event/pluto_grid_scroll_update_event_test.dart index 1118aa902..39612e186 100644 --- a/test/src/manager/event/pluto_grid_scroll_update_event_test.dart +++ b/test/src/manager/event/pluto_grid_scroll_update_event_test.dart @@ -1,17 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; -import 'pluto_grid_scroll_update_event_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) void main() { late MockPlutoGridStateManager stateManager; late PlutoGridScrollController scrollController; diff --git a/test/src/manager/event/pluto_grid_scroll_update_event_test.mocks.dart b/test/src/manager/event/pluto_grid_scroll_update_event_test.mocks.dart deleted file mode 100644 index 7a73e12e2..000000000 --- a/test/src/manager/event/pluto_grid_scroll_update_event_test.mocks.dart +++ /dev/null @@ -1,1676 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/manager/event/pluto_grid_scroll_update_event_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i7; -import 'dart:ui' as _i5; - -import 'package:flutter/gestures.dart' as _i6; -import 'package:flutter/material.dart' as _i4; -import 'package:flutter/rendering.dart' as _i8; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -class _FakeScrollController_14 extends _i1.Fake - implements _i4.ScrollController {} - -class _FakeScrollPosition_15 extends _i1.Fake implements _i4.ScrollPosition {} - -class _FakeScrollPhysics_16 extends _i1.Fake implements _i4.ScrollPhysics {} - -class _FakeScrollContext_17 extends _i1.Fake implements _i4.ScrollContext {} - -class _FakeValueNotifier_18 extends _i1.Fake - implements _i4.ValueNotifier {} - -class _FakeScrollHoldController_19 extends _i1.Fake - implements _i4.ScrollHoldController {} - -class _FakeDrag_20 extends _i1.Fake implements _i6.Drag {} - -class _FakeScrollMetrics_21 extends _i1.Fake implements _i4.ScrollMetrics {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} - -/// A class which mocks [LinkedScrollControllerGroup]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockLinkedScrollControllerGroup extends _i1.Mock - implements _i3.LinkedScrollControllerGroup { - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - _i4.ScrollController addAndGet() => - (super.noSuchMethod(Invocation.method(#addAndGet, []), - returnValue: _FakeScrollController_14()) as _i4.ScrollController); - @override - void addOffsetChangedListener(_i5.VoidCallback? onChanged) => super - .noSuchMethod(Invocation.method(#addOffsetChangedListener, [onChanged]), - returnValueForMissingStub: null); - @override - void removeOffsetChangedListener(_i5.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#removeOffsetChangedListener, [listener]), - returnValueForMissingStub: null); - @override - _i7.Future animateTo(double? offset, - {_i4.Curve? curve, Duration? duration}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#curve: curve, #duration: duration}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void resetScroll() => super.noSuchMethod(Invocation.method(#resetScroll, []), - returnValueForMissingStub: null); - @override - void applyViewportDimension(double? value) => - super.noSuchMethod(Invocation.method(#applyViewportDimension, [value]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [ScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScrollController extends _i1.Mock implements _i4.ScrollController { - @override - bool get keepScrollOffset => - (super.noSuchMethod(Invocation.getter(#keepScrollOffset), - returnValue: false) as bool); - @override - double get initialScrollOffset => - (super.noSuchMethod(Invocation.getter(#initialScrollOffset), - returnValue: 0.0) as double); - @override - Iterable<_i4.ScrollPosition> get positions => - (super.noSuchMethod(Invocation.getter(#positions), - returnValue: <_i4.ScrollPosition>[]) as Iterable<_i4.ScrollPosition>); - @override - bool get hasClients => - (super.noSuchMethod(Invocation.getter(#hasClients), returnValue: false) - as bool); - @override - _i4.ScrollPosition get position => - (super.noSuchMethod(Invocation.getter(#position), - returnValue: _FakeScrollPosition_15()) as _i4.ScrollPosition); - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i7.Future animateTo(double? offset, - {Duration? duration, _i4.Curve? curve}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#duration: duration, #curve: curve}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void attach(_i4.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#attach, [position]), - returnValueForMissingStub: null); - @override - void detach(_i4.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#detach, [position]), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i4.ScrollPosition createScrollPosition(_i4.ScrollPhysics? physics, - _i4.ScrollContext? context, _i4.ScrollPosition? oldPosition) => - (super.noSuchMethod( - Invocation.method( - #createScrollPosition, [physics, context, oldPosition]), - returnValue: _FakeScrollPosition_15()) as _i4.ScrollPosition); - @override - void debugFillDescription(List? description) => super.noSuchMethod( - Invocation.method(#debugFillDescription, [description]), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [ScrollPosition]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScrollPosition extends _i1.Mock implements _i4.ScrollPosition { - @override - _i4.ScrollPhysics get physics => - (super.noSuchMethod(Invocation.getter(#physics), - returnValue: _FakeScrollPhysics_16()) as _i4.ScrollPhysics); - @override - _i4.ScrollContext get context => - (super.noSuchMethod(Invocation.getter(#context), - returnValue: _FakeScrollContext_17()) as _i4.ScrollContext); - @override - bool get keepScrollOffset => - (super.noSuchMethod(Invocation.getter(#keepScrollOffset), - returnValue: false) as bool); - @override - _i4.ValueNotifier get isScrollingNotifier => (super.noSuchMethod( - Invocation.getter(#isScrollingNotifier), - returnValue: _FakeValueNotifier_18()) as _i4.ValueNotifier); - @override - double get minScrollExtent => - (super.noSuchMethod(Invocation.getter(#minScrollExtent), returnValue: 0.0) - as double); - @override - double get maxScrollExtent => - (super.noSuchMethod(Invocation.getter(#maxScrollExtent), returnValue: 0.0) - as double); - @override - bool get hasContentDimensions => - (super.noSuchMethod(Invocation.getter(#hasContentDimensions), - returnValue: false) as bool); - @override - double get pixels => - (super.noSuchMethod(Invocation.getter(#pixels), returnValue: 0.0) - as double); - @override - bool get hasPixels => - (super.noSuchMethod(Invocation.getter(#hasPixels), returnValue: false) - as bool); - @override - double get viewportDimension => (super - .noSuchMethod(Invocation.getter(#viewportDimension), returnValue: 0.0) - as double); - @override - bool get hasViewportDimension => - (super.noSuchMethod(Invocation.getter(#hasViewportDimension), - returnValue: false) as bool); - @override - bool get haveDimensions => (super - .noSuchMethod(Invocation.getter(#haveDimensions), returnValue: false) - as bool); - @override - bool get allowImplicitScrolling => - (super.noSuchMethod(Invocation.getter(#allowImplicitScrolling), - returnValue: false) as bool); - @override - _i8.ScrollDirection get userScrollDirection => - (super.noSuchMethod(Invocation.getter(#userScrollDirection), - returnValue: _i8.ScrollDirection.idle) as _i8.ScrollDirection); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i4.AxisDirection get axisDirection => - (super.noSuchMethod(Invocation.getter(#axisDirection), - returnValue: _i4.AxisDirection.up) as _i4.AxisDirection); - @override - _i4.Axis get axis => (super.noSuchMethod(Invocation.getter(#axis), - returnValue: _i4.Axis.horizontal) as _i4.Axis); - @override - bool get outOfRange => - (super.noSuchMethod(Invocation.getter(#outOfRange), returnValue: false) - as bool); - @override - bool get atEdge => - (super.noSuchMethod(Invocation.getter(#atEdge), returnValue: false) - as bool); - @override - double get extentBefore => - (super.noSuchMethod(Invocation.getter(#extentBefore), returnValue: 0.0) - as double); - @override - double get extentInside => - (super.noSuchMethod(Invocation.getter(#extentInside), returnValue: 0.0) - as double); - @override - double get extentAfter => - (super.noSuchMethod(Invocation.getter(#extentAfter), returnValue: 0.0) - as double); - @override - void absorb(_i4.ScrollPosition? other) => - super.noSuchMethod(Invocation.method(#absorb, [other]), - returnValueForMissingStub: null); - @override - double setPixels(double? newPixels) => - (super.noSuchMethod(Invocation.method(#setPixels, [newPixels]), - returnValue: 0.0) as double); - @override - void correctPixels(double? value) => - super.noSuchMethod(Invocation.method(#correctPixels, [value]), - returnValueForMissingStub: null); - @override - void correctBy(double? correction) => - super.noSuchMethod(Invocation.method(#correctBy, [correction]), - returnValueForMissingStub: null); - @override - void forcePixels(double? value) => - super.noSuchMethod(Invocation.method(#forcePixels, [value]), - returnValueForMissingStub: null); - @override - void saveScrollOffset() => - super.noSuchMethod(Invocation.method(#saveScrollOffset, []), - returnValueForMissingStub: null); - @override - void restoreScrollOffset() => - super.noSuchMethod(Invocation.method(#restoreScrollOffset, []), - returnValueForMissingStub: null); - @override - void restoreOffset(double? offset, {bool? initialRestore = false}) => - super.noSuchMethod( - Invocation.method( - #restoreOffset, [offset], {#initialRestore: initialRestore}), - returnValueForMissingStub: null); - @override - void saveOffset() => super.noSuchMethod(Invocation.method(#saveOffset, []), - returnValueForMissingStub: null); - @override - double applyBoundaryConditions(double? value) => - (super.noSuchMethod(Invocation.method(#applyBoundaryConditions, [value]), - returnValue: 0.0) as double); - @override - bool applyViewportDimension(double? viewportDimension) => (super.noSuchMethod( - Invocation.method(#applyViewportDimension, [viewportDimension]), - returnValue: false) as bool); - @override - bool applyContentDimensions( - double? minScrollExtent, double? maxScrollExtent) => - (super.noSuchMethod( - Invocation.method( - #applyContentDimensions, [minScrollExtent, maxScrollExtent]), - returnValue: false) as bool); - @override - bool correctForNewDimensions( - _i4.ScrollMetrics? oldPosition, _i4.ScrollMetrics? newPosition) => - (super.noSuchMethod( - Invocation.method( - #correctForNewDimensions, [oldPosition, newPosition]), - returnValue: false) as bool); - @override - void applyNewDimensions() => - super.noSuchMethod(Invocation.method(#applyNewDimensions, []), - returnValueForMissingStub: null); - @override - _i7.Future ensureVisible(_i4.RenderObject? object, - {double? alignment = 0.0, - Duration? duration = Duration.zero, - _i4.Curve? curve = _i4.Curves.ease, - _i4.ScrollPositionAlignmentPolicy? alignmentPolicy = - _i4.ScrollPositionAlignmentPolicy.explicit, - _i4.RenderObject? targetRenderObject}) => - (super.noSuchMethod( - Invocation.method(#ensureVisible, [ - object - ], { - #alignment: alignment, - #duration: duration, - #curve: curve, - #alignmentPolicy: alignmentPolicy, - #targetRenderObject: targetRenderObject - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - _i7.Future animateTo(double? to, - {Duration? duration, _i4.Curve? curve}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [to], {#duration: duration, #curve: curve}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void pointerScroll(double? delta) => - super.noSuchMethod(Invocation.method(#pointerScroll, [delta]), - returnValueForMissingStub: null); - @override - _i7.Future moveTo(double? to, - {Duration? duration, _i4.Curve? curve, bool? clamp = true}) => - (super.noSuchMethod( - Invocation.method(#moveTo, [to], - {#duration: duration, #curve: curve, #clamp: clamp}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i7.Future); - @override - void jumpToWithoutSettling(double? value) => - super.noSuchMethod(Invocation.method(#jumpToWithoutSettling, [value]), - returnValueForMissingStub: null); - @override - _i4.ScrollHoldController hold(_i5.VoidCallback? holdCancelCallback) => - (super.noSuchMethod(Invocation.method(#hold, [holdCancelCallback]), - returnValue: _FakeScrollHoldController_19()) - as _i4.ScrollHoldController); - @override - _i6.Drag drag(_i4.DragStartDetails? details, - _i5.VoidCallback? dragCancelCallback) => - (super.noSuchMethod( - Invocation.method(#drag, [details, dragCancelCallback]), - returnValue: _FakeDrag_20()) as _i6.Drag); - @override - void beginActivity(_i4.ScrollActivity? newActivity) => - super.noSuchMethod(Invocation.method(#beginActivity, [newActivity]), - returnValueForMissingStub: null); - @override - void didStartScroll() => - super.noSuchMethod(Invocation.method(#didStartScroll, []), - returnValueForMissingStub: null); - @override - void didUpdateScrollPositionBy(double? delta) => - super.noSuchMethod(Invocation.method(#didUpdateScrollPositionBy, [delta]), - returnValueForMissingStub: null); - @override - void didEndScroll() => - super.noSuchMethod(Invocation.method(#didEndScroll, []), - returnValueForMissingStub: null); - @override - void didOverscrollBy(double? value) => - super.noSuchMethod(Invocation.method(#didOverscrollBy, [value]), - returnValueForMissingStub: null); - @override - void didUpdateScrollDirection(_i8.ScrollDirection? direction) => super - .noSuchMethod(Invocation.method(#didUpdateScrollDirection, [direction]), - returnValueForMissingStub: null); - @override - void didUpdateScrollMetrics() => - super.noSuchMethod(Invocation.method(#didUpdateScrollMetrics, []), - returnValueForMissingStub: null); - @override - bool recommendDeferredLoading(_i4.BuildContext? context) => (super - .noSuchMethod(Invocation.method(#recommendDeferredLoading, [context]), - returnValue: false) as bool); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void debugFillDescription(List? description) => super.noSuchMethod( - Invocation.method(#debugFillDescription, [description]), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - _i4.ScrollMetrics copyWith( - {double? minScrollExtent, - double? maxScrollExtent, - double? pixels, - double? viewportDimension, - _i4.AxisDirection? axisDirection}) => - (super.noSuchMethod( - Invocation.method(#copyWith, [], { - #minScrollExtent: minScrollExtent, - #maxScrollExtent: maxScrollExtent, - #pixels: pixels, - #viewportDimension: viewportDimension, - #axisDirection: axisDirection - }), - returnValue: _FakeScrollMetrics_21()) as _i4.ScrollMetrics); -} diff --git a/test/src/manager/pluto_grid_key_manager_test.dart b/test/src/manager/pluto_grid_key_manager_test.dart index 2b11cdc6b..592f1632f 100644 --- a/test/src/manager/pluto_grid_key_manager_test.dart +++ b/test/src/manager/pluto_grid_key_manager_test.dart @@ -1,17 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../helper/pluto_widget_test_helper.dart'; import '../../helper/row_helper.dart'; -import 'pluto_grid_key_manager_test.mocks.dart'; +import '../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { late MockPlutoGridStateManager stateManager; diff --git a/test/src/manager/pluto_grid_key_manager_test.mocks.dart b/test/src/manager/pluto_grid_key_manager_test.mocks.dart deleted file mode 100644 index 551079e00..000000000 --- a/test/src/manager/pluto_grid_key_manager_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/manager/pluto_grid_key_manager_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} diff --git a/test/src/manager/pluto_grid_state_manager_test.dart b/test/src/manager/pluto_grid_state_manager_test.dart index 2ae2a91ac..77e413fe9 100644 --- a/test/src/manager/pluto_grid_state_manager_test.dart +++ b/test/src/manager/pluto_grid_state_manager_test.dart @@ -11,7 +11,7 @@ class _MockScrollController extends Mock implements ScrollController {} void main() { group('selectingModes', () { test('Square, Row, None 이 리턴 되야 한다.', () { - final selectingModes = PlutoGridStateManager.selectingModes; + const selectingModes = PlutoGridSelectingMode.values; expect(selectingModes.contains(PlutoGridSelectingMode.cell), isTrue); expect(selectingModes.contains(PlutoGridSelectingMode.row), isTrue); @@ -103,16 +103,19 @@ void main() { PlutoRow(cells: {'title0': PlutoCell(value: 'test')}), ]; - expect(rows.first.sortIdx, null); - expect(rows.last.sortIdx, null); - - PlutoGridStateManager.initializeRows(columns, rows); + PlutoGridStateManager.initializeRows( + columns, + rows, + forceApplySortIdx: true, + ); expect(rows.first.sortIdx, 0); expect(rows.last.sortIdx, 4); }); - test('이미 sortIdx 가 설정 된 경우 sortIdx 값이 유지 되어야 한다.', () { + test( + 'forceApplySortIdx 가 false 이고 이미 sortIdx 가 설정 된 경우 sortIdx 값이 유지 되어야 한다.', + () { final List columns = ColumnHelper.textColumn('title'); final List rows = [ @@ -133,7 +136,11 @@ void main() { expect(rows.first.sortIdx, 3); expect(rows.last.sortIdx, 5); - PlutoGridStateManager.initializeRows(columns, rows); + PlutoGridStateManager.initializeRows( + columns, + rows, + forceApplySortIdx: false, + ); expect(rows.first.sortIdx, 3); expect(rows.last.sortIdx, 5); @@ -183,10 +190,12 @@ void main() { PlutoRow(cells: {'title0': PlutoCell(value: 'test')}), ]; - expect(rows.first.sortIdx, null); - expect(rows.last.sortIdx, null); - - PlutoGridStateManager.initializeRows(columns, rows, increase: false); + PlutoGridStateManager.initializeRows( + columns, + rows, + increase: false, + forceApplySortIdx: true, + ); expect(rows.first.sortIdx, 0); expect(rows.last.sortIdx, -4); @@ -203,14 +212,12 @@ void main() { PlutoRow(cells: {'title0': PlutoCell(value: 'test')}), ]; - expect(rows.first.sortIdx, null); - expect(rows.last.sortIdx, null); - PlutoGridStateManager.initializeRows( columns, rows, increase: false, start: -10, + forceApplySortIdx: true, ); expect(rows.first.sortIdx, -10); @@ -414,38 +421,6 @@ void main() { ); }); - test( - 'sortIdx 가 null 로 설정 된 rows 를 sortIdx 시작 값을 변경하여 실행하면, ' - 'sortIdx 값을 0 으로 변경 하면 rows 의 sortIdx 가 변경 되고, ' - '원래 순서대로 리턴 되어야 한다.', () async { - final List columns = ColumnHelper.textColumn('title'); - - final List rows = RowHelper.count(100, columns); - - for (var value in rows) { - value.sortIdx = null; - } - - final Iterable rowKeys = rows.map((e) => e.key); - - expect(rows.first.sortIdx, null); - expect(rows.last.sortIdx, null); - - final initializedRows = await PlutoGridStateManager.initializeRowsAsync( - columns, - rows, - forceApplySortIdx: true, - start: 0, - chunkSize: 10, - duration: const Duration(milliseconds: 1), - ); - - for (int i = 0; i < initializedRows.length; i += 1) { - expect(initializedRows[i].sortIdx, i); - expect(initializedRows[i].key, rowKeys.elementAt(i)); - } - }); - test( 'sortIdx 가 0부터 설정 된 rows 를 sortIdx 시작 값을 변경하여 실행하면, ' 'sortIdx 값을 10 으로 변경 하면 rows 의 sortIdx 가 변경 되고, ' diff --git a/test/src/manager/state/cell_state_test.dart b/test/src/manager/state/cell_state_test.dart index 97374cb1d..1eda1cea8 100644 --- a/test/src/manager/state/cell_state_test.dart +++ b/test/src/manager/state/cell_state_test.dart @@ -1,17 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; import '../../../mock/mock_on_change_listener.dart'; -import 'cell_state_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { PlutoGridStateManager createStateManager({ required List columns, @@ -25,8 +21,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: rows, - gridFocusNode: gridFocusNode, - scroll: scroll, + gridFocusNode: gridFocusNode ?? MockFocusNode(), + scroll: scroll ?? MockPlutoGridScrollController(), configuration: configuration, mode: mode, ); @@ -211,9 +207,9 @@ void main() { scroll: null, ); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); expect(stateManager.currentCellPosition, isNull); @@ -230,7 +226,7 @@ void main() { ); // then - verify(listener.onChangeVoidNoParamListener()).called(1); + verify(listener.noParamReturnVoid()).called(1); }, ); @@ -252,9 +248,9 @@ void main() { scroll: null, ); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); expect(stateManager.currentCellPosition, isNull); @@ -279,7 +275,7 @@ void main() { ); // then - verify(listener.onChangeVoidNoParamListener()).called(4); + verify(listener.noParamReturnVoid()).called(4); }, ); @@ -302,9 +298,9 @@ void main() { scroll: null, ); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); expect(stateManager.currentCellPosition, isNull); @@ -333,7 +329,7 @@ void main() { ); // then - verify(listener.onChangeVoidNoParamListener()).called(1); + verify(listener.noParamReturnVoid()).called(1); }, ); }); @@ -468,9 +464,15 @@ void main() { scroll: null, ); + final cell = PlutoCell(value: ''); + final column = createColumn(readonly: true); + final row = PlutoRow(cells: {'field': cell}); + cell + ..setColumn(column) + ..setRow(row); + final bool result = normalGridAndReadonlyColumn.canChangeCellValue( - column: createColumn(readonly: true), - row: PlutoRow(cells: {'field': PlutoCell(value: '')}), + cell: cell, newValue: 'abc', oldValue: 'ABC', ); @@ -490,9 +492,15 @@ void main() { scroll: null, ); + final cell = PlutoCell(value: ''); + final column = createColumn(enableEditingMode: false); + final row = PlutoRow(cells: {'field': cell}); + cell + ..setColumn(column) + ..setRow(row); + final bool result = normalGridAndReadonlyColumn.canChangeCellValue( - column: createColumn(enableEditingMode: false), - row: PlutoRow(cells: {'field': PlutoCell(value: '')}), + cell: cell, newValue: 'abc', oldValue: 'ABC', ); @@ -513,9 +521,15 @@ void main() { scroll: null, ); + final cell = PlutoCell(value: ''); + final column = createColumn(readonly: false); + final row = PlutoRow(cells: {'field': cell}); + cell + ..setColumn(column) + ..setRow(row); + final bool result = normalGridAndReadonlyColumn.canChangeCellValue( - column: createColumn(readonly: false), - row: PlutoRow(cells: {'field': PlutoCell(value: '')}), + cell: cell, newValue: 'abc', oldValue: 'ABC', ); @@ -537,9 +551,15 @@ void main() { mode: PlutoGridMode.select, ); + final cell = PlutoCell(value: ''); + final column = createColumn(readonly: false); + final row = PlutoRow(cells: {'field': cell}); + cell + ..setColumn(column) + ..setRow(row); + final bool result = normalGridAndReadonlyColumn.canChangeCellValue( - column: createColumn(readonly: false), - row: PlutoRow(cells: {'field': PlutoCell(value: '')}), + cell: cell, newValue: 'abc', oldValue: 'ABC', ); @@ -561,9 +581,15 @@ void main() { scroll: null, ); + final cell = PlutoCell(value: ''); + final column = createColumn(readonly: false); + final row = PlutoRow(cells: {'field': cell}); + cell + ..setColumn(column) + ..setRow(row); + final bool result = normalGridAndReadonlyColumn.canChangeCellValue( - column: createColumn(readonly: false), - row: PlutoRow(cells: {'field': PlutoCell(value: '')}), + cell: cell, newValue: 'abc', oldValue: 'abc', ); diff --git a/test/src/manager/state/cell_state_test.mocks.dart b/test/src/manager/state/cell_state_test.mocks.dart deleted file mode 100644 index 0d3b3d45f..000000000 --- a/test/src/manager/state/cell_state_test.mocks.dart +++ /dev/null @@ -1,66 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/manager/state/cell_state_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i4; - -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i2; -import 'package:rxdart/rxdart.dart' as _i3; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePlutoGridStateManager_0 extends _i1.Fake - implements _i2.PlutoGridStateManager {} - -class _FakePublishSubject_1 extends _i1.Fake - implements _i3.PublishSubject {} - -class _FakeStreamSubscription_2 extends _i1.Fake - implements _i4.StreamSubscription {} - -/// A class which mocks [PlutoGridEventManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridEventManager extends _i1.Mock - implements _i2.PlutoGridEventManager { - @override - _i2.PlutoGridStateManager get stateManager => - (super.noSuchMethod(Invocation.getter(#stateManager), - returnValue: _FakePlutoGridStateManager_0()) - as _i2.PlutoGridStateManager); - @override - _i3.PublishSubject<_i2.PlutoGridEvent> get subject => - (super.noSuchMethod(Invocation.getter(#subject), - returnValue: _FakePublishSubject_1<_i2.PlutoGridEvent>()) - as _i3.PublishSubject<_i2.PlutoGridEvent>); - @override - _i4.StreamSubscription get subscription => - (super.noSuchMethod(Invocation.getter(#subscription), - returnValue: _FakeStreamSubscription_2()) - as _i4.StreamSubscription); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); - @override - void addEvent(_i2.PlutoGridEvent? event) => - super.noSuchMethod(Invocation.method(#addEvent, [event]), - returnValueForMissingStub: null); - @override - _i4.StreamSubscription<_i2.PlutoGridEvent> listener( - void Function(_i2.PlutoGridEvent)? onData) => - (super.noSuchMethod(Invocation.method(#listener, [onData]), - returnValue: _FakeStreamSubscription_2<_i2.PlutoGridEvent>()) - as _i4.StreamSubscription<_i2.PlutoGridEvent>); -} diff --git a/test/src/manager/state/column_sizing_state_test.dart b/test/src/manager/state/column_sizing_state_test.dart index d654d83fe..7fd31362b 100644 --- a/test/src/manager/state/column_sizing_state_test.dart +++ b/test/src/manager/state/column_sizing_state_test.dart @@ -2,6 +2,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../../helper/column_helper.dart'; +import '../../../mock/shared_mocks.mocks.dart'; void main() { group('getColumnsAutoSizeHelper', () { @@ -9,8 +10,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: [], rows: [], - gridFocusNode: null, - scroll: null, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), configuration: const PlutoGridConfiguration( columnSize: PlutoGridColumnSizeConfig( autoSizeMode: PlutoAutoSizeMode.equal, @@ -32,8 +33,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: [], - gridFocusNode: null, - scroll: null, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), configuration: const PlutoGridConfiguration( columnSize: PlutoGridColumnSizeConfig( autoSizeMode: PlutoAutoSizeMode.none, @@ -55,8 +56,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: [], - gridFocusNode: null, - scroll: null, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), configuration: const PlutoGridConfiguration( columnSize: PlutoGridColumnSizeConfig( autoSizeMode: PlutoAutoSizeMode.equal, @@ -78,8 +79,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: [], - gridFocusNode: null, - scroll: null, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), configuration: const PlutoGridConfiguration( columnSize: PlutoGridColumnSizeConfig( autoSizeMode: PlutoAutoSizeMode.scale, @@ -106,8 +107,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: [], - gridFocusNode: null, - scroll: null, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), configuration: const PlutoGridConfiguration( columnSize: PlutoGridColumnSizeConfig( autoSizeMode: PlutoAutoSizeMode.scale, @@ -136,8 +137,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: [], - gridFocusNode: null, - scroll: null, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), configuration: const PlutoGridConfiguration( columnSize: PlutoGridColumnSizeConfig( autoSizeMode: PlutoAutoSizeMode.scale, @@ -163,8 +164,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: [], - gridFocusNode: null, - scroll: null, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), configuration: const PlutoGridConfiguration( columnSize: PlutoGridColumnSizeConfig( resizeMode: PlutoResizeMode.none, @@ -187,8 +188,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: [], - gridFocusNode: null, - scroll: null, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), configuration: const PlutoGridConfiguration( columnSize: PlutoGridColumnSizeConfig( resizeMode: PlutoResizeMode.normal, @@ -211,8 +212,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: [], - gridFocusNode: null, - scroll: null, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), configuration: const PlutoGridConfiguration( columnSize: PlutoGridColumnSizeConfig( resizeMode: PlutoResizeMode.normal, diff --git a/test/src/manager/state/column_state_test.dart b/test/src/manager/state/column_state_test.dart index 208c8c30b..c43bd9474 100644 --- a/test/src/manager/state/column_state_test.dart +++ b/test/src/manager/state/column_state_test.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; @@ -8,15 +7,8 @@ import 'package:pluto_grid/src/ui/ui.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; import '../../../mock/mock_on_change_listener.dart'; -import 'column_state_test.mocks.dart'; - -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) +import '../../../mock/shared_mocks.mocks.dart'; + void main() { final PlutoGridScrollController scroll = MockPlutoGridScrollController(); final LinkedScrollControllerGroup horizontal = @@ -47,7 +39,7 @@ void main() { columns: columns, rows: rows, columnGroups: columnGroups, - gridFocusNode: gridFocusNode, + gridFocusNode: MockFocusNode(), scroll: scroll, configuration: configuration, )..setEventManager(eventManager); @@ -1359,9 +1351,9 @@ void main() { stateManager.setLayout(const BoxConstraints(maxWidth: 500)); - final listeners = MockOnChangeListener(); + final listeners = MockMethods(); - stateManager.addListener(listeners.onChangeVoidNoParamListener); + stateManager.addListener(listeners.noParamReturnVoid); final column = columns[0]; @@ -1372,7 +1364,7 @@ void main() { targetColumn: targetColumn, ); - verifyNever(listeners.onChangeVoidNoParamListener()); + verifyNever(listeners.noParamReturnVoid()); }); test('고정 컬럼 넓이가 충분하면 notifyListeners 가 호출 되어야 한다.', () async { @@ -1387,9 +1379,9 @@ void main() { stateManager.setLayout(const BoxConstraints(maxWidth: 500)); - final listeners = MockOnChangeListener(); + final listeners = MockMethods(); - stateManager.addListener(listeners.onChangeVoidNoParamListener); + stateManager.addListener(listeners.noParamReturnVoid); final column = columns[0]..width = 50; @@ -1400,7 +1392,7 @@ void main() { targetColumn: targetColumn, ); - verify(listeners.onChangeVoidNoParamListener()).called(1); + verify(listeners.noParamReturnVoid()).called(1); }); test('0 번 비고정 컬럼을 4번 우측 고정 컬럼으로 이동 시키면 컬럼 순서가 바뀌어야 한다.', () async { @@ -1565,7 +1557,7 @@ void main() { test('columnsResizeMode.isNone 이면 notifyResizingListeners 가 호출 되지 않아야 한다.', () { final columns = ColumnHelper.textColumn('title', count: 5); - final mockListener = MockOnChangeListener(); + final mockListener = MockMethods(); PlutoGridStateManager stateManager = getStateManager( columns: columns, @@ -1581,15 +1573,15 @@ void main() { stateManager.setLayout(const BoxConstraints(maxWidth: 800)); stateManager.resizingChangeNotifier.addListener( - mockListener.onChangeVoidNoParamListener, + mockListener.noParamReturnVoid, ); stateManager.resizeColumn(columns.first, 10); - verifyNever(mockListener.onChangeVoidNoParamListener()); + verifyNever(mockListener.noParamReturnVoid()); stateManager.resizingChangeNotifier.removeListener( - mockListener.onChangeVoidNoParamListener, + mockListener.noParamReturnVoid, ); }); @@ -1597,7 +1589,7 @@ void main() { 'column.enableDropToResize 가 false 이면 notifyResizingListeners 가 호출 되지 않아야 한다.', () { final columns = ColumnHelper.textColumn('title', count: 5); - final mockListener = MockOnChangeListener(); + final mockListener = MockMethods(); PlutoGridStateManager stateManager = getStateManager( columns: columns, @@ -1613,21 +1605,21 @@ void main() { stateManager.setLayout(const BoxConstraints(maxWidth: 800)); stateManager.resizingChangeNotifier.addListener( - mockListener.onChangeVoidNoParamListener, + mockListener.noParamReturnVoid, ); stateManager.resizeColumn(columns.first..enableDropToResize = false, 10); - verifyNever(mockListener.onChangeVoidNoParamListener()); + verifyNever(mockListener.noParamReturnVoid()); stateManager.resizingChangeNotifier.removeListener( - mockListener.onChangeVoidNoParamListener, + mockListener.noParamReturnVoid, ); }); test('offset 10 만큼 컬럼의 넓이가 늘어나야 한다.', () { final columns = ColumnHelper.textColumn('title', count: 5); - final mockListener = MockOnChangeListener(); + final mockListener = MockMethods(); PlutoGridStateManager stateManager = getStateManager( columns: columns, @@ -1643,18 +1635,18 @@ void main() { stateManager.setLayout(const BoxConstraints(maxWidth: 800)); stateManager.resizingChangeNotifier.addListener( - mockListener.onChangeVoidNoParamListener, + mockListener.noParamReturnVoid, ); expect(columns.first.width, 200); stateManager.resizeColumn(columns.first, 10); - verify(mockListener.onChangeVoidNoParamListener()).called(1); + verify(mockListener.noParamReturnVoid()).called(1); expect(columns.first.width, 210); stateManager.resizingChangeNotifier.removeListener( - mockListener.onChangeVoidNoParamListener, + mockListener.noParamReturnVoid, ); }); @@ -1889,9 +1881,9 @@ void main() { stateManager.setLayout(const BoxConstraints(maxWidth: 800)); - var listeners = MockOnChangeListener(); + var listeners = MockMethods(); - stateManager.addListener(listeners.onChangeVoidNoParamListener); + stateManager.addListener(listeners.noParamReturnVoid); // when expect(stateManager.columns.first.hide, isFalse); @@ -1899,7 +1891,7 @@ void main() { stateManager.hideColumn(columns.first, true); // then - verify(listeners.onChangeVoidNoParamListener()).called(1); + verify(listeners.noParamReturnVoid()).called(1); }); testWidgets( @@ -1919,9 +1911,9 @@ void main() { scroll: scroll, ); - var listeners = MockOnChangeListener(); + var listeners = MockMethods(); - stateManager.addListener(listeners.onChangeVoidNoParamListener); + stateManager.addListener(listeners.noParamReturnVoid); // when expect(stateManager.columns.first.hide, isFalse); @@ -1929,7 +1921,7 @@ void main() { stateManager.hideColumn(columns.first, false); // then - verifyNever(listeners.onChangeVoidNoParamListener()); + verifyNever(listeners.noParamReturnVoid()); }); }); @@ -1944,13 +1936,13 @@ void main() { scroll: scroll, ); - var listeners = MockOnChangeListener(); + var listeners = MockMethods(); - stateManager.addListener(listeners.onChangeVoidNoParamListener); + stateManager.addListener(listeners.noParamReturnVoid); stateManager.hideColumns(columns, true); - verifyNever(listeners.onChangeVoidNoParamListener()); + verifyNever(listeners.noParamReturnVoid()); }); test('columns 가 empty 가 아니면 notifyListeners 가 호출 되어야 한다.', () async { @@ -1965,13 +1957,13 @@ void main() { stateManager.setLayout(const BoxConstraints(maxWidth: 800)); - var listeners = MockOnChangeListener(); + var listeners = MockMethods(); - stateManager.addListener(listeners.onChangeVoidNoParamListener); + stateManager.addListener(listeners.noParamReturnVoid); stateManager.hideColumns(columns, true); - verify(listeners.onChangeVoidNoParamListener()).called(1); + verify(listeners.noParamReturnVoid()).called(1); }); test('hide 가 true 면 컬럼이 모두 업데이트 되어야 한다.', () async { diff --git a/test/src/manager/state/column_state_test.mocks.dart b/test/src/manager/state/column_state_test.mocks.dart deleted file mode 100644 index d21b14464..000000000 --- a/test/src/manager/state/column_state_test.mocks.dart +++ /dev/null @@ -1,537 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/manager/state/column_state_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i6; -import 'dart:ui' as _i7; - -import 'package:flutter/gestures.dart' as _i3; -import 'package:flutter/material.dart' as _i2; -import 'package:flutter/rendering.dart' as _i8; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i4; -import 'package:rxdart/rxdart.dart' as _i5; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakeScrollController_0 extends _i1.Fake implements _i2.ScrollController { -} - -class _FakeScrollPosition_1 extends _i1.Fake implements _i2.ScrollPosition {} - -class _FakeScrollPhysics_2 extends _i1.Fake implements _i2.ScrollPhysics {} - -class _FakeScrollContext_3 extends _i1.Fake implements _i2.ScrollContext {} - -class _FakeValueNotifier_4 extends _i1.Fake implements _i2.ValueNotifier { -} - -class _FakeScrollHoldController_5 extends _i1.Fake - implements _i2.ScrollHoldController {} - -class _FakeDrag_6 extends _i1.Fake implements _i3.Drag {} - -class _FakeScrollMetrics_7 extends _i1.Fake implements _i2.ScrollMetrics {} - -class _FakePlutoGridStateManager_8 extends _i1.Fake - implements _i4.PlutoGridStateManager {} - -class _FakePublishSubject_9 extends _i1.Fake - implements _i5.PublishSubject {} - -class _FakeStreamSubscription_10 extends _i1.Fake - implements _i6.StreamSubscription {} - -/// A class which mocks [PlutoGridScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridScrollController extends _i1.Mock - implements _i4.PlutoGridScrollController { - @override - set vertical(_i4.LinkedScrollControllerGroup? _vertical) => - super.noSuchMethod(Invocation.setter(#vertical, _vertical), - returnValueForMissingStub: null); - @override - set horizontal(_i4.LinkedScrollControllerGroup? _horizontal) => - super.noSuchMethod(Invocation.setter(#horizontal, _horizontal), - returnValueForMissingStub: null); - @override - double get maxScrollHorizontal => - (super.noSuchMethod(Invocation.getter(#maxScrollHorizontal), - returnValue: 0.0) as double); - @override - double get maxScrollVertical => (super - .noSuchMethod(Invocation.getter(#maxScrollVertical), returnValue: 0.0) - as double); - @override - double get verticalOffset => - (super.noSuchMethod(Invocation.getter(#verticalOffset), returnValue: 0.0) - as double); - @override - double get horizontalOffset => (super - .noSuchMethod(Invocation.getter(#horizontalOffset), returnValue: 0.0) - as double); - @override - void setBodyRowsHorizontal(_i2.ScrollController? scrollController) => - super.noSuchMethod( - Invocation.method(#setBodyRowsHorizontal, [scrollController]), - returnValueForMissingStub: null); - @override - void setBodyRowsVertical(_i2.ScrollController? scrollController) => super - .noSuchMethod(Invocation.method(#setBodyRowsVertical, [scrollController]), - returnValueForMissingStub: null); -} - -/// A class which mocks [LinkedScrollControllerGroup]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockLinkedScrollControllerGroup extends _i1.Mock - implements _i4.LinkedScrollControllerGroup { - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - _i2.ScrollController addAndGet() => - (super.noSuchMethod(Invocation.method(#addAndGet, []), - returnValue: _FakeScrollController_0()) as _i2.ScrollController); - @override - void addOffsetChangedListener(_i7.VoidCallback? onChanged) => super - .noSuchMethod(Invocation.method(#addOffsetChangedListener, [onChanged]), - returnValueForMissingStub: null); - @override - void removeOffsetChangedListener(_i7.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#removeOffsetChangedListener, [listener]), - returnValueForMissingStub: null); - @override - _i6.Future animateTo(double? offset, - {_i2.Curve? curve, Duration? duration}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#curve: curve, #duration: duration}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void resetScroll() => super.noSuchMethod(Invocation.method(#resetScroll, []), - returnValueForMissingStub: null); - @override - void applyViewportDimension(double? value) => - super.noSuchMethod(Invocation.method(#applyViewportDimension, [value]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [ScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScrollController extends _i1.Mock implements _i2.ScrollController { - @override - bool get keepScrollOffset => - (super.noSuchMethod(Invocation.getter(#keepScrollOffset), - returnValue: false) as bool); - @override - double get initialScrollOffset => - (super.noSuchMethod(Invocation.getter(#initialScrollOffset), - returnValue: 0.0) as double); - @override - Iterable<_i2.ScrollPosition> get positions => - (super.noSuchMethod(Invocation.getter(#positions), - returnValue: <_i2.ScrollPosition>[]) as Iterable<_i2.ScrollPosition>); - @override - bool get hasClients => - (super.noSuchMethod(Invocation.getter(#hasClients), returnValue: false) - as bool); - @override - _i2.ScrollPosition get position => - (super.noSuchMethod(Invocation.getter(#position), - returnValue: _FakeScrollPosition_1()) as _i2.ScrollPosition); - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future animateTo(double? offset, - {Duration? duration, _i2.Curve? curve}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#duration: duration, #curve: curve}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void attach(_i2.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#attach, [position]), - returnValueForMissingStub: null); - @override - void detach(_i2.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#detach, [position]), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i2.ScrollPosition createScrollPosition(_i2.ScrollPhysics? physics, - _i2.ScrollContext? context, _i2.ScrollPosition? oldPosition) => - (super.noSuchMethod( - Invocation.method( - #createScrollPosition, [physics, context, oldPosition]), - returnValue: _FakeScrollPosition_1()) as _i2.ScrollPosition); - @override - void debugFillDescription(List? description) => super.noSuchMethod( - Invocation.method(#debugFillDescription, [description]), - returnValueForMissingStub: null); - @override - void addListener(_i7.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i7.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [ScrollPosition]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScrollPosition extends _i1.Mock implements _i2.ScrollPosition { - @override - _i2.ScrollPhysics get physics => - (super.noSuchMethod(Invocation.getter(#physics), - returnValue: _FakeScrollPhysics_2()) as _i2.ScrollPhysics); - @override - _i2.ScrollContext get context => - (super.noSuchMethod(Invocation.getter(#context), - returnValue: _FakeScrollContext_3()) as _i2.ScrollContext); - @override - bool get keepScrollOffset => - (super.noSuchMethod(Invocation.getter(#keepScrollOffset), - returnValue: false) as bool); - @override - _i2.ValueNotifier get isScrollingNotifier => (super.noSuchMethod( - Invocation.getter(#isScrollingNotifier), - returnValue: _FakeValueNotifier_4()) as _i2.ValueNotifier); - @override - double get minScrollExtent => - (super.noSuchMethod(Invocation.getter(#minScrollExtent), returnValue: 0.0) - as double); - @override - double get maxScrollExtent => - (super.noSuchMethod(Invocation.getter(#maxScrollExtent), returnValue: 0.0) - as double); - @override - bool get hasContentDimensions => - (super.noSuchMethod(Invocation.getter(#hasContentDimensions), - returnValue: false) as bool); - @override - double get pixels => - (super.noSuchMethod(Invocation.getter(#pixels), returnValue: 0.0) - as double); - @override - bool get hasPixels => - (super.noSuchMethod(Invocation.getter(#hasPixels), returnValue: false) - as bool); - @override - double get viewportDimension => (super - .noSuchMethod(Invocation.getter(#viewportDimension), returnValue: 0.0) - as double); - @override - bool get hasViewportDimension => - (super.noSuchMethod(Invocation.getter(#hasViewportDimension), - returnValue: false) as bool); - @override - bool get haveDimensions => (super - .noSuchMethod(Invocation.getter(#haveDimensions), returnValue: false) - as bool); - @override - bool get allowImplicitScrolling => - (super.noSuchMethod(Invocation.getter(#allowImplicitScrolling), - returnValue: false) as bool); - @override - _i8.ScrollDirection get userScrollDirection => - (super.noSuchMethod(Invocation.getter(#userScrollDirection), - returnValue: _i8.ScrollDirection.idle) as _i8.ScrollDirection); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i2.AxisDirection get axisDirection => - (super.noSuchMethod(Invocation.getter(#axisDirection), - returnValue: _i2.AxisDirection.up) as _i2.AxisDirection); - @override - _i2.Axis get axis => (super.noSuchMethod(Invocation.getter(#axis), - returnValue: _i2.Axis.horizontal) as _i2.Axis); - @override - bool get outOfRange => - (super.noSuchMethod(Invocation.getter(#outOfRange), returnValue: false) - as bool); - @override - bool get atEdge => - (super.noSuchMethod(Invocation.getter(#atEdge), returnValue: false) - as bool); - @override - double get extentBefore => - (super.noSuchMethod(Invocation.getter(#extentBefore), returnValue: 0.0) - as double); - @override - double get extentInside => - (super.noSuchMethod(Invocation.getter(#extentInside), returnValue: 0.0) - as double); - @override - double get extentAfter => - (super.noSuchMethod(Invocation.getter(#extentAfter), returnValue: 0.0) - as double); - @override - void absorb(_i2.ScrollPosition? other) => - super.noSuchMethod(Invocation.method(#absorb, [other]), - returnValueForMissingStub: null); - @override - double setPixels(double? newPixels) => - (super.noSuchMethod(Invocation.method(#setPixels, [newPixels]), - returnValue: 0.0) as double); - @override - void correctPixels(double? value) => - super.noSuchMethod(Invocation.method(#correctPixels, [value]), - returnValueForMissingStub: null); - @override - void correctBy(double? correction) => - super.noSuchMethod(Invocation.method(#correctBy, [correction]), - returnValueForMissingStub: null); - @override - void forcePixels(double? value) => - super.noSuchMethod(Invocation.method(#forcePixels, [value]), - returnValueForMissingStub: null); - @override - void saveScrollOffset() => - super.noSuchMethod(Invocation.method(#saveScrollOffset, []), - returnValueForMissingStub: null); - @override - void restoreScrollOffset() => - super.noSuchMethod(Invocation.method(#restoreScrollOffset, []), - returnValueForMissingStub: null); - @override - void restoreOffset(double? offset, {bool? initialRestore = false}) => - super.noSuchMethod( - Invocation.method( - #restoreOffset, [offset], {#initialRestore: initialRestore}), - returnValueForMissingStub: null); - @override - void saveOffset() => super.noSuchMethod(Invocation.method(#saveOffset, []), - returnValueForMissingStub: null); - @override - double applyBoundaryConditions(double? value) => - (super.noSuchMethod(Invocation.method(#applyBoundaryConditions, [value]), - returnValue: 0.0) as double); - @override - bool applyViewportDimension(double? viewportDimension) => (super.noSuchMethod( - Invocation.method(#applyViewportDimension, [viewportDimension]), - returnValue: false) as bool); - @override - bool applyContentDimensions( - double? minScrollExtent, double? maxScrollExtent) => - (super.noSuchMethod( - Invocation.method( - #applyContentDimensions, [minScrollExtent, maxScrollExtent]), - returnValue: false) as bool); - @override - bool correctForNewDimensions( - _i2.ScrollMetrics? oldPosition, _i2.ScrollMetrics? newPosition) => - (super.noSuchMethod( - Invocation.method( - #correctForNewDimensions, [oldPosition, newPosition]), - returnValue: false) as bool); - @override - void applyNewDimensions() => - super.noSuchMethod(Invocation.method(#applyNewDimensions, []), - returnValueForMissingStub: null); - @override - _i6.Future ensureVisible(_i2.RenderObject? object, - {double? alignment = 0.0, - Duration? duration = Duration.zero, - _i2.Curve? curve = _i2.Curves.ease, - _i2.ScrollPositionAlignmentPolicy? alignmentPolicy = - _i2.ScrollPositionAlignmentPolicy.explicit, - _i2.RenderObject? targetRenderObject}) => - (super.noSuchMethod( - Invocation.method(#ensureVisible, [ - object - ], { - #alignment: alignment, - #duration: duration, - #curve: curve, - #alignmentPolicy: alignmentPolicy, - #targetRenderObject: targetRenderObject - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future animateTo(double? to, - {Duration? duration, _i2.Curve? curve}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [to], {#duration: duration, #curve: curve}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void pointerScroll(double? delta) => - super.noSuchMethod(Invocation.method(#pointerScroll, [delta]), - returnValueForMissingStub: null); - @override - _i6.Future moveTo(double? to, - {Duration? duration, _i2.Curve? curve, bool? clamp = true}) => - (super.noSuchMethod( - Invocation.method(#moveTo, [to], - {#duration: duration, #curve: curve, #clamp: clamp}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpToWithoutSettling(double? value) => - super.noSuchMethod(Invocation.method(#jumpToWithoutSettling, [value]), - returnValueForMissingStub: null); - @override - _i2.ScrollHoldController hold(_i7.VoidCallback? holdCancelCallback) => - (super.noSuchMethod(Invocation.method(#hold, [holdCancelCallback]), - returnValue: _FakeScrollHoldController_5()) - as _i2.ScrollHoldController); - @override - _i3.Drag drag(_i2.DragStartDetails? details, - _i7.VoidCallback? dragCancelCallback) => - (super.noSuchMethod( - Invocation.method(#drag, [details, dragCancelCallback]), - returnValue: _FakeDrag_6()) as _i3.Drag); - @override - void beginActivity(_i2.ScrollActivity? newActivity) => - super.noSuchMethod(Invocation.method(#beginActivity, [newActivity]), - returnValueForMissingStub: null); - @override - void didStartScroll() => - super.noSuchMethod(Invocation.method(#didStartScroll, []), - returnValueForMissingStub: null); - @override - void didUpdateScrollPositionBy(double? delta) => - super.noSuchMethod(Invocation.method(#didUpdateScrollPositionBy, [delta]), - returnValueForMissingStub: null); - @override - void didEndScroll() => - super.noSuchMethod(Invocation.method(#didEndScroll, []), - returnValueForMissingStub: null); - @override - void didOverscrollBy(double? value) => - super.noSuchMethod(Invocation.method(#didOverscrollBy, [value]), - returnValueForMissingStub: null); - @override - void didUpdateScrollDirection(_i8.ScrollDirection? direction) => super - .noSuchMethod(Invocation.method(#didUpdateScrollDirection, [direction]), - returnValueForMissingStub: null); - @override - void didUpdateScrollMetrics() => - super.noSuchMethod(Invocation.method(#didUpdateScrollMetrics, []), - returnValueForMissingStub: null); - @override - bool recommendDeferredLoading(_i2.BuildContext? context) => (super - .noSuchMethod(Invocation.method(#recommendDeferredLoading, [context]), - returnValue: false) as bool); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void debugFillDescription(List? description) => super.noSuchMethod( - Invocation.method(#debugFillDescription, [description]), - returnValueForMissingStub: null); - @override - void addListener(_i7.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i7.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - _i2.ScrollMetrics copyWith( - {double? minScrollExtent, - double? maxScrollExtent, - double? pixels, - double? viewportDimension, - _i2.AxisDirection? axisDirection}) => - (super.noSuchMethod( - Invocation.method(#copyWith, [], { - #minScrollExtent: minScrollExtent, - #maxScrollExtent: maxScrollExtent, - #pixels: pixels, - #viewportDimension: viewportDimension, - #axisDirection: axisDirection - }), - returnValue: _FakeScrollMetrics_7()) as _i2.ScrollMetrics); -} - -/// A class which mocks [PlutoGridEventManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridEventManager extends _i1.Mock - implements _i4.PlutoGridEventManager { - @override - _i4.PlutoGridStateManager get stateManager => - (super.noSuchMethod(Invocation.getter(#stateManager), - returnValue: _FakePlutoGridStateManager_8()) - as _i4.PlutoGridStateManager); - @override - _i5.PublishSubject<_i4.PlutoGridEvent> get subject => - (super.noSuchMethod(Invocation.getter(#subject), - returnValue: _FakePublishSubject_9<_i4.PlutoGridEvent>()) - as _i5.PublishSubject<_i4.PlutoGridEvent>); - @override - _i6.StreamSubscription get subscription => - (super.noSuchMethod(Invocation.getter(#subscription), - returnValue: _FakeStreamSubscription_10()) - as _i6.StreamSubscription); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); - @override - void addEvent(_i4.PlutoGridEvent? event) => - super.noSuchMethod(Invocation.method(#addEvent, [event]), - returnValueForMissingStub: null); - @override - _i6.StreamSubscription<_i4.PlutoGridEvent> listener( - void Function(_i4.PlutoGridEvent)? onData) => - (super.noSuchMethod(Invocation.method(#listener, [onData]), - returnValue: _FakeStreamSubscription_10<_i4.PlutoGridEvent>()) - as _i6.StreamSubscription<_i4.PlutoGridEvent>); -} diff --git a/test/src/manager/state/dragging_row_state_test.dart b/test/src/manager/state/dragging_row_state_test.dart index 3a75aff75..da62029a7 100644 --- a/test/src/manager/state/dragging_row_state_test.dart +++ b/test/src/manager/state/dragging_row_state_test.dart @@ -6,6 +6,7 @@ import 'package:pluto_grid/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; import '../../../mock/mock_on_change_listener.dart'; +import '../../../mock/shared_mocks.mocks.dart'; void main() { late List columns; @@ -14,7 +15,7 @@ void main() { late PlutoGridStateManager stateManager; - MockOnChangeListener? listener; + MockMethods? listener; setUp(() { columns = [ @@ -26,13 +27,13 @@ void main() { stateManager = PlutoGridStateManager( columns: columns, rows: rows, - gridFocusNode: null, - scroll: null, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), ); - listener = MockOnChangeListener(); + listener = MockMethods(); - stateManager.addListener(listener!.onChangeVoidNoParamListener); + stateManager.addListener(listener!.noParamReturnVoid); }); group('setIsDraggingRow', () { @@ -47,7 +48,7 @@ void main() { stateManager.setIsDraggingRow(false); // then - verifyNever(listener!.onChangeVoidNoParamListener()); + verifyNever(listener!.noParamReturnVoid()); }, ); @@ -63,7 +64,7 @@ void main() { // then expect(stateManager.isDraggingRow, isTrue); - verify(listener!.onChangeVoidNoParamListener()).called(1); + verify(listener!.noParamReturnVoid()).called(1); }, ); @@ -79,7 +80,7 @@ void main() { // then expect(stateManager.isDraggingRow, isTrue); - verifyNever(listener!.onChangeVoidNoParamListener()); + verifyNever(listener!.noParamReturnVoid()); }, ); }); @@ -98,7 +99,7 @@ void main() { expect(stateManager.dragRows.length, 2); expect(stateManager.dragRows[0].key, rows[1].key); expect(stateManager.dragRows[1].key, rows[2].key); - verify(listener!.onChangeVoidNoParamListener()).called(1); + verify(listener!.noParamReturnVoid()).called(1); }, ); @@ -116,7 +117,7 @@ void main() { expect(stateManager.dragRows.length, 2); expect(stateManager.dragRows[0].key, rows[1].key); expect(stateManager.dragRows[1].key, rows[2].key); - verifyNever(listener!.onChangeVoidNoParamListener()); + verifyNever(listener!.noParamReturnVoid()); }, ); }); @@ -135,7 +136,7 @@ void main() { stateManager.setDragTargetRowIdx(1); // then - verifyNever(listener!.onChangeVoidNoParamListener()); + verifyNever(listener!.noParamReturnVoid()); }, ); @@ -153,7 +154,7 @@ void main() { // then expect(stateManager.dragTargetRowIdx, 2); - verify(listener!.onChangeVoidNoParamListener()).called(1); + verify(listener!.noParamReturnVoid()).called(1); }, ); @@ -171,7 +172,7 @@ void main() { // then expect(stateManager.dragTargetRowIdx, 2); - verifyNever(listener!.onChangeVoidNoParamListener()); + verifyNever(listener!.noParamReturnVoid()); }, ); }); diff --git a/test/src/manager/state/editing_state_test.dart b/test/src/manager/state/editing_state_test.dart index d51f99a9a..d729a6bbf 100644 --- a/test/src/manager/state/editing_state_test.dart +++ b/test/src/manager/state/editing_state_test.dart @@ -1,17 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; import '../../../mock/mock_on_change_listener.dart'; -import 'editing_state_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { PlutoGridStateManager createStateManager({ required List columns, @@ -26,11 +22,11 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: rows, - gridFocusNode: gridFocusNode, - scroll: scroll, + gridFocusNode: gridFocusNode ?? MockFocusNode(), + scroll: scroll ?? MockPlutoGridScrollController(), configuration: configuration, mode: mode, - onChangedEventCallback: onChangedEventCallback, + onChanged: onChangedEventCallback, ); stateManager.setEventManager(MockPlutoGridEventManager()); @@ -276,7 +272,7 @@ void main() { }); group('setEditing', () { - MockOnChangeListener? mock; + MockMethods? mock; List columns; List rows; late PlutoGridStateManager stateManager; @@ -295,7 +291,7 @@ void main() { setCurrentCell = false, setIsEditing = false, }) { - mock = MockOnChangeListener(); + mock = MockMethods(); columns = [ PlutoColumn( @@ -317,7 +313,7 @@ void main() { layout: const BoxConstraints(maxHeight: 300, maxWidth: 50), ); - stateManager.addListener(mock!.onChangeVoidNoParamListener); + stateManager.addListener(mock!.noParamReturnVoid); if (setCurrentCell!) { stateManager.setCurrentCell(rows.first.cells['column'], 0); @@ -350,7 +346,7 @@ void main() { stateManager.setEditing(true); // then - verifyNever(mock!.onChangeVoidNoParamListener()); + verifyNever(mock!.noParamReturnVoid()); }, ); @@ -373,7 +369,7 @@ void main() { stateManager.setEditing(true); // then - verify(mock!.onChangeVoidNoParamListener()).called(1); + verify(mock!.noParamReturnVoid()).called(1); }, ); @@ -396,7 +392,7 @@ void main() { stateManager.setEditing(true); // then - verifyNever(mock!.onChangeVoidNoParamListener()); + verifyNever(mock!.noParamReturnVoid()); }, ); @@ -419,7 +415,7 @@ void main() { stateManager.setEditing(true); // then - verifyNever(mock!.onChangeVoidNoParamListener()); + verifyNever(mock!.noParamReturnVoid()); }, ); }); @@ -435,7 +431,7 @@ void main() { 'force 가 false(기본값) 일 때, canNotChangeCellValue 가 true 면' 'onChanged 콜백이 호출 되지 않아야 한다.', () { - final mock = MockOnChangeListener(); + final mock = MockMethods(); PlutoGridStateManager stateManager = createStateManager( columns: columns, @@ -443,12 +439,18 @@ void main() { gridFocusNode: null, scroll: null, mode: PlutoGridMode.select, - onChangedEventCallback: mock.onChangeOneParamListener, + onChangedEventCallback: mock.oneParamReturnVoid, ); + final cell = PlutoCell(value: ''); + final column = columns.first; + final row = PlutoRow(cells: {columns.first.field: cell}); + cell + ..setColumn(column) + ..setRow(row); + final bool canNotChangeCellValue = stateManager.canNotChangeCellValue( - column: columns.first, - row: PlutoRow(cells: {columns.first.field: PlutoCell(value: '')}), + cell: cell, newValue: 'abc', oldValue: 'ABC', ); @@ -461,7 +463,7 @@ void main() { // force: false, ); - verifyNever(mock.onChangeOneParamListener(any)); + verifyNever(mock.oneParamReturnVoid(any)); }, ); @@ -469,7 +471,7 @@ void main() { 'force 가 true 일 때, canNotChangeCellValue 가 true 라도' 'onChanged 콜백이 호출 되어야 한다.', () { - final mock = MockOnChangeListener(); + final mock = MockMethods(); PlutoGridStateManager stateManager = createStateManager( columns: columns, @@ -477,13 +479,19 @@ void main() { gridFocusNode: null, scroll: null, mode: PlutoGridMode.select, - onChangedEventCallback: mock.onChangeOneParamListener, + onChangedEventCallback: mock.oneParamReturnVoid, layout: const BoxConstraints(maxHeight: 300, maxWidth: 50), ); + final cell = PlutoCell(value: ''); + final column = columns.first; + final row = PlutoRow(cells: {columns.first.field: cell}); + cell + ..setColumn(column) + ..setRow(row); + final bool canNotChangeCellValue = stateManager.canNotChangeCellValue( - column: columns.first, - row: PlutoRow(cells: {columns.first.field: PlutoCell(value: '')}), + cell: cell, newValue: 'abc', oldValue: 'ABC', ); @@ -496,7 +504,7 @@ void main() { force: true, ); - verify(mock.onChangeOneParamListener(any)).called(1); + verify(mock.oneParamReturnVoid(any)).called(1); }, ); }); diff --git a/test/src/manager/state/editing_state_test.mocks.dart b/test/src/manager/state/editing_state_test.mocks.dart deleted file mode 100644 index 20e70c555..000000000 --- a/test/src/manager/state/editing_state_test.mocks.dart +++ /dev/null @@ -1,66 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/manager/state/editing_state_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i4; - -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i2; -import 'package:rxdart/rxdart.dart' as _i3; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePlutoGridStateManager_0 extends _i1.Fake - implements _i2.PlutoGridStateManager {} - -class _FakePublishSubject_1 extends _i1.Fake - implements _i3.PublishSubject {} - -class _FakeStreamSubscription_2 extends _i1.Fake - implements _i4.StreamSubscription {} - -/// A class which mocks [PlutoGridEventManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridEventManager extends _i1.Mock - implements _i2.PlutoGridEventManager { - @override - _i2.PlutoGridStateManager get stateManager => - (super.noSuchMethod(Invocation.getter(#stateManager), - returnValue: _FakePlutoGridStateManager_0()) - as _i2.PlutoGridStateManager); - @override - _i3.PublishSubject<_i2.PlutoGridEvent> get subject => - (super.noSuchMethod(Invocation.getter(#subject), - returnValue: _FakePublishSubject_1<_i2.PlutoGridEvent>()) - as _i3.PublishSubject<_i2.PlutoGridEvent>); - @override - _i4.StreamSubscription get subscription => - (super.noSuchMethod(Invocation.getter(#subscription), - returnValue: _FakeStreamSubscription_2()) - as _i4.StreamSubscription); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); - @override - void addEvent(_i2.PlutoGridEvent? event) => - super.noSuchMethod(Invocation.method(#addEvent, [event]), - returnValueForMissingStub: null); - @override - _i4.StreamSubscription<_i2.PlutoGridEvent> listener( - void Function(_i2.PlutoGridEvent)? onData) => - (super.noSuchMethod(Invocation.method(#listener, [onData]), - returnValue: _FakeStreamSubscription_2<_i2.PlutoGridEvent>()) - as _i4.StreamSubscription<_i2.PlutoGridEvent>); -} diff --git a/test/src/manager/state/filtering_row_state_test.dart b/test/src/manager/state/filtering_row_state_test.dart index a149b10cb..8a4b2f4f9 100644 --- a/test/src/manager/state/filtering_row_state_test.dart +++ b/test/src/manager/state/filtering_row_state_test.dart @@ -4,6 +4,7 @@ import 'package:pluto_grid/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; import '../../../mock/mock_on_change_listener.dart'; +import '../../../mock/shared_mocks.mocks.dart'; void main() { List columns; @@ -12,7 +13,7 @@ void main() { late PlutoGridStateManager stateManager; - MockOnChangeListener listener; + MockMethods listener; setUp(() { columns = [ @@ -24,13 +25,13 @@ void main() { stateManager = PlutoGridStateManager( columns: columns, rows: rows, - gridFocusNode: null, - scroll: null, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), ); - listener = MockOnChangeListener(); + listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); }); group('hasFilter', () { diff --git a/test/src/manager/state/keyboard_state_test.dart b/test/src/manager/state/keyboard_state_test.dart index 152a31ff4..0e8103a54 100644 --- a/test/src/manager/state/keyboard_state_test.dart +++ b/test/src/manager/state/keyboard_state_test.dart @@ -1,19 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/pluto_widget_test_helper.dart'; import '../../../helper/row_helper.dart'; -import 'keyboard_state_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) void main() { late List columns; @@ -58,7 +52,7 @@ void main() { stateManager = PlutoGridStateManager( columns: columns, rows: rows, - gridFocusNode: null, + gridFocusNode: MockFocusNode(), scroll: scrollController, ); diff --git a/test/src/manager/state/keyboard_state_test.mocks.dart b/test/src/manager/state/keyboard_state_test.mocks.dart deleted file mode 100644 index faa3a1394..000000000 --- a/test/src/manager/state/keyboard_state_test.mocks.dart +++ /dev/null @@ -1,157 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/manager/state/keyboard_state_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i5; -import 'dart:ui' as _i6; - -import 'package:flutter/material.dart' as _i2; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i4; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakeScrollController_0 extends _i1.Fake implements _i2.ScrollController { -} - -class _FakePlutoGridStateManager_1 extends _i1.Fake - implements _i3.PlutoGridStateManager {} - -class _FakePublishSubject_2 extends _i1.Fake - implements _i4.PublishSubject {} - -class _FakeStreamSubscription_3 extends _i1.Fake - implements _i5.StreamSubscription {} - -/// A class which mocks [PlutoGridScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridScrollController extends _i1.Mock - implements _i3.PlutoGridScrollController { - @override - set vertical(_i3.LinkedScrollControllerGroup? _vertical) => - super.noSuchMethod(Invocation.setter(#vertical, _vertical), - returnValueForMissingStub: null); - @override - set horizontal(_i3.LinkedScrollControllerGroup? _horizontal) => - super.noSuchMethod(Invocation.setter(#horizontal, _horizontal), - returnValueForMissingStub: null); - @override - double get maxScrollHorizontal => - (super.noSuchMethod(Invocation.getter(#maxScrollHorizontal), - returnValue: 0.0) as double); - @override - double get maxScrollVertical => (super - .noSuchMethod(Invocation.getter(#maxScrollVertical), returnValue: 0.0) - as double); - @override - double get verticalOffset => - (super.noSuchMethod(Invocation.getter(#verticalOffset), returnValue: 0.0) - as double); - @override - double get horizontalOffset => (super - .noSuchMethod(Invocation.getter(#horizontalOffset), returnValue: 0.0) - as double); - @override - void setBodyRowsHorizontal(_i2.ScrollController? scrollController) => - super.noSuchMethod( - Invocation.method(#setBodyRowsHorizontal, [scrollController]), - returnValueForMissingStub: null); - @override - void setBodyRowsVertical(_i2.ScrollController? scrollController) => super - .noSuchMethod(Invocation.method(#setBodyRowsVertical, [scrollController]), - returnValueForMissingStub: null); -} - -/// A class which mocks [LinkedScrollControllerGroup]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockLinkedScrollControllerGroup extends _i1.Mock - implements _i3.LinkedScrollControllerGroup { - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - _i2.ScrollController addAndGet() => - (super.noSuchMethod(Invocation.method(#addAndGet, []), - returnValue: _FakeScrollController_0()) as _i2.ScrollController); - @override - void addOffsetChangedListener(_i6.VoidCallback? onChanged) => super - .noSuchMethod(Invocation.method(#addOffsetChangedListener, [onChanged]), - returnValueForMissingStub: null); - @override - void removeOffsetChangedListener(_i6.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#removeOffsetChangedListener, [listener]), - returnValueForMissingStub: null); - @override - _i5.Future animateTo(double? offset, - {_i2.Curve? curve, Duration? duration}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#curve: curve, #duration: duration}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void resetScroll() => super.noSuchMethod(Invocation.method(#resetScroll, []), - returnValueForMissingStub: null); - @override - void applyViewportDimension(double? value) => - super.noSuchMethod(Invocation.method(#applyViewportDimension, [value]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [PlutoGridEventManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridEventManager extends _i1.Mock - implements _i3.PlutoGridEventManager { - @override - _i3.PlutoGridStateManager get stateManager => - (super.noSuchMethod(Invocation.getter(#stateManager), - returnValue: _FakePlutoGridStateManager_1()) - as _i3.PlutoGridStateManager); - @override - _i4.PublishSubject<_i3.PlutoGridEvent> get subject => - (super.noSuchMethod(Invocation.getter(#subject), - returnValue: _FakePublishSubject_2<_i3.PlutoGridEvent>()) - as _i4.PublishSubject<_i3.PlutoGridEvent>); - @override - _i5.StreamSubscription get subscription => - (super.noSuchMethod(Invocation.getter(#subscription), - returnValue: _FakeStreamSubscription_3()) - as _i5.StreamSubscription); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); - @override - void addEvent(_i3.PlutoGridEvent? event) => - super.noSuchMethod(Invocation.method(#addEvent, [event]), - returnValueForMissingStub: null); - @override - _i5.StreamSubscription<_i3.PlutoGridEvent> listener( - void Function(_i3.PlutoGridEvent)? onData) => - (super.noSuchMethod(Invocation.method(#listener, [onData]), - returnValue: _FakeStreamSubscription_3<_i3.PlutoGridEvent>()) - as _i5.StreamSubscription<_i3.PlutoGridEvent>); -} diff --git a/test/src/manager/state/layout_state_test.dart b/test/src/manager/state/layout_state_test.dart index 1b9819fd1..fa883999f 100644 --- a/test/src/manager/state/layout_state_test.dart +++ b/test/src/manager/state/layout_state_test.dart @@ -1,16 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/pluto_widget_test_helper.dart'; import '../../../helper/row_helper.dart'; -import 'layout_state_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { group('속성 값 테스트.', () { late PlutoGridStateManager stateManager; @@ -52,8 +48,8 @@ void main() { stateManager = PlutoGridStateManager( columns: columns, rows: rows, - gridFocusNode: null, - scroll: null, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), ); stateManager.setEventManager(eventManager); diff --git a/test/src/manager/state/layout_state_test.mocks.dart b/test/src/manager/state/layout_state_test.mocks.dart deleted file mode 100644 index 54322ed66..000000000 --- a/test/src/manager/state/layout_state_test.mocks.dart +++ /dev/null @@ -1,66 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/manager/state/layout_state_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i4; - -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i2; -import 'package:rxdart/rxdart.dart' as _i3; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePlutoGridStateManager_0 extends _i1.Fake - implements _i2.PlutoGridStateManager {} - -class _FakePublishSubject_1 extends _i1.Fake - implements _i3.PublishSubject {} - -class _FakeStreamSubscription_2 extends _i1.Fake - implements _i4.StreamSubscription {} - -/// A class which mocks [PlutoGridEventManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridEventManager extends _i1.Mock - implements _i2.PlutoGridEventManager { - @override - _i2.PlutoGridStateManager get stateManager => - (super.noSuchMethod(Invocation.getter(#stateManager), - returnValue: _FakePlutoGridStateManager_0()) - as _i2.PlutoGridStateManager); - @override - _i3.PublishSubject<_i2.PlutoGridEvent> get subject => - (super.noSuchMethod(Invocation.getter(#subject), - returnValue: _FakePublishSubject_1<_i2.PlutoGridEvent>()) - as _i3.PublishSubject<_i2.PlutoGridEvent>); - @override - _i4.StreamSubscription get subscription => - (super.noSuchMethod(Invocation.getter(#subscription), - returnValue: _FakeStreamSubscription_2()) - as _i4.StreamSubscription); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); - @override - void addEvent(_i2.PlutoGridEvent? event) => - super.noSuchMethod(Invocation.method(#addEvent, [event]), - returnValueForMissingStub: null); - @override - _i4.StreamSubscription<_i2.PlutoGridEvent> listener( - void Function(_i2.PlutoGridEvent)? onData) => - (super.noSuchMethod(Invocation.method(#listener, [onData]), - returnValue: _FakeStreamSubscription_2<_i2.PlutoGridEvent>()) - as _i4.StreamSubscription<_i2.PlutoGridEvent>); -} diff --git a/test/src/manager/state/row_group_state_test.dart b/test/src/manager/state/row_group_state_test.dart new file mode 100644 index 000000000..4d1fd54eb --- /dev/null +++ b/test/src/manager/state/row_group_state_test.dart @@ -0,0 +1,1736 @@ +// ignore_for_file: non_constant_identifier_names + +import 'package:flutter/cupertino.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:pluto_grid/pluto_grid.dart'; + +import '../../../mock/shared_mocks.mocks.dart'; + +void main() { + PlutoGridStateManager createStateManager({ + required List columns, + required List rows, + }) { + WidgetsFlutterBinding.ensureInitialized(); + + final stateManager = PlutoGridStateManager( + columns: columns, + rows: rows, + gridFocusNode: MockFocusNode(), + scroll: MockPlutoGridScrollController(), + ); + + stateManager.setEventManager(MockPlutoGridEventManager()); + stateManager.setLayout(const BoxConstraints()); + + return stateManager; + } + + group('No delegate', () { + test('delegate 가 없으면 hasRowGroups 가 false 를 리턴 해야 한다.', () { + final stateManager = createStateManager(columns: [], rows: []); + + expect(stateManager.hasRowGroups, false); + }); + + test('delegate 가 없으면 enabledRowGroups 가 false 를 리턴 해야 한다.', () { + final stateManager = createStateManager(columns: [], rows: []); + + expect(stateManager.enabledRowGroups, false); + }); + + test('delegate 가 없으면 rowGroupDelegate 가 null 를 리턴 해야 한다.', () { + final stateManager = createStateManager(columns: [], rows: []); + + expect(stateManager.rowGroupDelegate, null); + }); + + test('iterateMainRowGroup 는 5개의 행을 리턴해야 한다.', () { + final rows = [ + PlutoRow(cells: {}), + PlutoRow(cells: {}), + PlutoRow(cells: {}), + PlutoRow(cells: {}), + PlutoRow(cells: {}), + ]; + + final stateManager = createStateManager(columns: [], rows: rows); + + expect(stateManager.iterateAllMainRowGroup.length, 5); + }); + + group('[그룹행(3 자식), 일반행, 일반행]', () { + late PlutoGridStateManager stateManager; + + late PlutoRow groupedRow; + + late FilteredList children; + + late List rows; + + setUp(() { + children = FilteredList( + initialList: [ + PlutoRow(cells: {}, sortIdx: 10), + PlutoRow(cells: {}, sortIdx: 11), + PlutoRow(cells: {}, sortIdx: 12), + ], + ); + + groupedRow = PlutoRow( + cells: {}, + type: PlutoRowType.group(children: children), + sortIdx: 0, + ); + + setParent(e) => e.setParent(groupedRow); + + children.forEach(setParent); + + rows = [ + groupedRow, + PlutoRow(cells: {}, sortIdx: 1), + PlutoRow(cells: {}, sortIdx: 2), + ]; + + stateManager = createStateManager(columns: [], rows: rows); + }); + + test('iterateMainRowGroup.length 는 3을 리턴해야 한다.', () { + expect(stateManager.iterateAllMainRowGroup.length, 3); + }); + + test('iterateRowGroup.length 는 1을 리턴해야 한다.', () { + expect(stateManager.iterateAllRowGroup.length, 1); + }); + + test('iterateRowAndGroup.length 는 6을 리턴해야 한다.', () { + final rowAndGroup = stateManager.iterateAllRowAndGroup; + expect(rowAndGroup.length, 6); + expect(rowAndGroup.elementAt(0).sortIdx, 0); + expect(rowAndGroup.elementAt(1).sortIdx, 10); + expect(rowAndGroup.elementAt(2).sortIdx, 11); + expect(rowAndGroup.elementAt(3).sortIdx, 12); + expect(rowAndGroup.elementAt(4).sortIdx, 1); + expect(rowAndGroup.elementAt(5).sortIdx, 2); + }); + + test('iterateRow.length 는 5을 리턴해야 한다.', () { + expect(stateManager.iterateAllRow.length, 5); + }); + + test('refRows 의 행은 isMainRow 가 true 를 리턴해야 한다.', () { + final List result = []; + + addResult(e) => result.add(stateManager.isMainRow(e)); + + stateManager.refRows.forEach(addResult); + + expect(result.length, 3); + expect(result, [true, true, true]); + }); + + test('children 의 행은 isMainRow 가 false 를 리턴해야 한다.', () { + final List result = []; + + addResult(e) => result.add(stateManager.isMainRow(e)); + + children.forEach(addResult); + + expect(result.length, 3); + expect(result, [false, false, false]); + }); + + test('refRows 의 행은 isNotMainGroupedRow 가 false 를 리턴해야 한다.', () { + final List result = []; + + addResult(e) => result.add(stateManager.isNotMainGroupedRow(e)); + + stateManager.refRows.forEach(addResult); + + expect(result.length, 3); + expect(result, [false, false, false]); + }); + + test('children 의 행은 isNotMainGroupedRow 가 true 를 리턴해야 한다.', () { + final List result = []; + + addResult(e) => result.add(stateManager.isNotMainGroupedRow(e)); + + children.forEach(addResult); + + expect(result.length, 3); + expect(result, [true, true, true]); + }); + + test('children 의 행은 isExpandedGroupedRow 가 false 를 리턴해야 한다.', () { + final List result = []; + + addResult(e) => result.add(stateManager.isExpandedGroupedRow(e)); + + children.forEach(addResult); + + expect(result.length, 3); + expect(result, [false, false, false]); + }); + + test( + 'groupedRow 의 expanded 를 true 로 설정하면, ' + 'isExpandedGroupedRow 가 true 를 리턴해야 한다.', + () { + groupedRow.type.group.setExpanded(true); + + expect(stateManager.isExpandedGroupedRow(groupedRow), true); + }, + ); + + test( + 'groupedRow 의 expanded 를 false 로 설정하면, ' + 'isExpandedGroupedRow 가 false 를 리턴해야 한다.', + () { + groupedRow.type.group.setExpanded(false); + + expect(stateManager.isExpandedGroupedRow(groupedRow), false); + }, + ); + }); + }); + + /// A + /// - 1 + /// - 001 + /// - 2 + /// - 002 + /// B + /// - 1 + /// - 003 + /// - 004 + /// - 2 + /// - 005 + group('2개의 컬럼으로 그룹핑 - PlutoRowGroupByColumnDelegate.', () { + late List columns; + + late List rows; + + late PlutoGridStateManager stateManager; + + PlutoRow createRow(String value1, String value2, String value3) { + return PlutoRow(cells: { + 'column1': PlutoCell(value: value1), + 'column2': PlutoCell(value: value2), + 'column3': PlutoCell(value: value3), + }); + } + + setUp(() { + columns = [ + PlutoColumn( + title: 'column1', + field: 'column1', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column2', + field: 'column2', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column3', + field: 'column3', + type: PlutoColumnType.text(), + ), + ]; + + rows = [ + PlutoRow(cells: { + 'column1': PlutoCell(value: 'A'), + 'column2': PlutoCell(value: '1'), + 'column3': PlutoCell(value: '001'), + }), + PlutoRow(cells: { + 'column1': PlutoCell(value: 'A'), + 'column2': PlutoCell(value: '2'), + 'column3': PlutoCell(value: '002'), + }), + PlutoRow(cells: { + 'column1': PlutoCell(value: 'B'), + 'column2': PlutoCell(value: '1'), + 'column3': PlutoCell(value: '003'), + }), + PlutoRow(cells: { + 'column1': PlutoCell(value: 'B'), + 'column2': PlutoCell(value: '1'), + 'column3': PlutoCell(value: '004'), + }), + PlutoRow(cells: { + 'column1': PlutoCell(value: 'B'), + 'column2': PlutoCell(value: '2'), + 'column3': PlutoCell(value: '005'), + }), + ]; + + stateManager = createStateManager(columns: columns, rows: rows); + + stateManager.setRowGroup(PlutoRowGroupByColumnDelegate(columns: [ + columns[0], + columns[1], + ])); + }); + + test('hasRowGroups 이 true 를 리턴해야 한다.', () { + expect(stateManager.hasRowGroups, true); + }); + + test('enabledRowGroups 이 true 를 리턴해야 한다.', () { + expect(stateManager.enabledRowGroups, true); + }); + + test('rowGroupDelegate 는 PlutoRowGroupByColumnDelegate 이어야 한다.', () { + expect( + stateManager.rowGroupDelegate is PlutoRowGroupByColumnDelegate, + true, + ); + }); + + test('iterateMainRowGroup 가 2개의 행을 리턴해야 한다.', () { + final mainRowGroup = stateManager.iterateAllMainRowGroup.toList(); + + expect(mainRowGroup.length, 2); + }); + + test('iterateRowGroup 가 6개의 행을 리턴해야 한다.', () { + final mainRowGroup = stateManager.iterateAllRowGroup.toList(); + + expect(mainRowGroup.length, 6); + }); + + test('iterateRowAndGroup 가 11개의 행을 리턴해야 한다.', () { + final mainRowGroup = stateManager.iterateAllRowAndGroup.toList(); + + expect(mainRowGroup.length, 11); + }); + + test('iterateRow 가 5개의 행을 리턴해야 한다.', () { + final mainRowGroup = stateManager.iterateAllRow.toList(); + + expect(mainRowGroup.length, 5); + }); + + test('전체 컬럼을 지우고 새 컬럼을 추가하면 기존 행의 셀이 추가 되어야 한다.', () { + stateManager.removeColumns(columns); + + expect(stateManager.refColumns.originalList.length, 0); + expect(stateManager.refRows.originalList.length, 5); + + for (final row in stateManager.refRows.originalList) { + // 그룹 된 컬럼이 삭제되어 모든 행의 parent 가 null 로 초기화 되어야 한다. + expect(row.parent, null); + expect(row.cells['column1'], null); + expect(row.cells['column2'], null); + expect(row.cells['column3'], null); + } + + stateManager.insertColumns(0, [ + PlutoColumn( + title: 'column4', + field: 'column4', + type: PlutoColumnType.text(), + ), + ]); + + expect(stateManager.refColumns.originalList.length, 1); + expect(stateManager.refRows.originalList.length, 5); + + final rowAndGroup = stateManager.iterateAllRowAndGroup.toList(); + + expect(rowAndGroup.length, 5); + for (final row in rowAndGroup) { + expect(row.cells['column1'], null); + expect(row.cells['column2'], null); + expect(row.cells['column3'], null); + expect(row.cells['column4'], isNot(null)); + } + }); + + test('첫번째 행을 expand 하면 refRows 는 4개의 행을 리턴해야 한다.', () { + final firstRowGroup = stateManager.refRows.first; + + stateManager.toggleExpandedRowGroup(rowGroup: firstRowGroup); + + expect(firstRowGroup.type.group.expanded, true); + expect(stateManager.refRows.length, 4); + }); + + test('첫번째 행을 expand 하고 다시 collapse 하면 refRows 는 2개의 행을 리턴해야 한다.', () { + final firstRowGroup = stateManager.refRows.first; + + stateManager.toggleExpandedRowGroup(rowGroup: firstRowGroup); + + expect(firstRowGroup.type.group.expanded, true); + expect(stateManager.refRows.length, 4); + + stateManager.toggleExpandedRowGroup(rowGroup: firstRowGroup); + + expect(firstRowGroup.type.group.expanded, false); + expect(stateManager.refRows.length, 2); + }); + + test( + '첫번째 행을 expand 하고 펼처진 두번째 행을 expand 하면, ' + 'refRows 는 5개의 행을 리턴해야 한다.', + () { + final firstRowGroup = stateManager.refRows.first; + final firstRowGroupFirstChild = firstRowGroup.type.group.children.first; + + stateManager.toggleExpandedRowGroup(rowGroup: firstRowGroup); + stateManager.toggleExpandedRowGroup(rowGroup: firstRowGroupFirstChild); + + expect(firstRowGroup.type.group.expanded, true); + expect(firstRowGroupFirstChild.type.group.expanded, true); + expect(stateManager.refRows.length, 5); + }, + ); + + test( + '첫번째 행과 그 첫번째 자식을 expand 하고 첫번째 행을 다시 collapse 하면, ' + 'refRows 는 2개의 행을 리턴해야 한다.' + '그리고 다시 첫번째 행을 expand 하면 이미 펼쳐져 있던 첫번째 자식은 함께 펼쳐져야 한다.', + () { + final firstRowGroup = stateManager.refRows.first; + final firstRowGroupFirstChild = firstRowGroup.type.group.children.first; + + stateManager.toggleExpandedRowGroup(rowGroup: firstRowGroup); + stateManager.toggleExpandedRowGroup(rowGroup: firstRowGroupFirstChild); + + expect(firstRowGroup.type.group.expanded, true); + expect(firstRowGroupFirstChild.type.group.expanded, true); + expect(stateManager.refRows.length, 5); + + stateManager.toggleExpandedRowGroup(rowGroup: firstRowGroup); + expect(firstRowGroup.type.group.expanded, false); + expect(stateManager.refRows.length, 2); + + stateManager.toggleExpandedRowGroup(rowGroup: firstRowGroup); + expect(firstRowGroup.type.group.expanded, true); + expect(stateManager.refRows.length, 5); + }, + ); + + test('refRows 가 설정한 2개의 컬럼으로 그룹핑 되어야 한다.', () { + final firstGroupField = columns[0].field; + + expect(stateManager.refRows.length, 2); + + expect(stateManager.refRows[0].type.isGroup, true); + expect(stateManager.refRows[0].cells[firstGroupField]!.value, 'A'); + + expect(stateManager.refRows[1].type.isGroup, true); + expect(stateManager.refRows[1].cells[firstGroupField]!.value, 'B'); + }); + + group('첫번째 그룹.', () { + late FilteredList aGroupChildren; + + setUp(() { + aGroupChildren = stateManager.refRows[0].type.group.children; + }); + + test('자식들이 두번째 컬럼으로 그룹핑 되어야 한다.', () { + final secondGroupField = columns[1].field; + + expect(aGroupChildren.length, 2); + + expect(aGroupChildren[0].type.isGroup, true); + expect(aGroupChildren[0].cells[secondGroupField]!.value, '1'); + + expect(aGroupChildren[1].type.isGroup, true); + expect(aGroupChildren[1].cells[secondGroupField]!.value, '2'); + }); + + test('자식들은 각 1개의 자식을 가지고 있어야 한다.', () { + final normalColumnField = columns[2].field; + + final aGroupFirstChildren = aGroupChildren[0].type.group.children; + expect(aGroupFirstChildren.length, 1); + expect(aGroupFirstChildren[0].type.isNormal, true); + expect(aGroupFirstChildren[0].cells[normalColumnField]!.value, '001'); + + final aGroupSecondChildren = aGroupChildren[1].type.group.children; + expect(aGroupSecondChildren.length, 1); + expect(aGroupSecondChildren[0].type.isNormal, true); + expect( + aGroupSecondChildren[0].cells[normalColumnField]!.value, + '002', + ); + }); + }); + + group('두번째 그룹.', () { + late FilteredList bGroupChildren; + + setUp(() { + bGroupChildren = stateManager.refRows[1].type.group.children; + }); + + test('자식들이 두번째 컬럼으로 그룹핑 되어야 한다.', () { + final secondGroupField = columns[1].field; + + expect(bGroupChildren.length, 2); + + expect(bGroupChildren[0].type.isGroup, true); + expect(bGroupChildren[0].cells[secondGroupField]!.value, '1'); + + expect(bGroupChildren[1].type.isGroup, true); + expect(bGroupChildren[1].cells[secondGroupField]!.value, '2'); + }); + + test('자식들은 각 2개, 1개의 자식을 가지고 있어야 한다.', () { + final normalColumnField = columns[2].field; + + final bGroupFirstChildren = bGroupChildren[0].type.group.children; + expect(bGroupFirstChildren.length, 2); + expect(bGroupFirstChildren[0].type.isNormal, true); + expect(bGroupFirstChildren[0].cells[normalColumnField]!.value, '003'); + expect(bGroupFirstChildren[1].type.isNormal, true); + expect(bGroupFirstChildren[1].cells[normalColumnField]!.value, '004'); + + final bGroupSecondChildren = bGroupChildren[1].type.group.children; + expect(bGroupSecondChildren.length, 1); + expect(bGroupSecondChildren[0].type.isNormal, true); + expect( + bGroupSecondChildren[0].cells[normalColumnField]!.value, + '005', + ); + }); + }); + + test('column1 을 A 값으로 필터링 하면 1개의 행이 리턴 되어야 한다.', () { + stateManager.setFilter((row) => row.cells['column1']!.value == 'A'); + + expect(stateManager.refRows.length, 1); + }); + + test('첫번째 행을 펼친 후 column1 을 A 값으로 필터링 하면 3개의 행이 리턴 되어야 한다.', () { + final firstRowGroup = stateManager.refRows.first; + + stateManager.toggleExpandedRowGroup(rowGroup: firstRowGroup); + + stateManager.setFilter((row) => row.cells['column1']!.value == 'A'); + + // 첫번째 행 + 첫번째 행의 2개의 자식 = 3개 + expect(stateManager.refRows.length, 3); + }); + + test('두개의 행을 모두 펼친 후 column2 을 1 값으로 필터링 하면 4개의 행이 리턴 되어야 한다.', () { + final firstRowGroup = stateManager.refRows[0]; + final secondRowGroup = stateManager.refRows[1]; + + stateManager.toggleExpandedRowGroup(rowGroup: firstRowGroup); + stateManager.toggleExpandedRowGroup(rowGroup: secondRowGroup); + expect(stateManager.refRows.length, 6); + + stateManager.setFilter((row) => row.cells['column2']!.value == '1'); + + expect(stateManager.refRows.length, 4); + }); + + test('column1 을 descending 정렬 하면 두개의 행의 위치가 바뀌어야 한다.', () { + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'B'); + + // Ascending + stateManager.toggleSortColumn(columns[0]); + // Descending + stateManager.toggleSortColumn(columns[0]); + + expect(stateManager.refRows[0].cells['column1']!.value, 'B'); + expect(stateManager.refRows[1].cells['column1']!.value, 'A'); + }); + + test( + '두번째 행을 모두 펼친 후 column3 를 descending 정렬 하면, ' + '두번째 행의 2개의 자식의 위치가 바뀌어야 한다.', + () { + final secondRowGroup = stateManager.refRows[1]; + + stateManager.toggleExpandedRowGroup(rowGroup: secondRowGroup); + + final secondRowGroupFirstChild = secondRowGroup.type.group.children[0]; + stateManager.toggleExpandedRowGroup(rowGroup: secondRowGroupFirstChild); + + final secondRowGroupSecondChild = secondRowGroup.type.group.children[1]; + stateManager.toggleExpandedRowGroup( + rowGroup: secondRowGroupSecondChild, + ); + + { + final fistChild = secondRowGroupFirstChild.type.group.children[0]; + expect(fistChild.cells['column3']!.value, '003'); + + final secondChild = secondRowGroupFirstChild.type.group.children[1]; + expect(secondChild.cells['column3']!.value, '004'); + } + + // Ascending + stateManager.toggleSortColumn(columns[2]); + // Descending + stateManager.toggleSortColumn(columns[2]); + + { + final fistChild = secondRowGroupFirstChild.type.group.children[0]; + expect(fistChild.cells['column3']!.value, '004'); + + final secondChild = secondRowGroupFirstChild.type.group.children[1]; + expect(secondChild.cells['column3']!.value, '003'); + } + }, + ); + + test('첫번째 행에 column2 의 값이 3인 행을 추가 하면 첫번째 행의 자식은 3개가 되어야 한다.', () { + final rowToAdd = PlutoRow(cells: { + 'column1': PlutoCell(value: 'A'), + 'column2': PlutoCell(value: '3'), + 'column3': PlutoCell(value: '006'), + }); + + expect(stateManager.refRows.first.type.group.children.length, 2); + + stateManager.insertRows(0, [rowToAdd]); + + expect(stateManager.refRows.first.type.group.children.length, 3); + }); + + test('첫번째 행에 column2 의 값이 3인 행을 추가 하면 추가 된 자식의 parent 가 설정 되어야 한다.', () { + final rowToAdd = PlutoRow(cells: { + 'column1': PlutoCell(value: 'A'), + 'column2': PlutoCell(value: '3'), + 'column3': PlutoCell(value: '006'), + }); + + stateManager.insertRows(0, [rowToAdd]); + + expect(rowToAdd.parent?.cells['column2']!.value, '3'); + expect(rowToAdd.parent?.parent, stateManager.refRows.first); + }); + + test( + '정렬 된 상태에서 첫번째 행에 column2 의 값이 3인 행을 추가 하면, ' + '추가 된 자식의 parent 가 설정 되어야 한다.', + () { + final rowToAdd = PlutoRow(cells: { + 'column1': PlutoCell(value: 'A'), + 'column2': PlutoCell(value: '3'), + 'column3': PlutoCell(value: '006'), + }); + + stateManager.toggleSortColumn(columns.first); + + stateManager.insertRows(0, [rowToAdd]); + + expect(rowToAdd.parent?.cells['column2']!.value, '3'); + expect(rowToAdd.parent?.parent, stateManager.refRows.first); + }, + ); + + test( + 'prependRows 로 column2 의 값이 3인 행을 추가 하면, ' + '추가 된 자식의 parent 가 설정 되어야 한다.', + () { + final rowToAdd = PlutoRow(cells: { + 'column1': PlutoCell(value: 'A'), + 'column2': PlutoCell(value: '3'), + 'column3': PlutoCell(value: '006'), + }); + + stateManager.toggleSortColumn(columns.first); + + stateManager.prependRows([rowToAdd]); + + expect(rowToAdd.parent?.cells['column2']!.value, '3'); + expect(rowToAdd.parent?.parent, stateManager.refRows.first); + }, + ); + + test( + 'appendRows 로 column2 의 값이 3인 행을 추가 하면, ' + '추가 된 자식의 parent 가 설정 되어야 한다.', + () { + final rowToAdd = PlutoRow(cells: { + 'column1': PlutoCell(value: 'A'), + 'column2': PlutoCell(value: '3'), + 'column3': PlutoCell(value: '006'), + }); + + stateManager.toggleSortColumn(columns.first); + + stateManager.appendRows([rowToAdd]); + + expect(rowToAdd.parent?.cells['column2']!.value, '3'); + expect(rowToAdd.parent?.parent, stateManager.refRows.first); + }, + ); + + test('첫번째 행을 삭제 하면 그 자식들도 모두 삭제 되어야 한다.', () { + final firstRowGroup = stateManager.refRows.first; + + expect(stateManager.iterateAllRowAndGroup.length, 11); + + stateManager.removeRows([firstRowGroup]); + + expect(stateManager.iterateAllRowAndGroup.length, 6); + }); + + test('column1 을 삭제 하면 column2 로 다시 그룹핑 되어야 한다.', () { + final firstColumn = stateManager.refColumns.first; + + stateManager.removeColumns([firstColumn]); + + expect(stateManager.refRows.length, 2); + + { + final rowGroup = stateManager.refRows[0]; + expect(rowGroup.cells['column2']!.value, '1'); + expect(rowGroup.type.group.children.length, 3); + } + + { + final rowGroup = stateManager.refRows[1]; + expect(rowGroup.cells['column2']!.value, '2'); + expect(rowGroup.type.group.children.length, 2); + } + }); + + test('column1 을 숨기면 하면 column2 로 다시 그룹핑 되어야 한다.', () { + final firstColumn = stateManager.refColumns.first; + + stateManager.hideColumn(firstColumn, true); + + expect(stateManager.refRows.length, 2); + + { + final rowGroup = stateManager.refRows[0]; + expect(rowGroup.cells['column2']!.value, '1'); + expect(rowGroup.type.group.children.length, 3); + } + + { + final rowGroup = stateManager.refRows[1]; + expect(rowGroup.cells['column2']!.value, '2'); + expect(rowGroup.type.group.children.length, 2); + } + }); + + test('column1 을 숨기고 다시 해제 하면 column1 로 다시 그룹핑 되어야 한다.', () { + final firstColumn = stateManager.refColumns.first; + + stateManager.hideColumn(firstColumn, true); + + expect(stateManager.refRows.length, 2); + + { + final rowGroup = stateManager.refRows[0]; + expect(rowGroup.cells['column2']!.value, '1'); + expect(rowGroup.type.group.children.length, 3); + } + + { + final rowGroup = stateManager.refRows[1]; + expect(rowGroup.cells['column2']!.value, '2'); + expect(rowGroup.type.group.children.length, 2); + } + + stateManager.hideColumn(firstColumn, false); + + { + final rowGroup = stateManager.refRows[0]; + expect(rowGroup.cells['column1']!.value, 'A'); + expect(rowGroup.type.group.children.length, 2); + } + + { + final rowGroup = stateManager.refRows[1]; + expect(rowGroup.cells['column1']!.value, 'B'); + expect(rowGroup.type.group.children.length, 2); + } + }); + + group('insertRows', () { + test('index 0 에 (C, 1, 006) 을 추가.', () { + /// Before + /// 0. A [V] + /// 1. B + /// After + /// 0. C (1 > 006) [V] + /// 1. A + /// 2. B + expect(stateManager.refRows.length, 2); + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'B'); + + stateManager.insertRows(0, [createRow('C', '1', '006')]); + + expect(stateManager.refRows.length, 3); + expect(stateManager.refRows[0].cells['column1']!.value, 'C'); + expect(stateManager.refRows[1].cells['column1']!.value, 'A'); + expect(stateManager.refRows[2].cells['column1']!.value, 'B'); + + final GROUP_C = stateManager.refRows[0]; + final GROUP_C_1 = GROUP_C.type.group.children.first; + expect(GROUP_C_1.parent, GROUP_C); + expect(GROUP_C_1.type.group.children.first.parent, GROUP_C_1); + }); + + test('index 2 에 (C, 1, 006) 을 추가.', () { + /// Before + /// 0. A + /// 1. B + /// 2. [V] + /// After + /// 0. A + /// 1. B + /// 2. C (1 > 006) [V] + expect(stateManager.refRows.length, 2); + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'B'); + + stateManager.insertRows(2, [createRow('C', '1', '006')]); + + expect(stateManager.refRows.length, 3); + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'B'); + expect(stateManager.refRows[2].cells['column1']!.value, 'C'); + + final GROUP_C = stateManager.refRows[2]; + final GROUP_C_1 = GROUP_C.type.group.children.first; + expect(GROUP_C_1.parent, GROUP_C); + expect(GROUP_C_1.type.group.children.first.parent, GROUP_C_1); + }); + + test('index 1 에 (C, 1, 006) 을 추가.', () { + /// Before + /// 0. A + /// 1. B [V] + /// 2. - 1 + /// 3. - 003 + /// 4. - 004 + /// 5. - 2 + /// After + /// 0. A + /// 1. C (1 > 006) [V] + /// 2. B + /// 3. - 1 + /// 4. - 003 + /// 5. - 004 + /// 6. - 2 + final GROUP_B = stateManager.refRows[1]; + final GROUP_B_1 = GROUP_B.type.group.children.first; + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B); + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B_1); + + expect(stateManager.refRows.length, 6); + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'B'); + expect(stateManager.refRows[2].cells['column2']!.value, '1'); + expect(stateManager.refRows[3].cells['column3']!.value, '003'); + expect(stateManager.refRows[4].cells['column3']!.value, '004'); + expect(stateManager.refRows[5].cells['column2']!.value, '2'); + + stateManager.insertRows(1, [createRow('C', '1', '006')]); + + expect(stateManager.refRows.length, 7); + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'C'); + expect(stateManager.refRows[2].cells['column1']!.value, 'B'); + expect(stateManager.refRows[3].cells['column2']!.value, '1'); + expect(stateManager.refRows[4].cells['column3']!.value, '003'); + expect(stateManager.refRows[5].cells['column3']!.value, '004'); + expect(stateManager.refRows[6].cells['column2']!.value, '2'); + + final GROUP_C = stateManager.refRows[1]; + final GROUP_C_1 = GROUP_C.type.group.children.first; + expect(GROUP_C_1.parent, GROUP_C); + expect(GROUP_C_1.type.group.children.first.parent, GROUP_C_1); + }); + + test('index 5 에 (C, 1, 006) 을 추가.', () { + /// Before + /// 0. A + /// 1. B + /// 2. - 1 + /// 3. - 2 + /// 4. - 005 + /// 5. [V] + /// After + /// 0. A + /// 1. B + /// 2. - 1 + /// 3. - 2 + /// 4. - 005 + /// 5. C [V] + final GROUP_B = stateManager.refRows[1]; + final GROUP_B_2 = GROUP_B.type.group.children.last; + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B); + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B_2); + + expect(stateManager.refRows.length, 5); + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'B'); + expect(stateManager.refRows[2].cells['column2']!.value, '1'); + expect(stateManager.refRows[3].cells['column2']!.value, '2'); + expect(stateManager.refRows[4].cells['column3']!.value, '005'); + + stateManager.insertRows(5, [createRow('C', '1', '006')]); + + expect(stateManager.refRows.length, 6); + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'B'); + expect(stateManager.refRows[2].cells['column2']!.value, '1'); + expect(stateManager.refRows[3].cells['column2']!.value, '2'); + expect(stateManager.refRows[4].cells['column3']!.value, '005'); + expect(stateManager.refRows[5].cells['column1']!.value, 'C'); + }); + + test('index 5 에 (B, 3, 006) 을 추가.', () { + /// Before + /// 0. A + /// 1. B + /// 2. - 1 + /// 3. - 2 + /// 4. - 005 + /// 5. [V] + /// After + /// 0. A + /// 1. B + /// 2. - 1 + /// 3. - 2 + /// 4. - 005 + /// 5. - 3 [V] + final GROUP_B = stateManager.refRows[1]; + final GROUP_B_2 = GROUP_B.type.group.children.last; + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B); + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B_2); + + stateManager.insertRows(5, [createRow('B', '3', '006')]); + + expect(stateManager.refRows.length, 6); + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'B'); + expect(stateManager.refRows[2].cells['column2']!.value, '1'); + expect(stateManager.refRows[3].cells['column2']!.value, '2'); + expect(stateManager.refRows[4].cells['column3']!.value, '005'); + expect(stateManager.refRows[5].cells['column2']!.value, '3'); + }); + + test('index 6 에 (B, 1, 006) 을 추가.', () { + /// Before + /// 0. A + /// 1. B + /// 2. - 1 + /// 3. - 003 + /// 4. - 004 + /// 5. - 2 + /// 6. [V] + /// After + /// 0. A + /// 1. B + /// 2. - 1 + /// 3. - 003 + /// 4. - 004 + /// 5. - 006 [V] + /// 6. - 2 + final GROUP_B = stateManager.refRows[1]; + final GROUP_B_1 = GROUP_B.type.group.children.first; + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B); + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B_1); + + stateManager.insertRows(6, [createRow('B', '1', '006')]); + + expect(stateManager.refRows.length, 7); + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'B'); + expect(stateManager.refRows[2].cells['column2']!.value, '1'); + expect(stateManager.refRows[3].cells['column3']!.value, '003'); + expect(stateManager.refRows[4].cells['column3']!.value, '004'); + expect(stateManager.refRows[5].cells['column3']!.value, '006'); + expect(stateManager.refRows[6].cells['column2']!.value, '2'); + }); + + test('index 1 에 (C, 1, 006), (B, 3, 007) 을 추가', () { + /// Before + /// 0. A + /// 1. B [V] + /// 2. - 1 + /// 3. - 003 + /// 4. - 004 + /// 5. - 2 + /// After + /// 0. A + /// 1. C (1 > 006) [V] + /// 2. B + /// 3. - 1 + /// 4. - 003 + /// 5. - 004 + /// 6. - 2 + /// 7. - 3 > (007) + final GROUP_B = stateManager.refRows[1]; + final GROUP_B_1 = GROUP_B.type.group.children.first; + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B); + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B_1); + + expect(stateManager.refRows.length, 6); + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'B'); + expect(stateManager.refRows[2].cells['column2']!.value, '1'); + expect(stateManager.refRows[3].cells['column3']!.value, '003'); + expect(stateManager.refRows[4].cells['column3']!.value, '004'); + expect(stateManager.refRows[5].cells['column2']!.value, '2'); + + stateManager.insertRows(1, [ + createRow('C', '1', '006'), + createRow('B', '3', '007'), + ]); + + expect(stateManager.refRows.length, 8); + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'C'); + expect(stateManager.refRows[2].cells['column1']!.value, 'B'); + expect(stateManager.refRows[3].cells['column2']!.value, '1'); + expect(stateManager.refRows[4].cells['column3']!.value, '003'); + expect(stateManager.refRows[5].cells['column3']!.value, '004'); + expect(stateManager.refRows[6].cells['column2']!.value, '2'); + expect(stateManager.refRows[7].cells['column2']!.value, '3'); + + final GROUP_C = stateManager.refRows[1]; + final GROUP_C_1 = GROUP_C.type.group.children.first; + expect(GROUP_C_1.parent, GROUP_C); + expect(GROUP_C_1.type.group.children.first.parent, GROUP_C_1); + + final GROUP_B_3 = stateManager.refRows[7]; + expect(GROUP_B_3.parent, GROUP_B); + expect(GROUP_B_3.type.group.children.first.parent, GROUP_B_3); + }); + + test('insert 5 에 (C, 2, 006), (C, 3, 007) 을 추가.', () { + /// Before + /// 0. A + /// 1. B + /// 2. - 1 + /// 3. - 003 + /// 4. - 004 + /// 5. - 2 [V] + /// After + /// 0. A + /// 1. B + /// 2. - 1 + /// 3. - 003 + /// 4. - 004 + /// 5. - 3 > (007) [V] + /// 6. - 2 > (005, 006) + final GROUP_B = stateManager.refRows[1]; + final GROUP_B_1 = GROUP_B.type.group.children.first; + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B); + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B_1); + + final GROUP_B_2 = stateManager.refRows[5]; + expect(GROUP_B_2.type.group.children.length, 1); + + stateManager.insertRows(5, [ + createRow('C', '2', '006'), + createRow('C', '3', '007'), + ]); + + expect(GROUP_B_2.type.group.children.length, 2); + final GROUP_B_2_006 = GROUP_B_2.type.group.children[1]; + expect(GROUP_B_2_006.cells['column3']!.value, '006'); + expect(GROUP_B_2_006.parent, GROUP_B_2); + expect(stateManager.refRows[6].cells['column2']!.value, '2'); + + expect(GROUP_B.type.group.children.length, 3); + final GROUP_B_3 = stateManager.refRows[5]; + final GROUP_B_3_007 = GROUP_B_3.type.group.children[0]; + expect(GROUP_B_3.cells['column2']!.value, '3'); + expect(GROUP_B_3_007.cells['column3']!.value, '007'); + expect(GROUP_B_3.parent, GROUP_B); + expect(GROUP_B_3_007.parent, GROUP_B_3); + }); + + test( + 'Column1 을 Descending 정렬 상태에서 index 5 에, ' + '(C, 1, 006), (D, 1, 007) 을 추가.', + () { + /// Before + /// 0. B + /// 1. - 1 + /// 2. - 003 + /// 3. - 004 + /// 4. - 2 + /// 5. A [V] + /// After + /// 0. B + /// 1. - 1 + /// 2. - 003 + /// 3. - 004 + /// 4. - 2 + /// 5. C (1 > 006) [V] + /// 6. D (1 > 007) + /// 7. A + final GROUP_B = stateManager.refRows[1]; + final GROUP_B_1 = GROUP_B.type.group.children.first; + + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B); + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B_1); + + stateManager.sortDescending(stateManager.columns.first); + + expect(stateManager.refRows[0].cells['column1']!.value, 'B'); + expect(stateManager.refRows[5].cells['column1']!.value, 'A'); + + stateManager.insertRows(5, [ + createRow('C', '1', '006'), + createRow('D', '1', '007'), + ]); + + expect(stateManager.refRows[0].cells['column1']!.value, 'B'); + expect(stateManager.refRows[5].cells['column1']!.value, 'C'); + expect(stateManager.refRows[6].cells['column1']!.value, 'D'); + expect(stateManager.refRows[7].cells['column1']!.value, 'A'); + + stateManager.sortBySortIdx(stateManager.columns.first); + + expect(stateManager.refRows[0].cells['column1']!.value, 'C'); + expect(stateManager.refRows[1].cells['column1']!.value, 'D'); + expect(stateManager.refRows[2].cells['column1']!.value, 'A'); + }, + ); + + test( + 'Column1 을 Descending 정렬 상태에서 insert 2 에, ' + '(C, 1, 006), (C, 3, 007) 을 추가.', + () { + /// Before + /// 0. B + /// 1. - 1 + /// 2. - 003 [V] + /// 3. - 004 + /// 4. - 2 + /// 5. A + /// After + /// 0. B + /// 1. - 1 + /// 2. - 006 [V] + /// 3. - 007 + /// 4. - 003 + /// 5. - 004 + /// 6. - 2 + /// 7. A + final GROUP_B = stateManager.refRows[1]; + final GROUP_B_1 = GROUP_B.type.group.children.first; + + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B); + stateManager.toggleExpandedRowGroup(rowGroup: GROUP_B_1); + + stateManager.sortDescending(stateManager.columns.first); + + expect(stateManager.refRows[0].cells['column1']!.value, 'B'); + expect(stateManager.refRows[5].cells['column1']!.value, 'A'); + + stateManager.insertRows(2, [ + createRow('C', '1', '006'), + createRow('C', '3', '007'), + ]); + + expect(stateManager.refRows[0].cells['column1']!.value, 'B'); + expect(stateManager.refRows[1].cells['column2']!.value, '1'); + expect(stateManager.refRows[2].cells['column3']!.value, '006'); + expect(stateManager.refRows[3].cells['column3']!.value, '007'); + expect(stateManager.refRows[4].cells['column3']!.value, '003'); + expect(stateManager.refRows[5].cells['column3']!.value, '004'); + expect(stateManager.refRows[6].cells['column2']!.value, '2'); + expect(stateManager.refRows[7].cells['column1']!.value, 'A'); + + stateManager.sortBySortIdx(stateManager.columns.first); + + expect(stateManager.refRows[0].cells['column1']!.value, 'A'); + expect(stateManager.refRows[1].cells['column1']!.value, 'B'); + expect(stateManager.refRows[2].cells['column2']!.value, '1'); + expect(stateManager.refRows[3].cells['column3']!.value, '006'); + expect(stateManager.refRows[4].cells['column3']!.value, '007'); + expect(stateManager.refRows[5].cells['column3']!.value, '003'); + expect(stateManager.refRows[6].cells['column3']!.value, '004'); + }, + ); + }); + + group('prependRows', () { + test('(C, 1, 006) 을 추가.', () { + /// Before + /// 0. A + /// 1. B + /// After + /// 0. C + /// 1. A + /// 2. B + stateManager.prependRows([createRow('C', '1', '006')]); + + expect(stateManager.refRows.length, 3); + final GROUP_C = stateManager.refRows[0]; + final GROUP_C_1 = GROUP_C.type.group.children.first; + final GROUP_C_1_006 = GROUP_C_1.type.group.children.first; + expect(GROUP_C.cells['column1']!.value, 'C'); + expect(GROUP_C_1.cells['column2']!.value, '1'); + expect(GROUP_C_1_006.cells['column3']!.value, '006'); + expect(GROUP_C_1_006.parent, GROUP_C_1); + expect(GROUP_C_1_006.parent?.parent, GROUP_C); + }); + + test('(B, 2, 006) 을 추가.', () { + /// Before + /// 0. A + /// 1. B + /// After + /// 0. A + /// 1. B (2 > 005, 006) + final GROUP_B = stateManager.refRows[1]; + final GROUP_B_2 = GROUP_B.type.group.children[1]; + expect(stateManager.refRows.length, 2); + expect(GROUP_B_2.type.group.children.length, 1); + + stateManager.prependRows([createRow('B', '2', '006')]); + + final GROUP_B_2_006 = GROUP_B_2.type.group.children[1]; + expect(stateManager.refRows.length, 2); + expect(GROUP_B_2.type.group.children.length, 2); + expect(GROUP_B_2_006.cells['column3']!.value, '006'); + }); + + test('(A, 1, 006), (B, 1, 007), (C, 1, 008) 을 추가.', () { + /// Before + /// 0. A + /// 1. B + /// After + /// 0. C (1 > 008) + /// 1. A (1 > 001 006) + /// 2. B (1 > 003, 004, 007) + stateManager.prependRows([ + createRow('A', '1', '006'), + createRow('B', '1', '007'), + createRow('C', '1', '008'), + ]); + + final GROUP_C = stateManager.refRows[0]; + final GROUP_C_1 = GROUP_C.type.group.children.first; + final GROUP_C_1_008 = GROUP_C_1.type.group.children.first; + final GROUP_A = stateManager.refRows[1]; + final GROUP_A_1 = GROUP_A.type.group.children.first; + final GROUP_A_1_006 = GROUP_A_1.type.group.children.last; + final GROUP_B = stateManager.refRows[2]; + final GROUP_B_1 = GROUP_B.type.group.children.first; + final GROUP_B_1_007 = GROUP_B_1.type.group.children.last; + + expect(GROUP_C.cells['column1']!.value, 'C'); + expect(GROUP_C_1.cells['column2']!.value, '1'); + expect(GROUP_C_1_008.cells['column3']!.value, '008'); + expect(GROUP_C_1_008.parent, GROUP_C_1); + expect(GROUP_C_1_008.parent?.parent, GROUP_C); + + expect(GROUP_A_1_006.cells['column3']!.value, '006'); + expect(GROUP_A_1_006.parent, GROUP_A_1); + expect(GROUP_A_1_006.parent?.parent, GROUP_A); + expect(GROUP_B_1_007.cells['column3']!.value, '007'); + expect(GROUP_B_1_007.parent, GROUP_B_1); + expect(GROUP_B_1_007.parent?.parent, GROUP_B); + }); + }); + + group('appendRows', () { + test('(C, 1, 006) 을 추가.', () { + /// Before + /// 0. A + /// 1. B + /// After + /// 0. A + /// 1. B + /// 2. C (1 > 006) + stateManager.appendRows([createRow('C', '1', '006')]); + + expect(stateManager.refRows.length, 3); + final GROUP_C = stateManager.refRows[2]; + final GROUP_C_1 = GROUP_C.type.group.children.first; + final GROUP_C_1_006 = GROUP_C_1.type.group.children.first; + expect(GROUP_C.cells['column1']!.value, 'C'); + expect(GROUP_C_1.cells['column2']!.value, '1'); + expect(GROUP_C_1_006.cells['column3']!.value, '006'); + }); + + test('(B, 3, 006), (C, 1, 007), (C, 2, 008) 을 추가.', () { + /// Before + /// 0. A + /// 1. B + /// After + /// 0. A + /// 1. B (3 > 006) + /// 2. C (1 > 007, 2 > 008) + stateManager.appendRows([ + createRow('B', '3', '006'), + createRow('C', '1', '007'), + createRow('C', '2', '008'), + ]); + + expect(stateManager.refRows.length, 3); + final GROUP_B = stateManager.refRows[1]; + final GROUP_B_3 = GROUP_B.type.group.children.last; + final GROUP_B_3_006 = GROUP_B_3.type.group.children.first; + expect(GROUP_B_3.cells['column2']!.value, '3'); + expect(GROUP_B_3_006.cells['column3']!.value, '006'); + + final GROUP_C = stateManager.refRows[2]; + final GROUP_C_1 = GROUP_C.type.group.children.first; + final GROUP_C_1_007 = GROUP_C_1.type.group.children.first; + final GROUP_C_2 = GROUP_C.type.group.children.last; + final GROUP_C_2_008 = GROUP_C_2.type.group.children.first; + expect(GROUP_C.cells['column1']!.value, 'C'); + expect(GROUP_C_1.cells['column2']!.value, '1'); + expect(GROUP_C_1_007.cells['column3']!.value, '007'); + expect(GROUP_C_2.cells['column2']!.value, '2'); + expect(GROUP_C_2_008.cells['column3']!.value, '008'); + }); + }); + + group('removeRows', () { + test('A 그룹의 001 을 삭제하면 A 그룹의 1 그룹과 함께 삭제 되어야 한다.', () { + /// A - 1 - 001 + /// - 2 - 002 + /// B - 1 - 003, 004 + /// - 2 - 005 + final A = stateManager.refRows[0]; + final A_1 = A.type.group.children[0]; + final A_1_001 = A_1.type.group.children[0]; + expect(A_1_001.cells['column3']!.value, '001'); + + stateManager.removeRows([A_1_001]); + + expect(stateManager.refRows[0], A); + expect(stateManager.refRows[0].type.group.children.length, 1); + expect(stateManager.refRows[0].type.group.children[0], isNot(A_1)); + + findRemovedRows(e) => e.key == A_1.key || e.key == A_1_001.key; + expect( + stateManager.iterateAllRowAndGroup.where(findRemovedRows).length, + 0, + ); + }); + + test('B 그룹의 003 을 삭제하면 003 만 삭제 되어야 한다.', () { + /// A - 1 - 001 + /// - 2 - 002 + /// B - 1 - 003, 004 + /// - 2 - 005 + final B = stateManager.refRows[1]; + final B_1 = B.type.group.children[0]; + final B_1_003 = B_1.type.group.children[0]; + + expect(stateManager.iterateAllRowAndGroup.length, 11); + + stateManager.removeRows([B_1_003]); + + expect(stateManager.iterateAllRowAndGroup.length, 10); + + expect(B_1.type.group.children.length, 1); + expect(B_1.type.group.children[0], isNot(B_1_003)); + findRemovedRows(e) => e.key == B_1_003; + expect( + stateManager.iterateAllRowAndGroup.where(findRemovedRows).length, + 0, + ); + }); + + test('B 그룹의 003, 004 을 삭제하면 B_1 과 함께 삭제 되어야 한다.', () { + /// A - 1 - 001 + /// - 2 - 002 + /// B - 1 - 003, 004 + /// - 2 - 005 + final B = stateManager.refRows[1]; + final B_1 = B.type.group.children[0]; + final B_1_003 = B_1.type.group.children[0]; + final B_1_004 = B_1.type.group.children[1]; + + expect(B.type.group.children.length, 2); + expect(stateManager.iterateAllRowAndGroup.length, 11); + + stateManager.removeRows([B_1_003, B_1_004]); + + expect(B.type.group.children.length, 1); + expect(stateManager.iterateAllRowAndGroup.length, 8); + expect(B.type.group.children[0], isNot(B_1)); + findRemovedRows(e) => + e.key == B_1 || e.key == B_1_003 || e.key == B_1_004; + expect( + stateManager.iterateAllRowAndGroup.where(findRemovedRows).length, + 0, + ); + }); + }); + }); + + /// G100 + /// - G110 + /// - R111 + /// - R112 + /// - R120 + /// - R130 + /// G200 + /// - R210 + /// - G220 + /// - R221 + /// - R222 + group('최대 3 뎁스로 그룹화 - PlutoRowGroupTreeDelegate', () { + late List columns; + + late List rows; + + late PlutoGridStateManager stateManager; + + Map createCell(String value) { + return { + 'column1': PlutoCell(value: value), + 'column2': PlutoCell(value: ''), + 'column3': PlutoCell(value: ''), + 'column4': PlutoCell(value: ''), + 'column5': PlutoCell(value: ''), + }; + } + + setUp(() { + columns = [ + PlutoColumn( + title: 'column1', + field: 'column1', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column2', + field: 'column2', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column3', + field: 'column3', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column4', + field: 'column4', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'column5', + field: 'column5', + type: PlutoColumnType.text(), + ), + ]; + + rows = [ + PlutoRow( + cells: createCell('G100'), + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow( + cells: createCell('G110'), + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow(cells: createCell('R111')), + PlutoRow(cells: createCell('R112')), + ], + ), + ), + ), + PlutoRow(cells: createCell('R120')), + PlutoRow(cells: createCell('R130')), + ], + ), + ), + ), + PlutoRow( + cells: createCell('G200'), + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow(cells: createCell('R210')), + PlutoRow( + cells: createCell('G220'), + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow(cells: createCell('R221')), + PlutoRow(cells: createCell('R222')), + ], + ), + ), + ), + ], + ), + ), + ), + ]; + + stateManager = createStateManager(columns: columns, rows: rows); + + stateManager.setRowGroup( + PlutoRowGroupTreeDelegate( + resolveColumnDepth: (column) => stateManager.columnIndex(column), + showText: (cell) => cell.row.type.isNormal, + ), + ); + }); + + test('hasRowGroups 가 true 를 리턴해야 한다.', () { + expect(stateManager.hasRowGroups, true); + }); + + test('enabledRowGroups 가 true 를 리턴해야 한다.', () { + expect(stateManager.enabledRowGroups, true); + }); + + test('rowGroupDelegate 가 PlutoRowGroupTreeDelegate 이어야 한다.', () { + expect(stateManager.rowGroupDelegate is PlutoRowGroupTreeDelegate, true); + }); + + test('iterateMainRowGroup 가 2개 행을 리턴해야 한다.', () { + expect(stateManager.iterateAllMainRowGroup.length, 2); + }); + + test('iterateRowGroup 가 4개 행을 리턴해야 한다.', () { + expect(stateManager.iterateAllRowGroup.length, 4); + }); + + test('iterateRowAndGroup 가 11개 행을 리턴해야 한다.', () { + expect(stateManager.iterateAllRowAndGroup.length, 11); + }); + + test('iterateRow 가 7개 행을 리턴해야 한다.', () { + expect(stateManager.iterateAllRow.length, 7); + }); + + test('refRows 의 두개의 행이 isMainRow true 를 반환해야 한다.', () { + expect(stateManager.refRows.length, 2); + expect(stateManager.isMainRow(stateManager.refRows[0]), true); + expect(stateManager.isMainRow(stateManager.refRows[1]), true); + }); + + test('계층에 맞게 parent 가 설정 되어야 한다.', () { + final G100 = stateManager.refRows[0]; + final G100_CHILDREN = G100.type.group.children; + expect(G100.parent, null); + expect(G100_CHILDREN.length, 3); + expect(G100_CHILDREN.length, 3); + expect(G100_CHILDREN[0].parent, G100); + expect(G100_CHILDREN[1].parent, G100); + expect(G100_CHILDREN[2].parent, G100); + + final G110 = G100_CHILDREN[0]; + final G110_CHILDREN = G110.type.group.children; + expect(G110_CHILDREN.length, 2); + expect(G110_CHILDREN[0].parent, G110); + expect(G110_CHILDREN[0].parent?.parent, G100); + expect(G110_CHILDREN[1].parent, G110); + expect(G110_CHILDREN[1].parent?.parent, G100); + + final G200 = stateManager.refRows[1]; + expect(G200.parent, null); + expect(G200.type.group.children.length, 2); + expect(G200.type.group.children[0].parent, G200); + expect(G200.type.group.children[1].parent, G200); + + final G220 = G200.type.group.children[1]; + final G220_CHILDREN = G220.type.group.children; + expect(G220_CHILDREN.length, 2); + expect(G220_CHILDREN[0].parent, G220); + expect(G220_CHILDREN[0].parent?.parent, G200); + expect(G220_CHILDREN[1].parent, G220); + expect(G220_CHILDREN[1].parent?.parent, G200); + }); + + test('전체 컬럼을 지우고 새 컬럼을 추가하면 기존 행의 셀이 추가 되어야 한다.', () { + stateManager.removeColumns(columns); + + expect(stateManager.refColumns.originalList.length, 0); + expect(stateManager.refRows.originalList.length, 2); + + for (final row in stateManager.refRows.originalList) { + expect(row.parent, null); + expect(row.cells['column1'], null); + expect(row.cells['column2'], null); + expect(row.cells['column3'], null); + expect(row.cells['column4'], null); + expect(row.cells['column5'], null); + } + + stateManager.insertColumns(0, [ + PlutoColumn( + title: 'column6', + field: 'column6', + type: PlutoColumnType.text(), + ), + ]); + + expect(stateManager.refColumns.originalList.length, 1); + expect(stateManager.refRows.originalList.length, 2); + + final rowAndGroup = stateManager.iterateAllRowAndGroup.toList(); + + expect(rowAndGroup.length, 11); + for (final row in rowAndGroup) { + expect(row.cells['column1'], null); + expect(row.cells['column2'], null); + expect(row.cells['column3'], null); + expect(row.cells['column4'], null); + expect(row.cells['column5'], null); + expect(row.cells['column6'], isNot(null)); + } + }); + + /// G300 + /// - G310 + /// - G320 + /// - G321 + /// - G322 + /// G100 + /// - G110 + /// - R111 + /// - R112 + /// - R120 + /// - R130 + /// G200 + /// - R210 + /// - G220 + /// - R221 + /// - R222 + group('insertAll', () { + group('0번에 3뎁스의 그룹 추가.', () { + setUp(() { + stateManager.insertRows(0, [ + PlutoRow( + cells: createCell('G300'), + type: PlutoRowType.group( + children: FilteredList(initialList: [ + PlutoRow(cells: createCell('G310')), + PlutoRow( + cells: createCell('G320'), + type: PlutoRowType.group( + children: FilteredList(initialList: [ + PlutoRow(cells: createCell('G321')), + PlutoRow(cells: createCell('G322')), + ]), + ), + ), + ]), + ), + ), + ]); + }); + + test('첫번째 행에 G300 이 추가 되어야 한다.', () { + expect(stateManager.refRows[0].cells['column1']!.value, 'G300'); + expect(stateManager.refRows[1].cells['column1']!.value, 'G100'); + expect(stateManager.refRows[2].cells['column1']!.value, 'G200'); + }); + + test('추가 된 행들의 parent 가 설정 되어야 한다.', () { + final G300 = stateManager.refRows[0]; + final G310 = G300.type.group.children[0]; + final G320 = G300.type.group.children[1]; + final G321 = G320.type.group.children[0]; + final G322 = G320.type.group.children[1]; + + expect(G310.parent, G300); + expect(G320.parent, G300); + expect(G321.parent, G320); + expect(G321.parent?.parent, G300); + expect(G322.parent, G320); + expect(G322.parent?.parent, G300); + }); + + test('추가 된 G300의 sortIdx 가 설정 되어야 한다.', () { + final G300 = stateManager.refRows[0]; + final G100 = stateManager.refRows[1]; + final G200 = stateManager.refRows[2]; + expect(G300.sortIdx, 0); + expect(G100.sortIdx, 1); + expect(G200.sortIdx, 2); + }); + + test('G300 을 토글 하면 G310,G320 이 refRows 에 추가 되어야 한다.', () { + final G300 = stateManager.refRows[0]; + expect(G300.cells['column1']!.value, 'G300'); + + stateManager.toggleExpandedRowGroup(rowGroup: G300); + + expect(stateManager.refRows[0].cells['column1']!.value, 'G300'); + expect(stateManager.refRows[1].cells['column1']!.value, 'G310'); + expect(stateManager.refRows[2].cells['column1']!.value, 'G320'); + }); + + test( + 'G300 을 토글 후 1번 인덱스 G310에 G400을 추가하면, ' + 'G400 은 G310 의 부모인 G300 의 자식이 되어야 한다.', + () { + final G300 = stateManager.refRows[0]; + stateManager.toggleExpandedRowGroup(rowGroup: G300); + + final addedRow = PlutoRow(cells: createCell('G400')); + + stateManager.insertRows(1, [addedRow]); + + expect(stateManager.refRows[0].cells['column1']!.value, 'G300'); + expect(stateManager.refRows[1].cells['column1']!.value, 'G400'); + expect(stateManager.refRows[2].cells['column1']!.value, 'G310'); + expect(stateManager.refRows[3].cells['column1']!.value, 'G320'); + expect(stateManager.refRows[4].cells['column1']!.value, 'G100'); + expect(stateManager.refRows[5].cells['column1']!.value, 'G200'); + + final G400 = stateManager.refRows[1]; + expect(G400.parent, G300); + + expect(G300.type.group.children[0].sortIdx, 0); + expect(G300.type.group.children[0], G400); + expect(G300.type.group.children[1].sortIdx, 1); + expect(G300.type.group.children[1].cells['column1']!.value, 'G310'); + expect(G300.type.group.children[2].sortIdx, 2); + expect(G300.type.group.children[2].cells['column1']!.value, 'G320'); + + /// 다시 300 을 접으면 다음 레벨인 G100, G200 이 위치해야 한다. + stateManager.toggleExpandedRowGroup(rowGroup: G300); + expect(stateManager.refRows[0].cells['column1']!.value, 'G300'); + expect(stateManager.refRows[1].cells['column1']!.value, 'G100'); + expect(stateManager.refRows[2].cells['column1']!.value, 'G200'); + }, + ); + + test( + 'G200, G220 을 토글 후 7번 인덱스에 G400 추가하면 마지막 그룹으로 추가 되어야 한다.', + () { + final G200 = stateManager.refRows[2]; + final G220 = G200.type.group.children[1]; + stateManager.toggleExpandedRowGroup(rowGroup: G200); + stateManager.toggleExpandedRowGroup(rowGroup: G220); + + final addedRow = PlutoRow(cells: createCell('G400')); + + stateManager.insertRows(7, [addedRow]); + + expect(stateManager.refRows[0].cells['column1']!.value, 'G300'); + expect(stateManager.refRows[1].cells['column1']!.value, 'G100'); + expect(stateManager.refRows[2].cells['column1']!.value, 'G200'); + expect(stateManager.refRows[3].cells['column1']!.value, 'R210'); + expect(stateManager.refRows[4].cells['column1']!.value, 'G220'); + expect(stateManager.refRows[5].cells['column1']!.value, 'R221'); + expect(stateManager.refRows[6].cells['column1']!.value, 'R222'); + expect(stateManager.refRows[7].cells['column1']!.value, 'G400'); + }, + ); + }); + }); + }); +} diff --git a/test/src/manager/state/row_state_test.dart b/test/src/manager/state/row_state_test.dart index a8d53e9c6..a939ea37e 100644 --- a/test/src/manager/state/row_state_test.dart +++ b/test/src/manager/state/row_state_test.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; @@ -8,13 +7,8 @@ import '../../../helper/column_helper.dart'; import '../../../helper/pluto_widget_test_helper.dart'; import '../../../helper/row_helper.dart'; import '../../../mock/mock_on_change_listener.dart'; -import 'row_state_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) void main() { final scroll = MockPlutoGridScrollController(); @@ -34,8 +28,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: rows, - gridFocusNode: gridFocusNode, - scroll: scroll, + gridFocusNode: gridFocusNode ?? MockFocusNode(), + scroll: scroll ?? MockPlutoGridScrollController(), configuration: configuration, createHeader: createHeader, ); @@ -584,68 +578,6 @@ void main() { ); }); - group('setSortIdxOfRows', () { - testWidgets( - 'The sortIdx value of rows should be increased from 0 and filled.', - (WidgetTester tester) async { - // given - List columns = [ - ...ColumnHelper.textColumn('text', count: 3, width: 150), - ]; - - List rows = RowHelper.count(5, columns); - - PlutoGridStateManager stateManager = createStateManager( - columns: columns, - rows: rows, - gridFocusNode: null, - scroll: null, - ); - - // when - final rowsFilledSortIdx = stateManager.setSortIdxOfRows(rows); - - // then - expect(rowsFilledSortIdx[0].sortIdx, 0); - expect(rowsFilledSortIdx[1].sortIdx, 1); - expect(rowsFilledSortIdx[2].sortIdx, 2); - expect(rowsFilledSortIdx[3].sortIdx, 3); - expect(rowsFilledSortIdx[4].sortIdx, 4); - }); - - testWidgets( - 'The sortIdx value of rows should be decrease from 4 and filled.', - (WidgetTester tester) async { - // given - List columns = [ - ...ColumnHelper.textColumn('text', count: 3, width: 150), - ]; - - List rows = RowHelper.count(5, columns); - - PlutoGridStateManager stateManager = createStateManager( - columns: columns, - rows: rows, - gridFocusNode: null, - scroll: null, - ); - - // when - final rowsFilledSortIdx = stateManager.setSortIdxOfRows( - rows, - increase: false, - start: 4, - ); - - // then - expect(rowsFilledSortIdx[0].sortIdx, 4); - expect(rowsFilledSortIdx[1].sortIdx, 3); - expect(rowsFilledSortIdx[2].sortIdx, 2); - expect(rowsFilledSortIdx[3].sortIdx, 1); - expect(rowsFilledSortIdx[4].sortIdx, 0); - }); - }); - group('setRowChecked', () { testWidgets( '해당 row 가 없는 경우 notifyListener 가 호출 되지 않아야 한다.', @@ -664,15 +596,15 @@ void main() { scroll: null, ); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when stateManager.setRowChecked(PlutoRow(cells: {}), true); // then - verifyNever(listener.onChangeVoidNoParamListener()); + verifyNever(listener.noParamReturnVoid()); }, ); @@ -693,9 +625,9 @@ void main() { scroll: null, ); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when final row = rows.first; @@ -710,14 +642,14 @@ void main() { isTrue, ); - verify(listener.onChangeVoidNoParamListener()).called(1); + verify(listener.noParamReturnVoid()).called(1); }, ); }); group('insertRows', () { testWidgets( - '삽입 할 위치가 rows 인덱스 범위가 아니면 행이 추가 되지 않아야 한다.', + '삽입 할 위치가 rows 인덱스 범위가 0 보다 작으면 0에 최대 index 보다 크면 최대 index 에 insert 된다.', (WidgetTester tester) async { // given List columns = [ @@ -734,20 +666,33 @@ void main() { ); // when - final countRows = stateManager.rows.length; + int countRows = stateManager.rows.length; // then - stateManager.insertRows(-1, RowHelper.count(3, columns)); - expect(stateManager.rows.length, countRows); + { + final addedRows = RowHelper.count(3, columns); + stateManager.insertRows(-1, addedRows); + countRows += 3; + expect(stateManager.rows.length, countRows); + expect(stateManager.rows.getRange(0, 3), addedRows); + } - stateManager.insertRows(-2, RowHelper.count(3, columns)); - expect(stateManager.rows.length, countRows); + { + final addedRows = RowHelper.count(3, columns); + stateManager.insertRows(-2, addedRows); + countRows += 3; + expect(stateManager.rows.length, countRows); + expect(stateManager.rows.getRange(0, 3), addedRows); + } - stateManager.insertRows( - stateManager.rows.length + 1, - RowHelper.count(3, columns), - ); - expect(stateManager.rows.length, countRows); + { + final addedRows = RowHelper.count(3, columns); + stateManager.insertRows(stateManager.rows.length + 1, addedRows); + countRows += 3; + expect(stateManager.rows.length, countRows); + final length = stateManager.rows.length; + expect(stateManager.rows.getRange(length - 3, length), addedRows); + } }, ); @@ -852,9 +797,9 @@ void main() { stateManager.toggleSortColumn(columns.first); expect(stateManager.hasSortedColumn, isTrue); - expect(stateManager.rows[0].sortIdx, 1); - expect(stateManager.rows[1].sortIdx, 2); - expect(stateManager.rows[2].sortIdx, 0); + expect(stateManager.rows[0].sortIdx, 1); // 1 + expect(stateManager.rows[1].sortIdx, 2); // 2 + expect(stateManager.rows[2].sortIdx, 0); // 3 // when final rowsToAdd = [ @@ -1479,9 +1424,9 @@ void main() { stateManager.setGridGlobalOffset(const Offset(0.0, 0.0)); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when final rowKey = rows.first.key; @@ -1497,7 +1442,7 @@ void main() { // then expect(stateManager.rows.length, 5); expect(stateManager.rows[1].key, rowKey); - verify(listener.onChangeVoidNoParamListener()).called(1); + verify(listener.noParamReturnVoid()).called(1); }, ); @@ -1526,9 +1471,9 @@ void main() { stateManager.setGridGlobalOffset(const Offset(0.0, 0.0)); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when final rowKey = rows[2].key; @@ -1544,7 +1489,7 @@ void main() { // then expect(stateManager.rows.length, 5); expect(stateManager.rows[1].key, rowKey); - verify(listener.onChangeVoidNoParamListener()).called(1); + verify(listener.noParamReturnVoid()).called(1); }, ); @@ -1573,9 +1518,9 @@ void main() { stateManager.setGridGlobalOffset(const Offset(0.0, 0.0)); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when final rowKey = rows.first.key; @@ -1591,7 +1536,7 @@ void main() { // then expect(stateManager.rows.length, 5); expect(stateManager.rows[4].key, rowKey); - verify(listener.onChangeVoidNoParamListener()).called(1); + verify(listener.noParamReturnVoid()).called(1); }, ); @@ -1620,9 +1565,9 @@ void main() { stateManager.setGridGlobalOffset(const Offset(0.0, 0.0)); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when const offset = -10.0; @@ -1634,7 +1579,7 @@ void main() { // then expect(stateManager.rows.length, 5); - verifyNever(listener.onChangeVoidNoParamListener()); + verifyNever(listener.noParamReturnVoid()); }, ); @@ -1663,9 +1608,9 @@ void main() { stateManager.setGridGlobalOffset(const Offset(0.0, 0.0)); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when // header + row0 ~ row4 + 1 @@ -1678,7 +1623,7 @@ void main() { // then expect(stateManager.rows.length, 5); - verifyNever(listener.onChangeVoidNoParamListener()); + verifyNever(listener.noParamReturnVoid()); }, ); @@ -1709,9 +1654,9 @@ void main() { stateManager.setGridGlobalOffset(const Offset(0.0, 0.0)); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when final rowKey = rows[1].key; @@ -1727,7 +1672,7 @@ void main() { // then expect(stateManager.rows.length, 5); expect(stateManager.rows[0].key, rowKey); - verify(listener.onChangeVoidNoParamListener()).called(1); + verify(listener.noParamReturnVoid()).called(1); }, ); }); @@ -1750,9 +1695,9 @@ void main() { scroll: scroll, ); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when final rowKey = rows.first.key; @@ -1765,7 +1710,7 @@ void main() { // then expect(stateManager.rows.length, 5); expect(stateManager.rows[1].key, rowKey); - verify(listener.onChangeVoidNoParamListener()).called(1); + verify(listener.noParamReturnVoid()).called(1); }, ); @@ -1786,9 +1731,9 @@ void main() { scroll: scroll, ); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when final rowKey = rows[2].key; @@ -1801,7 +1746,7 @@ void main() { // then expect(stateManager.rows.length, 5); expect(stateManager.rows[1].key, rowKey); - verify(listener.onChangeVoidNoParamListener()).called(1); + verify(listener.noParamReturnVoid()).called(1); }, ); @@ -1822,9 +1767,9 @@ void main() { scroll: scroll, ); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when final rowKey = rows[0].key; @@ -1837,7 +1782,7 @@ void main() { // then expect(stateManager.rows.length, 2); expect(stateManager.rows[1].key, rowKey); - verify(listener.onChangeVoidNoParamListener()).called(1); + verify(listener.noParamReturnVoid()).called(1); }, ); }); @@ -1859,9 +1804,9 @@ void main() { scroll: null, ); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when stateManager.toggleAllRowChecked(true); @@ -1869,7 +1814,7 @@ void main() { // then expect( stateManager.rows.where((element) => element.checked!).length, 10); - verify(listener.onChangeVoidNoParamListener()).called(1); + verify(listener.noParamReturnVoid()).called(1); }, ); @@ -1889,9 +1834,9 @@ void main() { scroll: null, ); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when stateManager.toggleAllRowChecked(false); @@ -1899,7 +1844,7 @@ void main() { // then expect( stateManager.rows.where((element) => !element.checked!).length, 10); - verify(listener.onChangeVoidNoParamListener()).called(1); + verify(listener.noParamReturnVoid()).called(1); }, ); @@ -1919,9 +1864,9 @@ void main() { scroll: null, ); - final listener = MockOnChangeListener(); + final listener = MockMethods(); - stateManager.addListener(listener.onChangeVoidNoParamListener); + stateManager.addListener(listener.noParamReturnVoid); // when stateManager.toggleAllRowChecked(true, notify: false); @@ -1929,7 +1874,7 @@ void main() { // then expect( stateManager.rows.where((element) => element.checked!).length, 10); - verifyNever(listener.onChangeVoidNoParamListener()); + verifyNever(listener.noParamReturnVoid()); }, ); }); diff --git a/test/src/manager/state/row_state_test.mocks.dart b/test/src/manager/state/row_state_test.mocks.dart deleted file mode 100644 index 566a98696..000000000 --- a/test/src/manager/state/row_state_test.mocks.dart +++ /dev/null @@ -1,157 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/manager/state/row_state_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i5; -import 'dart:ui' as _i6; - -import 'package:flutter/material.dart' as _i2; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i4; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakeScrollController_0 extends _i1.Fake implements _i2.ScrollController { -} - -class _FakePlutoGridStateManager_1 extends _i1.Fake - implements _i3.PlutoGridStateManager {} - -class _FakePublishSubject_2 extends _i1.Fake - implements _i4.PublishSubject {} - -class _FakeStreamSubscription_3 extends _i1.Fake - implements _i5.StreamSubscription {} - -/// A class which mocks [PlutoGridScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridScrollController extends _i1.Mock - implements _i3.PlutoGridScrollController { - @override - set vertical(_i3.LinkedScrollControllerGroup? _vertical) => - super.noSuchMethod(Invocation.setter(#vertical, _vertical), - returnValueForMissingStub: null); - @override - set horizontal(_i3.LinkedScrollControllerGroup? _horizontal) => - super.noSuchMethod(Invocation.setter(#horizontal, _horizontal), - returnValueForMissingStub: null); - @override - double get maxScrollHorizontal => - (super.noSuchMethod(Invocation.getter(#maxScrollHorizontal), - returnValue: 0.0) as double); - @override - double get maxScrollVertical => (super - .noSuchMethod(Invocation.getter(#maxScrollVertical), returnValue: 0.0) - as double); - @override - double get verticalOffset => - (super.noSuchMethod(Invocation.getter(#verticalOffset), returnValue: 0.0) - as double); - @override - double get horizontalOffset => (super - .noSuchMethod(Invocation.getter(#horizontalOffset), returnValue: 0.0) - as double); - @override - void setBodyRowsHorizontal(_i2.ScrollController? scrollController) => - super.noSuchMethod( - Invocation.method(#setBodyRowsHorizontal, [scrollController]), - returnValueForMissingStub: null); - @override - void setBodyRowsVertical(_i2.ScrollController? scrollController) => super - .noSuchMethod(Invocation.method(#setBodyRowsVertical, [scrollController]), - returnValueForMissingStub: null); -} - -/// A class which mocks [LinkedScrollControllerGroup]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockLinkedScrollControllerGroup extends _i1.Mock - implements _i3.LinkedScrollControllerGroup { - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - _i2.ScrollController addAndGet() => - (super.noSuchMethod(Invocation.method(#addAndGet, []), - returnValue: _FakeScrollController_0()) as _i2.ScrollController); - @override - void addOffsetChangedListener(_i6.VoidCallback? onChanged) => super - .noSuchMethod(Invocation.method(#addOffsetChangedListener, [onChanged]), - returnValueForMissingStub: null); - @override - void removeOffsetChangedListener(_i6.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#removeOffsetChangedListener, [listener]), - returnValueForMissingStub: null); - @override - _i5.Future animateTo(double? offset, - {_i2.Curve? curve, Duration? duration}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#curve: curve, #duration: duration}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void resetScroll() => super.noSuchMethod(Invocation.method(#resetScroll, []), - returnValueForMissingStub: null); - @override - void applyViewportDimension(double? value) => - super.noSuchMethod(Invocation.method(#applyViewportDimension, [value]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [PlutoGridEventManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridEventManager extends _i1.Mock - implements _i3.PlutoGridEventManager { - @override - _i3.PlutoGridStateManager get stateManager => - (super.noSuchMethod(Invocation.getter(#stateManager), - returnValue: _FakePlutoGridStateManager_1()) - as _i3.PlutoGridStateManager); - @override - _i4.PublishSubject<_i3.PlutoGridEvent> get subject => - (super.noSuchMethod(Invocation.getter(#subject), - returnValue: _FakePublishSubject_2<_i3.PlutoGridEvent>()) - as _i4.PublishSubject<_i3.PlutoGridEvent>); - @override - _i5.StreamSubscription get subscription => - (super.noSuchMethod(Invocation.getter(#subscription), - returnValue: _FakeStreamSubscription_3()) - as _i5.StreamSubscription); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); - @override - void addEvent(_i3.PlutoGridEvent? event) => - super.noSuchMethod(Invocation.method(#addEvent, [event]), - returnValueForMissingStub: null); - @override - _i5.StreamSubscription<_i3.PlutoGridEvent> listener( - void Function(_i3.PlutoGridEvent)? onData) => - (super.noSuchMethod(Invocation.method(#listener, [onData]), - returnValue: _FakeStreamSubscription_3<_i3.PlutoGridEvent>()) - as _i5.StreamSubscription<_i3.PlutoGridEvent>); -} diff --git a/test/src/manager/state/scroll_state_test.dart b/test/src/manager/state/scroll_state_test.dart index 96b50d92e..651f679b9 100644 --- a/test/src/manager/state/scroll_state_test.dart +++ b/test/src/manager/state/scroll_state_test.dart @@ -1,15 +1,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; -import 'scroll_state_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { PlutoGridStateManager createStateManager({ required List columns, @@ -22,8 +18,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: rows, - gridFocusNode: gridFocusNode, - scroll: scroll, + gridFocusNode: gridFocusNode ?? MockFocusNode(), + scroll: scroll ?? MockPlutoGridScrollController(), configuration: configuration, ); diff --git a/test/src/manager/state/scroll_state_test.mocks.dart b/test/src/manager/state/scroll_state_test.mocks.dart deleted file mode 100644 index 0c77d6003..000000000 --- a/test/src/manager/state/scroll_state_test.mocks.dart +++ /dev/null @@ -1,66 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/manager/state/scroll_state_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i4; - -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i2; -import 'package:rxdart/rxdart.dart' as _i3; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePlutoGridStateManager_0 extends _i1.Fake - implements _i2.PlutoGridStateManager {} - -class _FakePublishSubject_1 extends _i1.Fake - implements _i3.PublishSubject {} - -class _FakeStreamSubscription_2 extends _i1.Fake - implements _i4.StreamSubscription {} - -/// A class which mocks [PlutoGridEventManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridEventManager extends _i1.Mock - implements _i2.PlutoGridEventManager { - @override - _i2.PlutoGridStateManager get stateManager => - (super.noSuchMethod(Invocation.getter(#stateManager), - returnValue: _FakePlutoGridStateManager_0()) - as _i2.PlutoGridStateManager); - @override - _i3.PublishSubject<_i2.PlutoGridEvent> get subject => - (super.noSuchMethod(Invocation.getter(#subject), - returnValue: _FakePublishSubject_1<_i2.PlutoGridEvent>()) - as _i3.PublishSubject<_i2.PlutoGridEvent>); - @override - _i4.StreamSubscription get subscription => - (super.noSuchMethod(Invocation.getter(#subscription), - returnValue: _FakeStreamSubscription_2()) - as _i4.StreamSubscription); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); - @override - void addEvent(_i2.PlutoGridEvent? event) => - super.noSuchMethod(Invocation.method(#addEvent, [event]), - returnValueForMissingStub: null); - @override - _i4.StreamSubscription<_i2.PlutoGridEvent> listener( - void Function(_i2.PlutoGridEvent)? onData) => - (super.noSuchMethod(Invocation.method(#listener, [onData]), - returnValue: _FakeStreamSubscription_2<_i2.PlutoGridEvent>()) - as _i4.StreamSubscription<_i2.PlutoGridEvent>); -} diff --git a/test/src/manager/state/selecting_state_test.dart b/test/src/manager/state/selecting_state_test.dart index 01a1934a2..4239aa569 100644 --- a/test/src/manager/state/selecting_state_test.dart +++ b/test/src/manager/state/selecting_state_test.dart @@ -1,17 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../../helper/column_helper.dart'; import '../../../helper/row_helper.dart'; -import 'selecting_state_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) void main() { PlutoGridStateManager createStateManager({ required List columns, @@ -24,8 +19,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: rows, - gridFocusNode: gridFocusNode, - scroll: scroll, + gridFocusNode: gridFocusNode ?? MockFocusNode(), + scroll: scroll ?? MockPlutoGridScrollController(), configuration: configuration, ); diff --git a/test/src/manager/state/selecting_state_test.mocks.dart b/test/src/manager/state/selecting_state_test.mocks.dart deleted file mode 100644 index bcddb55ac..000000000 --- a/test/src/manager/state/selecting_state_test.mocks.dart +++ /dev/null @@ -1,117 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/manager/state/selecting_state_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i5; -import 'dart:ui' as _i6; - -import 'package:flutter/material.dart' as _i2; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i4; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakeScrollController_0 extends _i1.Fake implements _i2.ScrollController { -} - -class _FakePlutoGridStateManager_1 extends _i1.Fake - implements _i3.PlutoGridStateManager {} - -class _FakePublishSubject_2 extends _i1.Fake - implements _i4.PublishSubject {} - -class _FakeStreamSubscription_3 extends _i1.Fake - implements _i5.StreamSubscription {} - -/// A class which mocks [LinkedScrollControllerGroup]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockLinkedScrollControllerGroup extends _i1.Mock - implements _i3.LinkedScrollControllerGroup { - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - _i2.ScrollController addAndGet() => - (super.noSuchMethod(Invocation.method(#addAndGet, []), - returnValue: _FakeScrollController_0()) as _i2.ScrollController); - @override - void addOffsetChangedListener(_i6.VoidCallback? onChanged) => super - .noSuchMethod(Invocation.method(#addOffsetChangedListener, [onChanged]), - returnValueForMissingStub: null); - @override - void removeOffsetChangedListener(_i6.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#removeOffsetChangedListener, [listener]), - returnValueForMissingStub: null); - @override - _i5.Future animateTo(double? offset, - {_i2.Curve? curve, Duration? duration}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#curve: curve, #duration: duration}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i5.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void resetScroll() => super.noSuchMethod(Invocation.method(#resetScroll, []), - returnValueForMissingStub: null); - @override - void applyViewportDimension(double? value) => - super.noSuchMethod(Invocation.method(#applyViewportDimension, [value]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [PlutoGridEventManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridEventManager extends _i1.Mock - implements _i3.PlutoGridEventManager { - @override - _i3.PlutoGridStateManager get stateManager => - (super.noSuchMethod(Invocation.getter(#stateManager), - returnValue: _FakePlutoGridStateManager_1()) - as _i3.PlutoGridStateManager); - @override - _i4.PublishSubject<_i3.PlutoGridEvent> get subject => - (super.noSuchMethod(Invocation.getter(#subject), - returnValue: _FakePublishSubject_2<_i3.PlutoGridEvent>()) - as _i4.PublishSubject<_i3.PlutoGridEvent>); - @override - _i5.StreamSubscription get subscription => - (super.noSuchMethod(Invocation.getter(#subscription), - returnValue: _FakeStreamSubscription_3()) - as _i5.StreamSubscription); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); - @override - void addEvent(_i3.PlutoGridEvent? event) => - super.noSuchMethod(Invocation.method(#addEvent, [event]), - returnValueForMissingStub: null); - @override - _i5.StreamSubscription<_i3.PlutoGridEvent> listener( - void Function(_i3.PlutoGridEvent)? onData) => - (super.noSuchMethod(Invocation.method(#listener, [onData]), - returnValue: _FakeStreamSubscription_3<_i3.PlutoGridEvent>()) - as _i5.StreamSubscription<_i3.PlutoGridEvent>); -} diff --git a/test/src/manager/state/visibility_state_test.dart b/test/src/manager/state/visibility_state_test.dart index 905727dba..ef848c543 100644 --- a/test/src/manager/state/visibility_state_test.dart +++ b/test/src/manager/state/visibility_state_test.dart @@ -1,17 +1,11 @@ import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import '../../../helper/column_helper.dart'; -import 'visibility_state_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) void main() { PlutoGridStateManager createStateManager({ required List columns, @@ -24,8 +18,8 @@ void main() { final stateManager = PlutoGridStateManager( columns: columns, rows: rows, - gridFocusNode: gridFocusNode, - scroll: scroll, + gridFocusNode: gridFocusNode ?? MockFocusNode(), + scroll: scroll ?? MockPlutoGridScrollController(), configuration: configuration, ); @@ -280,7 +274,7 @@ void main() { layout: const BoxConstraints(maxWidth: 800), ); - stateManager.scroll!.setBodyRowsHorizontal(rowsScroll); + stateManager.scroll.setBodyRowsHorizontal(rowsScroll); // setLayout 메서드에서 applyViewportDimension 한번 호출 되어 리셋. reset(horizontalScroll); diff --git a/test/src/manager/state/visibility_state_test.mocks.dart b/test/src/manager/state/visibility_state_test.mocks.dart deleted file mode 100644 index c25790c32..000000000 --- a/test/src/manager/state/visibility_state_test.mocks.dart +++ /dev/null @@ -1,450 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/manager/state/visibility_state_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i6; -import 'dart:ui' as _i5; - -import 'package:flutter/gestures.dart' as _i3; -import 'package:flutter/material.dart' as _i2; -import 'package:flutter/rendering.dart' as _i7; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/src/widgets/pluto_linked_scroll_controller.dart' - as _i4; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakeScrollController_0 extends _i1.Fake implements _i2.ScrollController { -} - -class _FakeScrollPosition_1 extends _i1.Fake implements _i2.ScrollPosition {} - -class _FakeScrollPhysics_2 extends _i1.Fake implements _i2.ScrollPhysics {} - -class _FakeScrollContext_3 extends _i1.Fake implements _i2.ScrollContext {} - -class _FakeValueNotifier_4 extends _i1.Fake implements _i2.ValueNotifier { -} - -class _FakeScrollHoldController_5 extends _i1.Fake - implements _i2.ScrollHoldController {} - -class _FakeDrag_6 extends _i1.Fake implements _i3.Drag {} - -class _FakeScrollMetrics_7 extends _i1.Fake implements _i2.ScrollMetrics {} - -/// A class which mocks [LinkedScrollControllerGroup]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockLinkedScrollControllerGroup extends _i1.Mock - implements _i4.LinkedScrollControllerGroup { - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - _i2.ScrollController addAndGet() => - (super.noSuchMethod(Invocation.method(#addAndGet, []), - returnValue: _FakeScrollController_0()) as _i2.ScrollController); - @override - void addOffsetChangedListener(_i5.VoidCallback? onChanged) => super - .noSuchMethod(Invocation.method(#addOffsetChangedListener, [onChanged]), - returnValueForMissingStub: null); - @override - void removeOffsetChangedListener(_i5.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#removeOffsetChangedListener, [listener]), - returnValueForMissingStub: null); - @override - _i6.Future animateTo(double? offset, - {_i2.Curve? curve, Duration? duration}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#curve: curve, #duration: duration}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void resetScroll() => super.noSuchMethod(Invocation.method(#resetScroll, []), - returnValueForMissingStub: null); - @override - void applyViewportDimension(double? value) => - super.noSuchMethod(Invocation.method(#applyViewportDimension, [value]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [ScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScrollController extends _i1.Mock implements _i2.ScrollController { - @override - bool get keepScrollOffset => - (super.noSuchMethod(Invocation.getter(#keepScrollOffset), - returnValue: false) as bool); - @override - double get initialScrollOffset => - (super.noSuchMethod(Invocation.getter(#initialScrollOffset), - returnValue: 0.0) as double); - @override - Iterable<_i2.ScrollPosition> get positions => - (super.noSuchMethod(Invocation.getter(#positions), - returnValue: <_i2.ScrollPosition>[]) as Iterable<_i2.ScrollPosition>); - @override - bool get hasClients => - (super.noSuchMethod(Invocation.getter(#hasClients), returnValue: false) - as bool); - @override - _i2.ScrollPosition get position => - (super.noSuchMethod(Invocation.getter(#position), - returnValue: _FakeScrollPosition_1()) as _i2.ScrollPosition); - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future animateTo(double? offset, - {Duration? duration, _i2.Curve? curve}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#duration: duration, #curve: curve}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void attach(_i2.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#attach, [position]), - returnValueForMissingStub: null); - @override - void detach(_i2.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#detach, [position]), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i2.ScrollPosition createScrollPosition(_i2.ScrollPhysics? physics, - _i2.ScrollContext? context, _i2.ScrollPosition? oldPosition) => - (super.noSuchMethod( - Invocation.method( - #createScrollPosition, [physics, context, oldPosition]), - returnValue: _FakeScrollPosition_1()) as _i2.ScrollPosition); - @override - void debugFillDescription(List? description) => super.noSuchMethod( - Invocation.method(#debugFillDescription, [description]), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [ScrollPosition]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScrollPosition extends _i1.Mock implements _i2.ScrollPosition { - @override - _i2.ScrollPhysics get physics => - (super.noSuchMethod(Invocation.getter(#physics), - returnValue: _FakeScrollPhysics_2()) as _i2.ScrollPhysics); - @override - _i2.ScrollContext get context => - (super.noSuchMethod(Invocation.getter(#context), - returnValue: _FakeScrollContext_3()) as _i2.ScrollContext); - @override - bool get keepScrollOffset => - (super.noSuchMethod(Invocation.getter(#keepScrollOffset), - returnValue: false) as bool); - @override - _i2.ValueNotifier get isScrollingNotifier => (super.noSuchMethod( - Invocation.getter(#isScrollingNotifier), - returnValue: _FakeValueNotifier_4()) as _i2.ValueNotifier); - @override - double get minScrollExtent => - (super.noSuchMethod(Invocation.getter(#minScrollExtent), returnValue: 0.0) - as double); - @override - double get maxScrollExtent => - (super.noSuchMethod(Invocation.getter(#maxScrollExtent), returnValue: 0.0) - as double); - @override - bool get hasContentDimensions => - (super.noSuchMethod(Invocation.getter(#hasContentDimensions), - returnValue: false) as bool); - @override - double get pixels => - (super.noSuchMethod(Invocation.getter(#pixels), returnValue: 0.0) - as double); - @override - bool get hasPixels => - (super.noSuchMethod(Invocation.getter(#hasPixels), returnValue: false) - as bool); - @override - double get viewportDimension => (super - .noSuchMethod(Invocation.getter(#viewportDimension), returnValue: 0.0) - as double); - @override - bool get hasViewportDimension => - (super.noSuchMethod(Invocation.getter(#hasViewportDimension), - returnValue: false) as bool); - @override - bool get haveDimensions => (super - .noSuchMethod(Invocation.getter(#haveDimensions), returnValue: false) - as bool); - @override - bool get allowImplicitScrolling => - (super.noSuchMethod(Invocation.getter(#allowImplicitScrolling), - returnValue: false) as bool); - @override - _i7.ScrollDirection get userScrollDirection => - (super.noSuchMethod(Invocation.getter(#userScrollDirection), - returnValue: _i7.ScrollDirection.idle) as _i7.ScrollDirection); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i2.AxisDirection get axisDirection => - (super.noSuchMethod(Invocation.getter(#axisDirection), - returnValue: _i2.AxisDirection.up) as _i2.AxisDirection); - @override - _i2.Axis get axis => (super.noSuchMethod(Invocation.getter(#axis), - returnValue: _i2.Axis.horizontal) as _i2.Axis); - @override - bool get outOfRange => - (super.noSuchMethod(Invocation.getter(#outOfRange), returnValue: false) - as bool); - @override - bool get atEdge => - (super.noSuchMethod(Invocation.getter(#atEdge), returnValue: false) - as bool); - @override - double get extentBefore => - (super.noSuchMethod(Invocation.getter(#extentBefore), returnValue: 0.0) - as double); - @override - double get extentInside => - (super.noSuchMethod(Invocation.getter(#extentInside), returnValue: 0.0) - as double); - @override - double get extentAfter => - (super.noSuchMethod(Invocation.getter(#extentAfter), returnValue: 0.0) - as double); - @override - void absorb(_i2.ScrollPosition? other) => - super.noSuchMethod(Invocation.method(#absorb, [other]), - returnValueForMissingStub: null); - @override - double setPixels(double? newPixels) => - (super.noSuchMethod(Invocation.method(#setPixels, [newPixels]), - returnValue: 0.0) as double); - @override - void correctPixels(double? value) => - super.noSuchMethod(Invocation.method(#correctPixels, [value]), - returnValueForMissingStub: null); - @override - void correctBy(double? correction) => - super.noSuchMethod(Invocation.method(#correctBy, [correction]), - returnValueForMissingStub: null); - @override - void forcePixels(double? value) => - super.noSuchMethod(Invocation.method(#forcePixels, [value]), - returnValueForMissingStub: null); - @override - void saveScrollOffset() => - super.noSuchMethod(Invocation.method(#saveScrollOffset, []), - returnValueForMissingStub: null); - @override - void restoreScrollOffset() => - super.noSuchMethod(Invocation.method(#restoreScrollOffset, []), - returnValueForMissingStub: null); - @override - void restoreOffset(double? offset, {bool? initialRestore = false}) => - super.noSuchMethod( - Invocation.method( - #restoreOffset, [offset], {#initialRestore: initialRestore}), - returnValueForMissingStub: null); - @override - void saveOffset() => super.noSuchMethod(Invocation.method(#saveOffset, []), - returnValueForMissingStub: null); - @override - double applyBoundaryConditions(double? value) => - (super.noSuchMethod(Invocation.method(#applyBoundaryConditions, [value]), - returnValue: 0.0) as double); - @override - bool applyViewportDimension(double? viewportDimension) => (super.noSuchMethod( - Invocation.method(#applyViewportDimension, [viewportDimension]), - returnValue: false) as bool); - @override - bool applyContentDimensions( - double? minScrollExtent, double? maxScrollExtent) => - (super.noSuchMethod( - Invocation.method( - #applyContentDimensions, [minScrollExtent, maxScrollExtent]), - returnValue: false) as bool); - @override - bool correctForNewDimensions( - _i2.ScrollMetrics? oldPosition, _i2.ScrollMetrics? newPosition) => - (super.noSuchMethod( - Invocation.method( - #correctForNewDimensions, [oldPosition, newPosition]), - returnValue: false) as bool); - @override - void applyNewDimensions() => - super.noSuchMethod(Invocation.method(#applyNewDimensions, []), - returnValueForMissingStub: null); - @override - _i6.Future ensureVisible(_i2.RenderObject? object, - {double? alignment = 0.0, - Duration? duration = Duration.zero, - _i2.Curve? curve = _i2.Curves.ease, - _i2.ScrollPositionAlignmentPolicy? alignmentPolicy = - _i2.ScrollPositionAlignmentPolicy.explicit, - _i2.RenderObject? targetRenderObject}) => - (super.noSuchMethod( - Invocation.method(#ensureVisible, [ - object - ], { - #alignment: alignment, - #duration: duration, - #curve: curve, - #alignmentPolicy: alignmentPolicy, - #targetRenderObject: targetRenderObject - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - _i6.Future animateTo(double? to, - {Duration? duration, _i2.Curve? curve}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [to], {#duration: duration, #curve: curve}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void pointerScroll(double? delta) => - super.noSuchMethod(Invocation.method(#pointerScroll, [delta]), - returnValueForMissingStub: null); - @override - _i6.Future moveTo(double? to, - {Duration? duration, _i2.Curve? curve, bool? clamp = true}) => - (super.noSuchMethod( - Invocation.method(#moveTo, [to], - {#duration: duration, #curve: curve, #clamp: clamp}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpToWithoutSettling(double? value) => - super.noSuchMethod(Invocation.method(#jumpToWithoutSettling, [value]), - returnValueForMissingStub: null); - @override - _i2.ScrollHoldController hold(_i5.VoidCallback? holdCancelCallback) => - (super.noSuchMethod(Invocation.method(#hold, [holdCancelCallback]), - returnValue: _FakeScrollHoldController_5()) - as _i2.ScrollHoldController); - @override - _i3.Drag drag(_i2.DragStartDetails? details, - _i5.VoidCallback? dragCancelCallback) => - (super.noSuchMethod( - Invocation.method(#drag, [details, dragCancelCallback]), - returnValue: _FakeDrag_6()) as _i3.Drag); - @override - void beginActivity(_i2.ScrollActivity? newActivity) => - super.noSuchMethod(Invocation.method(#beginActivity, [newActivity]), - returnValueForMissingStub: null); - @override - void didStartScroll() => - super.noSuchMethod(Invocation.method(#didStartScroll, []), - returnValueForMissingStub: null); - @override - void didUpdateScrollPositionBy(double? delta) => - super.noSuchMethod(Invocation.method(#didUpdateScrollPositionBy, [delta]), - returnValueForMissingStub: null); - @override - void didEndScroll() => - super.noSuchMethod(Invocation.method(#didEndScroll, []), - returnValueForMissingStub: null); - @override - void didOverscrollBy(double? value) => - super.noSuchMethod(Invocation.method(#didOverscrollBy, [value]), - returnValueForMissingStub: null); - @override - void didUpdateScrollDirection(_i7.ScrollDirection? direction) => super - .noSuchMethod(Invocation.method(#didUpdateScrollDirection, [direction]), - returnValueForMissingStub: null); - @override - void didUpdateScrollMetrics() => - super.noSuchMethod(Invocation.method(#didUpdateScrollMetrics, []), - returnValueForMissingStub: null); - @override - bool recommendDeferredLoading(_i2.BuildContext? context) => (super - .noSuchMethod(Invocation.method(#recommendDeferredLoading, [context]), - returnValue: false) as bool); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void debugFillDescription(List? description) => super.noSuchMethod( - Invocation.method(#debugFillDescription, [description]), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - _i2.ScrollMetrics copyWith( - {double? minScrollExtent, - double? maxScrollExtent, - double? pixels, - double? viewportDimension, - _i2.AxisDirection? axisDirection}) => - (super.noSuchMethod( - Invocation.method(#copyWith, [], { - #minScrollExtent: minScrollExtent, - #maxScrollExtent: maxScrollExtent, - #pixels: pixels, - #viewportDimension: viewportDimension, - #axisDirection: axisDirection - }), - returnValue: _FakeScrollMetrics_7()) as _i2.ScrollMetrics); -} diff --git a/test/src/plugin/pluto_aggregate_column_footer_test.dart b/test/src/plugin/pluto_aggregate_column_footer_test.dart index f336b2901..820fc494a 100644 --- a/test/src/plugin/pluto_aggregate_column_footer_test.dart +++ b/test/src/plugin/pluto_aggregate_column_footer_test.dart @@ -1,16 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:rxdart/rxdart.dart'; import '../../helper/pluto_widget_test_helper.dart'; -import 'pluto_aggregate_column_footer_test.mocks.dart'; +import '../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { late MockPlutoGridStateManager stateManager; @@ -20,12 +16,15 @@ void main() { required PlutoColumn column, required FilteredList rows, required PlutoAggregateColumnType type, + PlutoAggregateColumnGroupedRowType groupedRowType = + PlutoAggregateColumnGroupedRowType.all, PlutoAggregateFilter? filter, String? locale, String? format, List Function(String)? titleSpanBuilder, AlignmentGeometry? alignment, EdgeInsets? padding, + bool enabledRowGroups = false, }) { return PlutoWidgetTestHelper('PlutoAggregateColumnFooter : ', (tester) async { @@ -40,6 +39,11 @@ void main() { when(stateManager.refRows).thenReturn(rows); + when(stateManager.enabledRowGroups).thenReturn(enabledRowGroups); + + when(stateManager.iterateMainRowGroup) + .thenReturn(rows.where((r) => r.isMain)); + await tester.pumpWidget( MaterialApp( home: Material( @@ -49,6 +53,7 @@ void main() { column: column, ), type: type, + groupedRowType: groupedRowType, filter: filter, format: format ?? '#,###', locale: locale, @@ -249,4 +254,208 @@ void main() { }, ); }); + + group('RowGroups', () { + final columns = [ + PlutoColumn( + title: 'column', + field: 'column', + type: PlutoColumnType.number(), + ), + ]; + + buildWidget( + column: columns.first, + rows: FilteredList(initialList: [ + PlutoRow( + cells: {'column': PlutoCell(value: 1000)}, + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + ], + ))), + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + PlutoRow(cells: {'column': PlutoCell(value: 3000)}), + ]), + type: PlutoAggregateColumnType.sum, + groupedRowType: PlutoAggregateColumnGroupedRowType.all, + enabledRowGroups: true, + titleSpanBuilder: (text) { + return [ + WidgetSpan(child: Text('Value : $text')), + ]; + }, + ).test( + 'GroupedRowType 이 all 인 경우 ' + 'Value : 10,000 이 출력 되어야 한다.', + (tester) async { + expect(find.text('Value : 10,000'), findsOneWidget); + }, + ); + + buildWidget( + column: columns.first, + rows: FilteredList(initialList: [ + PlutoRow( + cells: {'column': PlutoCell(value: 1000)}, + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + ], + ))), + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + PlutoRow(cells: {'column': PlutoCell(value: 3000)}), + ]), + type: PlutoAggregateColumnType.sum, + groupedRowType: PlutoAggregateColumnGroupedRowType.expandedAll, + enabledRowGroups: true, + titleSpanBuilder: (text) { + return [ + WidgetSpan(child: Text('Value : $text')), + ]; + }, + ).test( + 'GroupedRowType 이 expandedAll 이고 그룹행이 접혀진 경우 ' + 'Value : 6,000 이 출력 되어야 한다.', + (tester) async { + expect(find.text('Value : 6,000'), findsOneWidget); + }, + ); + + buildWidget( + column: columns.first, + rows: FilteredList(initialList: [ + PlutoRow( + cells: {'column': PlutoCell(value: 1000)}, + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + ], + ), + expanded: true, + )), + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + PlutoRow(cells: {'column': PlutoCell(value: 3000)}), + ]), + type: PlutoAggregateColumnType.sum, + groupedRowType: PlutoAggregateColumnGroupedRowType.expandedAll, + enabledRowGroups: true, + titleSpanBuilder: (text) { + return [ + WidgetSpan(child: Text('Value : $text')), + ]; + }, + ).test( + 'GroupedRowType 이 expandedAll 이고 그룹행이 펼쳐진 경우 ' + 'Value : 10,000 이 출력 되어야 한다.', + (tester) async { + expect(find.text('Value : 10,000'), findsOneWidget); + }, + ); + + buildWidget( + column: columns.first, + rows: FilteredList(initialList: [ + PlutoRow( + cells: {'column': PlutoCell(value: 1000)}, + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + ], + ), + expanded: true, + )), + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + PlutoRow(cells: {'column': PlutoCell(value: 3000)}), + ]), + type: PlutoAggregateColumnType.sum, + groupedRowType: PlutoAggregateColumnGroupedRowType.rows, + enabledRowGroups: true, + titleSpanBuilder: (text) { + return [ + WidgetSpan(child: Text('Value : $text')), + ]; + }, + ).test( + 'GroupedRowType 이 rows 인 경우 ' + 'Value : 9,000 이 출력 되어야 한다.', + (tester) async { + expect(find.text('Value : 9,000'), findsOneWidget); + }, + ); + + buildWidget( + column: columns.first, + rows: FilteredList(initialList: [ + PlutoRow( + cells: {'column': PlutoCell(value: 1000)}, + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + ], + ), + expanded: false, + )), + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + PlutoRow(cells: {'column': PlutoCell(value: 3000)}), + ]), + type: PlutoAggregateColumnType.sum, + groupedRowType: PlutoAggregateColumnGroupedRowType.expandedRows, + enabledRowGroups: true, + titleSpanBuilder: (text) { + return [ + WidgetSpan(child: Text('Value : $text')), + ]; + }, + ).test( + 'GroupedRowType 이 expandedRows 이고 그룹행이 접혀진 경우 ' + 'Value : 5,000 이 출력 되어야 한다.', + (tester) async { + expect(find.text('Value : 5,000'), findsOneWidget); + }, + ); + + buildWidget( + column: columns.first, + rows: FilteredList(initialList: [ + PlutoRow( + cells: {'column': PlutoCell(value: 1000)}, + type: PlutoRowType.group( + children: FilteredList( + initialList: [ + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + ], + ), + expanded: true, + )), + PlutoRow(cells: {'column': PlutoCell(value: 2000)}), + PlutoRow(cells: {'column': PlutoCell(value: 3000)}), + ]), + type: PlutoAggregateColumnType.sum, + groupedRowType: PlutoAggregateColumnGroupedRowType.expandedRows, + enabledRowGroups: true, + titleSpanBuilder: (text) { + return [ + WidgetSpan(child: Text('Value : $text')), + ]; + }, + ).test( + 'GroupedRowType 이 expandedRows 이고 그룹행이 펼쳐진 경우 ' + 'Value : 9,000 이 출력 되어야 한다.', + (tester) async { + expect(find.text('Value : 9,000'), findsOneWidget); + }, + ); + }); } diff --git a/test/src/plugin/pluto_aggregate_column_footer_test.mocks.dart b/test/src/plugin/pluto_aggregate_column_footer_test.mocks.dart deleted file mode 100644 index 50fe62c73..000000000 --- a/test/src/plugin/pluto_aggregate_column_footer_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/plugin/pluto_aggregate_column_footer_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} diff --git a/test/src/plugin/pluto_pagination_test.dart b/test/src/plugin/pluto_pagination_test.dart index d5af7d798..0a474f63a 100644 --- a/test/src/plugin/pluto_pagination_test.dart +++ b/test/src/plugin/pluto_pagination_test.dart @@ -1,17 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:rxdart/rxdart.dart'; import '../../helper/pluto_widget_test_helper.dart'; import '../../helper/test_helper_util.dart'; -import '../plugin/pluto_pagination_test.mocks.dart'; +import '../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { MockPlutoGridStateManager? stateManager; diff --git a/test/src/plugin/pluto_pagination_test.mocks.dart b/test/src/plugin/pluto_pagination_test.mocks.dart deleted file mode 100644 index 9ecdd8155..000000000 --- a/test/src/plugin/pluto_pagination_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/plugin/pluto_pagination_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} diff --git a/test/src/pluto_dual_grid_test.dart b/test/src/pluto_dual_grid_test.dart index 13cc0e9d6..788239ed7 100644 --- a/test/src/pluto_dual_grid_test.dart +++ b/test/src/pluto_dual_grid_test.dart @@ -446,15 +446,15 @@ void main() { await tester.sendKeyEvent(LogicalKeyboardKey.arrowRight); await tester.pumpAndSettle(); - expect(stateManagerA!.gridFocusNode!.hasFocus, isTrue); - expect(stateManagerB!.gridFocusNode!.hasFocus, isFalse); + expect(stateManagerA!.gridFocusNode.hasFocus, isTrue); + expect(stateManagerB!.gridFocusNode.hasFocus, isFalse); // 2 > right grid await tester.sendKeyEvent(LogicalKeyboardKey.arrowRight); await tester.pumpAndSettle(); - expect(stateManagerA!.gridFocusNode!.hasFocus, isFalse); - expect(stateManagerB!.gridFocusNode!.hasFocus, isTrue); + expect(stateManagerA!.gridFocusNode.hasFocus, isFalse); + expect(stateManagerB!.gridFocusNode.hasFocus, isTrue); // right grid > 0 await tester.sendKeyEvent(LogicalKeyboardKey.arrowRight); @@ -478,8 +478,8 @@ void main() { await tester.sendKeyEvent(LogicalKeyboardKey.tab); await tester.pumpAndSettle(); - expect(stateManagerA!.gridFocusNode!.hasFocus, isFalse); - expect(stateManagerB!.gridFocusNode!.hasFocus, isTrue); + expect(stateManagerA!.gridFocusNode.hasFocus, isFalse); + expect(stateManagerB!.gridFocusNode.hasFocus, isTrue); // right grid > 0 await tester.sendKeyEvent(LogicalKeyboardKey.tab); @@ -505,8 +505,8 @@ void main() { await tester.sendKeyEvent(LogicalKeyboardKey.tab); await tester.pumpAndSettle(); - expect(stateManagerA!.gridFocusNode!.hasFocus, isFalse); - expect(stateManagerB!.gridFocusNode!.hasFocus, isTrue); + expect(stateManagerA!.gridFocusNode.hasFocus, isFalse); + expect(stateManagerB!.gridFocusNode.hasFocus, isTrue); // right grid > 0 await tester.sendKeyDownEvent(LogicalKeyboardKey.shift); @@ -524,8 +524,8 @@ void main() { await tester.pumpAndSettle(); await tester.sendKeyUpEvent(LogicalKeyboardKey.shift); - expect(stateManagerA!.gridFocusNode!.hasFocus, isTrue); - expect(stateManagerB!.gridFocusNode!.hasFocus, isFalse); + expect(stateManagerA!.gridFocusNode.hasFocus, isTrue); + expect(stateManagerB!.gridFocusNode.hasFocus, isFalse); }, ); }); diff --git a/test/src/pluto_grid_date_picker_test.dart b/test/src/pluto_grid_date_picker_test.dart index f6863a2d4..7f45df5eb 100644 --- a/test/src/pluto_grid_date_picker_test.dart +++ b/test/src/pluto_grid_date_picker_test.dart @@ -12,7 +12,7 @@ import '../mock/mock_on_change_listener.dart'; final now = DateTime.now(); -final mockListener = MockOnChangeListener(); +final mockListener = MockMethods(); void main() { late PlutoGridStateManager stateManager; @@ -369,7 +369,7 @@ void main() { format: 'yyyy-MM-dd', headerFormat: 'yyyy-MM', initDate: DateTime(2022, 6, 11), - onSelected: mockListener.onChangeOneParamListener, + onSelected: mockListener.oneParamReturnVoid, ).test( '2022.6.11 일을 선택하고 탭하면, ' 'onSelected 콜백이 호출 되어야 한다.', @@ -379,7 +379,7 @@ void main() { await tester.pump(); verify( - mockListener.onChangeOneParamListener(argThat( + mockListener.oneParamReturnVoid(argThat( PlutoObjectMatcher(rule: (object) { return object.cell!.value == '2022-06-11'; }))), @@ -391,7 +391,7 @@ void main() { format: 'yyyy-MM-dd', headerFormat: 'yyyy-MM', initDate: DateTime(2022, 6, 11), - onLoaded: mockListener.onChangeOneParamListener, + onLoaded: mockListener.oneParamReturnVoid, ).test( '2022.6.11 일을 선택하고 탭하면, ' 'onSelected 콜백이 호출 되어야 한다.', @@ -401,7 +401,7 @@ void main() { await tester.pump(); verify( - mockListener.onChangeOneParamListener( + mockListener.oneParamReturnVoid( argThat( isA(), ), diff --git a/test/src/pluto_grid_popup_test.dart b/test/src/pluto_grid_popup_test.dart index 8d2a37720..5e2695904 100644 --- a/test/src/pluto_grid_popup_test.dart +++ b/test/src/pluto_grid_popup_test.dart @@ -150,7 +150,7 @@ void main() { stateManager.moveScrollByColumn(PlutoMoveDirection.right, 8); await tester.pumpAndSettle(); - final scrollOffset = stateManager.scroll!.horizontal!.offset; + final scrollOffset = stateManager.scroll.horizontal!.offset; final lastColumn = find.text('title9'); final lastStartPosition = tester.getTopRight(lastColumn); @@ -192,7 +192,7 @@ void main() { stateManager.moveScrollByColumn(PlutoMoveDirection.right, 8); await tester.pumpAndSettle(); - final scrollOffset = stateManager.scroll!.horizontal!.offset; + final scrollOffset = stateManager.scroll.horizontal!.offset; final lastCell = find.text('title9 value 0'); final lastStartPosition = tester.getTopRight(lastCell); diff --git a/test/src/pluto_grid_test.dart b/test/src/pluto_grid_test.dart index 2210f0e5b..a2faedb85 100644 --- a/test/src/pluto_grid_test.dart +++ b/test/src/pluto_grid_test.dart @@ -682,7 +682,7 @@ void main() { testWidgets( 'WHEN Row has sortIdx' - 'THEN sortIdx is not changed', (WidgetTester tester) async { + 'THEN sortIdx is reset.', (WidgetTester tester) async { // given final columns = [ ...ColumnHelper.textColumn('header', count: 1), @@ -716,11 +716,11 @@ void main() { await tester.pumpAndSettle(); // then - expect(stateManager!.rows[0].sortIdx, 5); - expect(stateManager!.rows[1].sortIdx, 6); - expect(stateManager!.rows[2].sortIdx, 7); - expect(stateManager!.rows[3].sortIdx, 8); - expect(stateManager!.rows[4].sortIdx, 9); + expect(stateManager!.rows[0].sortIdx, 0); + expect(stateManager!.rows[1].sortIdx, 1); + expect(stateManager!.rows[2].sortIdx, 2); + expect(stateManager!.rows[3].sortIdx, 3); + expect(stateManager!.rows[4].sortIdx, 4); }); }); diff --git a/test/src/ui/cells/pluto_currency_cell_test.dart b/test/src/ui/cells/pluto_currency_cell_test.dart index 5d3f513ad..7b08494e3 100644 --- a/test/src/ui/cells/pluto_currency_cell_test.dart +++ b/test/src/ui/cells/pluto_currency_cell_test.dart @@ -1,16 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; import '../../../helper/row_helper.dart'; -import 'pluto_currency_cell_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { late MockPlutoGridStateManager stateManager; diff --git a/test/src/ui/cells/pluto_currency_cell_test.mocks.dart b/test/src/ui/cells/pluto_currency_cell_test.mocks.dart deleted file mode 100644 index bda58a55f..000000000 --- a/test/src/ui/cells/pluto_currency_cell_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/cells/pluto_currency_cell_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} diff --git a/test/src/ui/cells/pluto_date_cell_test.dart b/test/src/ui/cells/pluto_date_cell_test.dart index 88bf060b8..39dc88e7a 100644 --- a/test/src/ui/cells/pluto_date_cell_test.dart +++ b/test/src/ui/cells/pluto_date_cell_test.dart @@ -1,18 +1,14 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; import '../../../helper/pluto_widget_test_helper.dart'; import '../../../helper/row_helper.dart'; -import 'pluto_date_cell_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { late MockPlutoGridStateManager stateManager; diff --git a/test/src/ui/cells/pluto_date_cell_test.mocks.dart b/test/src/ui/cells/pluto_date_cell_test.mocks.dart deleted file mode 100644 index 9225c3199..000000000 --- a/test/src/ui/cells/pluto_date_cell_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/cells/pluto_date_cell_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} diff --git a/test/src/ui/cells/pluto_default_cell_test.dart b/test/src/ui/cells/pluto_default_cell_test.dart index 60d720c39..886a98a48 100644 --- a/test/src/ui/cells/pluto_default_cell_test.dart +++ b/test/src/ui/cells/pluto_default_cell_test.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; @@ -10,15 +9,8 @@ import '../../../helper/pluto_widget_test_helper.dart'; import '../../../helper/row_helper.dart'; import '../../../helper/test_helper_util.dart'; import '../../../matcher/pluto_object_matcher.dart'; -import 'pluto_default_cell_test.mocks.dart'; - -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) +import '../../../mock/shared_mocks.mocks.dart'; + void main() { late MockPlutoGridStateManager stateManager; late MockPlutoGridScrollController scroll; @@ -61,6 +53,8 @@ void main() { when(horizontalScrollController.offset).thenReturn(0); when(verticalScrollController.offset).thenReturn(0); when(stateManager.isCurrentCell(any)).thenReturn(false); + when(stateManager.enabledRowGroups).thenReturn(false); + when(stateManager.rowGroupDelegate).thenReturn(null); }); group('기본 셀 테스트', () { diff --git a/test/src/ui/cells/pluto_default_cell_test.mocks.dart b/test/src/ui/cells/pluto_default_cell_test.mocks.dart deleted file mode 100644 index c93165bbf..000000000 --- a/test/src/ui/cells/pluto_default_cell_test.mocks.dart +++ /dev/null @@ -1,1462 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/cells/pluto_default_cell_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i6; -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -class _FakePlutoGridStateManager_14 extends _i1.Fake - implements _i3.PlutoGridStateManager {} - -class _FakeStreamSubscription_15 extends _i1.Fake - implements _i6.StreamSubscription {} - -class _FakeScrollController_16 extends _i1.Fake - implements _i4.ScrollController {} - -class _FakeScrollPosition_17 extends _i1.Fake implements _i4.ScrollPosition {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} - -/// A class which mocks [PlutoGridEventManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridEventManager extends _i1.Mock - implements _i3.PlutoGridEventManager { - @override - _i3.PlutoGridStateManager get stateManager => - (super.noSuchMethod(Invocation.getter(#stateManager), - returnValue: _FakePlutoGridStateManager_14()) - as _i3.PlutoGridStateManager); - @override - _i2.PublishSubject<_i3.PlutoGridEvent> get subject => - (super.noSuchMethod(Invocation.getter(#subject), - returnValue: _FakePublishSubject_0<_i3.PlutoGridEvent>()) - as _i2.PublishSubject<_i3.PlutoGridEvent>); - @override - _i6.StreamSubscription get subscription => - (super.noSuchMethod(Invocation.getter(#subscription), - returnValue: _FakeStreamSubscription_15()) - as _i6.StreamSubscription); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); - @override - void addEvent(_i3.PlutoGridEvent? event) => - super.noSuchMethod(Invocation.method(#addEvent, [event]), - returnValueForMissingStub: null); - @override - _i6.StreamSubscription<_i3.PlutoGridEvent> listener( - void Function(_i3.PlutoGridEvent)? onData) => - (super.noSuchMethod(Invocation.method(#listener, [onData]), - returnValue: _FakeStreamSubscription_15<_i3.PlutoGridEvent>()) - as _i6.StreamSubscription<_i3.PlutoGridEvent>); -} - -/// A class which mocks [PlutoGridScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridScrollController extends _i1.Mock - implements _i3.PlutoGridScrollController { - @override - set vertical(_i3.LinkedScrollControllerGroup? _vertical) => - super.noSuchMethod(Invocation.setter(#vertical, _vertical), - returnValueForMissingStub: null); - @override - set horizontal(_i3.LinkedScrollControllerGroup? _horizontal) => - super.noSuchMethod(Invocation.setter(#horizontal, _horizontal), - returnValueForMissingStub: null); - @override - double get maxScrollHorizontal => - (super.noSuchMethod(Invocation.getter(#maxScrollHorizontal), - returnValue: 0.0) as double); - @override - double get maxScrollVertical => (super - .noSuchMethod(Invocation.getter(#maxScrollVertical), returnValue: 0.0) - as double); - @override - double get verticalOffset => - (super.noSuchMethod(Invocation.getter(#verticalOffset), returnValue: 0.0) - as double); - @override - double get horizontalOffset => (super - .noSuchMethod(Invocation.getter(#horizontalOffset), returnValue: 0.0) - as double); - @override - void setBodyRowsHorizontal(_i4.ScrollController? scrollController) => - super.noSuchMethod( - Invocation.method(#setBodyRowsHorizontal, [scrollController]), - returnValueForMissingStub: null); - @override - void setBodyRowsVertical(_i4.ScrollController? scrollController) => super - .noSuchMethod(Invocation.method(#setBodyRowsVertical, [scrollController]), - returnValueForMissingStub: null); -} - -/// A class which mocks [LinkedScrollControllerGroup]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockLinkedScrollControllerGroup extends _i1.Mock - implements _i3.LinkedScrollControllerGroup { - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - _i4.ScrollController addAndGet() => - (super.noSuchMethod(Invocation.method(#addAndGet, []), - returnValue: _FakeScrollController_16()) as _i4.ScrollController); - @override - void addOffsetChangedListener(_i5.VoidCallback? onChanged) => super - .noSuchMethod(Invocation.method(#addOffsetChangedListener, [onChanged]), - returnValueForMissingStub: null); - @override - void removeOffsetChangedListener(_i5.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#removeOffsetChangedListener, [listener]), - returnValueForMissingStub: null); - @override - _i6.Future animateTo(double? offset, - {_i4.Curve? curve, Duration? duration}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#curve: curve, #duration: duration}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void resetScroll() => super.noSuchMethod(Invocation.method(#resetScroll, []), - returnValueForMissingStub: null); - @override - void applyViewportDimension(double? value) => - super.noSuchMethod(Invocation.method(#applyViewportDimension, [value]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [ScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScrollController extends _i1.Mock implements _i4.ScrollController { - @override - bool get keepScrollOffset => - (super.noSuchMethod(Invocation.getter(#keepScrollOffset), - returnValue: false) as bool); - @override - double get initialScrollOffset => - (super.noSuchMethod(Invocation.getter(#initialScrollOffset), - returnValue: 0.0) as double); - @override - Iterable<_i4.ScrollPosition> get positions => - (super.noSuchMethod(Invocation.getter(#positions), - returnValue: <_i4.ScrollPosition>[]) as Iterable<_i4.ScrollPosition>); - @override - bool get hasClients => - (super.noSuchMethod(Invocation.getter(#hasClients), returnValue: false) - as bool); - @override - _i4.ScrollPosition get position => - (super.noSuchMethod(Invocation.getter(#position), - returnValue: _FakeScrollPosition_17()) as _i4.ScrollPosition); - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future animateTo(double? offset, - {Duration? duration, _i4.Curve? curve}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#duration: duration, #curve: curve}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void attach(_i4.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#attach, [position]), - returnValueForMissingStub: null); - @override - void detach(_i4.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#detach, [position]), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i4.ScrollPosition createScrollPosition(_i4.ScrollPhysics? physics, - _i4.ScrollContext? context, _i4.ScrollPosition? oldPosition) => - (super.noSuchMethod( - Invocation.method( - #createScrollPosition, [physics, context, oldPosition]), - returnValue: _FakeScrollPosition_17()) as _i4.ScrollPosition); - @override - void debugFillDescription(List? description) => super.noSuchMethod( - Invocation.method(#debugFillDescription, [description]), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} diff --git a/test/src/ui/cells/pluto_number_cell_test.dart b/test/src/ui/cells/pluto_number_cell_test.dart index e25ee6c65..c50aee5e2 100644 --- a/test/src/ui/cells/pluto_number_cell_test.dart +++ b/test/src/ui/cells/pluto_number_cell_test.dart @@ -1,17 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:intl/intl.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; import '../../../helper/pluto_widget_test_helper.dart'; -import 'pluto_number_cell_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { group('PlutoNumberCell', () { late PlutoGridStateManager stateManager; diff --git a/test/src/ui/cells/pluto_number_cell_test.mocks.dart b/test/src/ui/cells/pluto_number_cell_test.mocks.dart deleted file mode 100644 index 65358d988..000000000 --- a/test/src/ui/cells/pluto_number_cell_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/cells/pluto_number_cell_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} diff --git a/test/src/ui/cells/pluto_select_cell_test.dart b/test/src/ui/cells/pluto_select_cell_test.dart index 43116f1fc..9ddf3d826 100644 --- a/test/src/ui/cells/pluto_select_cell_test.dart +++ b/test/src/ui/cells/pluto_select_cell_test.dart @@ -1,20 +1,16 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; import '../../../helper/pluto_widget_test_helper.dart'; import '../../../helper/row_helper.dart'; -import 'pluto_select_cell_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; const selectItems = ['a', 'b', 'c']; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { late MockPlutoGridStateManager stateManager; diff --git a/test/src/ui/cells/pluto_select_cell_test.mocks.dart b/test/src/ui/cells/pluto_select_cell_test.mocks.dart deleted file mode 100644 index 16aa59467..000000000 --- a/test/src/ui/cells/pluto_select_cell_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/cells/pluto_select_cell_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} diff --git a/test/src/ui/cells/pluto_text_cell_test.dart b/test/src/ui/cells/pluto_text_cell_test.dart index 35fbad1f7..330a94e3e 100644 --- a/test/src/ui/cells/pluto_text_cell_test.dart +++ b/test/src/ui/cells/pluto_text_cell_test.dart @@ -1,18 +1,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; -import 'pluto_text_cell_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks( - [], - customMocks: [ - MockSpec(returnNullOnMissingStub: true), - ], -) void main() { late PlutoGridStateManager stateManager; diff --git a/test/src/ui/cells/pluto_text_cell_test.mocks.dart b/test/src/ui/cells/pluto_text_cell_test.mocks.dart deleted file mode 100644 index 213eb980c..000000000 --- a/test/src/ui/cells/pluto_text_cell_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/cells/pluto_text_cell_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} diff --git a/test/src/ui/cells/pluto_time_cell_test.dart b/test/src/ui/cells/pluto_time_cell_test.dart index eb1f9c480..1a51eba2b 100644 --- a/test/src/ui/cells/pluto_time_cell_test.dart +++ b/test/src/ui/cells/pluto_time_cell_test.dart @@ -1,21 +1,14 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; import '../../../helper/pluto_widget_test_helper.dart'; import '../../../helper/row_helper.dart'; -import 'pluto_time_cell_test.mocks.dart'; - -@GenerateMocks( - [], - customMocks: [ - MockSpec(returnNullOnMissingStub: true), - ], -) +import '../../../mock/shared_mocks.mocks.dart'; + void main() { late MockPlutoGridStateManager stateManager; diff --git a/test/src/ui/cells/pluto_time_cell_test.mocks.dart b/test/src/ui/cells/pluto_time_cell_test.mocks.dart deleted file mode 100644 index 9747860b3..000000000 --- a/test/src/ui/cells/pluto_time_cell_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/cells/pluto_time_cell_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} diff --git a/test/src/ui/columns/pluto_column_filter_test.dart b/test/src/ui/columns/pluto_column_filter_test.dart index 165c15cc5..587b45948 100644 --- a/test/src/ui/columns/pluto_column_filter_test.dart +++ b/test/src/ui/columns/pluto_column_filter_test.dart @@ -1,21 +1,13 @@ -import 'dart:async'; - import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; import 'package:rxdart/rxdart.dart'; import '../../../matcher/pluto_object_matcher.dart'; -import 'pluto_column_filter_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) void main() { late MockPlutoGridStateManager stateManager; late PublishSubject subject; diff --git a/test/src/ui/columns/pluto_column_filter_test.mocks.dart b/test/src/ui/columns/pluto_column_filter_test.mocks.dart deleted file mode 100644 index 60acc5a2f..000000000 --- a/test/src/ui/columns/pluto_column_filter_test.mocks.dart +++ /dev/null @@ -1,1330 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/columns/pluto_column_filter_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i6; -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -class _FakePlutoGridStateManager_14 extends _i1.Fake - implements _i3.PlutoGridStateManager {} - -class _FakeStreamSubscription_15 extends _i1.Fake - implements _i6.StreamSubscription {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} - -/// A class which mocks [PlutoGridEventManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridEventManager extends _i1.Mock - implements _i3.PlutoGridEventManager { - @override - _i3.PlutoGridStateManager get stateManager => - (super.noSuchMethod(Invocation.getter(#stateManager), - returnValue: _FakePlutoGridStateManager_14()) - as _i3.PlutoGridStateManager); - @override - _i2.PublishSubject<_i3.PlutoGridEvent> get subject => - (super.noSuchMethod(Invocation.getter(#subject), - returnValue: _FakePublishSubject_0<_i3.PlutoGridEvent>()) - as _i2.PublishSubject<_i3.PlutoGridEvent>); - @override - _i6.StreamSubscription get subscription => - (super.noSuchMethod(Invocation.getter(#subscription), - returnValue: _FakeStreamSubscription_15()) - as _i6.StreamSubscription); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); - @override - void addEvent(_i3.PlutoGridEvent? event) => - super.noSuchMethod(Invocation.method(#addEvent, [event]), - returnValueForMissingStub: null); - @override - _i6.StreamSubscription<_i3.PlutoGridEvent> listener( - void Function(_i3.PlutoGridEvent)? onData) => - (super.noSuchMethod(Invocation.method(#listener, [onData]), - returnValue: _FakeStreamSubscription_15<_i3.PlutoGridEvent>()) - as _i6.StreamSubscription<_i3.PlutoGridEvent>); -} - -/// A class which mocks [StreamSubscription]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockStreamSubscription extends _i1.Mock - implements _i6.StreamSubscription { - @override - bool get isPaused => - (super.noSuchMethod(Invocation.getter(#isPaused), returnValue: false) - as bool); - @override - _i6.Future cancel() => - (super.noSuchMethod(Invocation.method(#cancel, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void onData(void Function(T)? handleData) => - super.noSuchMethod(Invocation.method(#onData, [handleData]), - returnValueForMissingStub: null); - @override - void onError(Function? handleError) => - super.noSuchMethod(Invocation.method(#onError, [handleError]), - returnValueForMissingStub: null); - @override - void onDone(void Function()? handleDone) => - super.noSuchMethod(Invocation.method(#onDone, [handleDone]), - returnValueForMissingStub: null); - @override - void pause([_i6.Future? resumeSignal]) => - super.noSuchMethod(Invocation.method(#pause, [resumeSignal]), - returnValueForMissingStub: null); - @override - void resume() => super.noSuchMethod(Invocation.method(#resume, []), - returnValueForMissingStub: null); - @override - _i6.Future asFuture([E? futureValue]) => - (super.noSuchMethod(Invocation.method(#asFuture, [futureValue]), - returnValue: Future.value(null)) as _i6.Future); -} diff --git a/test/src/ui/columns/pluto_column_title_test.dart b/test/src/ui/columns/pluto_column_title_test.dart index f84757850..4348e84dd 100644 --- a/test/src/ui/columns/pluto_column_title_test.dart +++ b/test/src/ui/columns/pluto_column_title_test.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; @@ -8,14 +7,8 @@ import 'package:rxdart/rxdart.dart'; import '../../../helper/pluto_widget_test_helper.dart'; import '../../../helper/test_helper_util.dart'; -import 'pluto_column_title_test.mocks.dart'; - -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) +import '../../../mock/shared_mocks.mocks.dart'; + void main() { late MockPlutoGridStateManager stateManager; late MockPlutoGridScrollController scroll; @@ -36,7 +29,7 @@ void main() { when(stateManager.configuration).thenReturn(configuration); when(stateManager.columnMenuDelegate).thenReturn( - const PlutoDefaultColumnMenuDelegate(), + const PlutoColumnMenuDelegateDefault(), ); when(stateManager.style).thenReturn(configuration.style); when(stateManager.eventManager).thenReturn(eventManager); diff --git a/test/src/ui/columns/pluto_column_title_test.mocks.dart b/test/src/ui/columns/pluto_column_title_test.mocks.dart deleted file mode 100644 index 96e3c2e12..000000000 --- a/test/src/ui/columns/pluto_column_title_test.mocks.dart +++ /dev/null @@ -1,1418 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/columns/pluto_column_title_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i6; -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -class _FakeScrollController_14 extends _i1.Fake - implements _i4.ScrollController {} - -class _FakeScrollPosition_15 extends _i1.Fake implements _i4.ScrollPosition {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} - -/// A class which mocks [PlutoGridScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridScrollController extends _i1.Mock - implements _i3.PlutoGridScrollController { - @override - set vertical(_i3.LinkedScrollControllerGroup? _vertical) => - super.noSuchMethod(Invocation.setter(#vertical, _vertical), - returnValueForMissingStub: null); - @override - set horizontal(_i3.LinkedScrollControllerGroup? _horizontal) => - super.noSuchMethod(Invocation.setter(#horizontal, _horizontal), - returnValueForMissingStub: null); - @override - double get maxScrollHorizontal => - (super.noSuchMethod(Invocation.getter(#maxScrollHorizontal), - returnValue: 0.0) as double); - @override - double get maxScrollVertical => (super - .noSuchMethod(Invocation.getter(#maxScrollVertical), returnValue: 0.0) - as double); - @override - double get verticalOffset => - (super.noSuchMethod(Invocation.getter(#verticalOffset), returnValue: 0.0) - as double); - @override - double get horizontalOffset => (super - .noSuchMethod(Invocation.getter(#horizontalOffset), returnValue: 0.0) - as double); - @override - void setBodyRowsHorizontal(_i4.ScrollController? scrollController) => - super.noSuchMethod( - Invocation.method(#setBodyRowsHorizontal, [scrollController]), - returnValueForMissingStub: null); - @override - void setBodyRowsVertical(_i4.ScrollController? scrollController) => super - .noSuchMethod(Invocation.method(#setBodyRowsVertical, [scrollController]), - returnValueForMissingStub: null); -} - -/// A class which mocks [LinkedScrollControllerGroup]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockLinkedScrollControllerGroup extends _i1.Mock - implements _i3.LinkedScrollControllerGroup { - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - _i4.ScrollController addAndGet() => - (super.noSuchMethod(Invocation.method(#addAndGet, []), - returnValue: _FakeScrollController_14()) as _i4.ScrollController); - @override - void addOffsetChangedListener(_i5.VoidCallback? onChanged) => super - .noSuchMethod(Invocation.method(#addOffsetChangedListener, [onChanged]), - returnValueForMissingStub: null); - @override - void removeOffsetChangedListener(_i5.VoidCallback? listener) => super - .noSuchMethod(Invocation.method(#removeOffsetChangedListener, [listener]), - returnValueForMissingStub: null); - @override - _i6.Future animateTo(double? offset, - {_i4.Curve? curve, Duration? duration}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#curve: curve, #duration: duration}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void resetScroll() => super.noSuchMethod(Invocation.method(#resetScroll, []), - returnValueForMissingStub: null); - @override - void applyViewportDimension(double? value) => - super.noSuchMethod(Invocation.method(#applyViewportDimension, [value]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [ScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScrollController extends _i1.Mock implements _i4.ScrollController { - @override - bool get keepScrollOffset => - (super.noSuchMethod(Invocation.getter(#keepScrollOffset), - returnValue: false) as bool); - @override - double get initialScrollOffset => - (super.noSuchMethod(Invocation.getter(#initialScrollOffset), - returnValue: 0.0) as double); - @override - Iterable<_i4.ScrollPosition> get positions => - (super.noSuchMethod(Invocation.getter(#positions), - returnValue: <_i4.ScrollPosition>[]) as Iterable<_i4.ScrollPosition>); - @override - bool get hasClients => - (super.noSuchMethod(Invocation.getter(#hasClients), returnValue: false) - as bool); - @override - _i4.ScrollPosition get position => - (super.noSuchMethod(Invocation.getter(#position), - returnValue: _FakeScrollPosition_15()) as _i4.ScrollPosition); - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i6.Future animateTo(double? offset, - {Duration? duration, _i4.Curve? curve}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#duration: duration, #curve: curve}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void attach(_i4.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#attach, [position]), - returnValueForMissingStub: null); - @override - void detach(_i4.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#detach, [position]), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i4.ScrollPosition createScrollPosition(_i4.ScrollPhysics? physics, - _i4.ScrollContext? context, _i4.ScrollPosition? oldPosition) => - (super.noSuchMethod( - Invocation.method( - #createScrollPosition, [physics, context, oldPosition]), - returnValue: _FakeScrollPosition_15()) as _i4.ScrollPosition); - @override - void debugFillDescription(List? description) => super.noSuchMethod( - Invocation.method(#debugFillDescription, [description]), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} diff --git a/test/src/ui/miscellaneous/pluto_visibility_layout_test.dart b/test/src/ui/miscellaneous/pluto_visibility_layout_test.dart index a1c0f9f5e..5572269a3 100644 --- a/test/src/ui/miscellaneous/pluto_visibility_layout_test.dart +++ b/test/src/ui/miscellaneous/pluto_visibility_layout_test.dart @@ -1,10 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/src/ui/miscellaneous/pluto_visibility_layout.dart'; -import 'pluto_visibility_layout_test.mocks.dart'; +import '../../../mock/shared_mocks.mocks.dart'; const double childHeight = 50; const double defaultChildWidth = 200; @@ -100,10 +99,6 @@ class _TestDelegate extends MultiChildLayoutDelegate { } } -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) void main() { late MultiChildLayoutDelegate delegate; diff --git a/test/src/ui/miscellaneous/pluto_visibility_layout_test.mocks.dart b/test/src/ui/miscellaneous/pluto_visibility_layout_test.mocks.dart deleted file mode 100644 index 211a5b123..000000000 --- a/test/src/ui/miscellaneous/pluto_visibility_layout_test.mocks.dart +++ /dev/null @@ -1,407 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/miscellaneous/pluto_visibility_layout_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i9; -import 'dart:ui' as _i11; - -import 'package:flutter/animation.dart' as _i10; -import 'package:flutter/foundation.dart' as _i5; -import 'package:flutter/gestures.dart' as _i6; -import 'package:flutter/rendering.dart' as _i12; -import 'package:flutter/src/widgets/framework.dart' as _i13; -import 'package:flutter/src/widgets/scroll_activity.dart' as _i14; -import 'package:flutter/src/widgets/scroll_context.dart' as _i4; -import 'package:flutter/src/widgets/scroll_controller.dart' as _i8; -import 'package:flutter/src/widgets/scroll_metrics.dart' as _i7; -import 'package:flutter/src/widgets/scroll_physics.dart' as _i3; -import 'package:flutter/src/widgets/scroll_position.dart' as _i2; -import 'package:mockito/mockito.dart' as _i1; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakeScrollPosition_0 extends _i1.Fake implements _i2.ScrollPosition {} - -class _FakeScrollPhysics_1 extends _i1.Fake implements _i3.ScrollPhysics {} - -class _FakeScrollContext_2 extends _i1.Fake implements _i4.ScrollContext {} - -class _FakeValueNotifier_3 extends _i1.Fake implements _i5.ValueNotifier { -} - -class _FakeScrollHoldController_4 extends _i1.Fake - implements _i2.ScrollHoldController {} - -class _FakeDrag_5 extends _i1.Fake implements _i6.Drag {} - -class _FakeScrollMetrics_6 extends _i1.Fake implements _i7.ScrollMetrics {} - -/// A class which mocks [ScrollController]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScrollController extends _i1.Mock implements _i8.ScrollController { - @override - bool get keepScrollOffset => - (super.noSuchMethod(Invocation.getter(#keepScrollOffset), - returnValue: false) as bool); - @override - double get initialScrollOffset => - (super.noSuchMethod(Invocation.getter(#initialScrollOffset), - returnValue: 0.0) as double); - @override - Iterable<_i2.ScrollPosition> get positions => - (super.noSuchMethod(Invocation.getter(#positions), - returnValue: <_i2.ScrollPosition>[]) as Iterable<_i2.ScrollPosition>); - @override - bool get hasClients => - (super.noSuchMethod(Invocation.getter(#hasClients), returnValue: false) - as bool); - @override - _i2.ScrollPosition get position => - (super.noSuchMethod(Invocation.getter(#position), - returnValue: _FakeScrollPosition_0()) as _i2.ScrollPosition); - @override - double get offset => - (super.noSuchMethod(Invocation.getter(#offset), returnValue: 0.0) - as double); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i9.Future animateTo(double? offset, - {Duration? duration, _i10.Curve? curve}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [offset], {#duration: duration, #curve: curve}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void attach(_i2.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#attach, [position]), - returnValueForMissingStub: null); - @override - void detach(_i2.ScrollPosition? position) => - super.noSuchMethod(Invocation.method(#detach, [position]), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - _i2.ScrollPosition createScrollPosition(_i3.ScrollPhysics? physics, - _i4.ScrollContext? context, _i2.ScrollPosition? oldPosition) => - (super.noSuchMethod( - Invocation.method( - #createScrollPosition, [physics, context, oldPosition]), - returnValue: _FakeScrollPosition_0()) as _i2.ScrollPosition); - @override - void debugFillDescription(List? description) => super.noSuchMethod( - Invocation.method(#debugFillDescription, [description]), - returnValueForMissingStub: null); - @override - void addListener(_i11.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i11.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); -} - -/// A class which mocks [ScrollPosition]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScrollPosition extends _i1.Mock implements _i2.ScrollPosition { - @override - _i3.ScrollPhysics get physics => - (super.noSuchMethod(Invocation.getter(#physics), - returnValue: _FakeScrollPhysics_1()) as _i3.ScrollPhysics); - @override - _i4.ScrollContext get context => - (super.noSuchMethod(Invocation.getter(#context), - returnValue: _FakeScrollContext_2()) as _i4.ScrollContext); - @override - bool get keepScrollOffset => - (super.noSuchMethod(Invocation.getter(#keepScrollOffset), - returnValue: false) as bool); - @override - _i5.ValueNotifier get isScrollingNotifier => (super.noSuchMethod( - Invocation.getter(#isScrollingNotifier), - returnValue: _FakeValueNotifier_3()) as _i5.ValueNotifier); - @override - double get minScrollExtent => - (super.noSuchMethod(Invocation.getter(#minScrollExtent), returnValue: 0.0) - as double); - @override - double get maxScrollExtent => - (super.noSuchMethod(Invocation.getter(#maxScrollExtent), returnValue: 0.0) - as double); - @override - bool get hasContentDimensions => - (super.noSuchMethod(Invocation.getter(#hasContentDimensions), - returnValue: false) as bool); - @override - double get pixels => - (super.noSuchMethod(Invocation.getter(#pixels), returnValue: 0.0) - as double); - @override - bool get hasPixels => - (super.noSuchMethod(Invocation.getter(#hasPixels), returnValue: false) - as bool); - @override - double get viewportDimension => (super - .noSuchMethod(Invocation.getter(#viewportDimension), returnValue: 0.0) - as double); - @override - bool get hasViewportDimension => - (super.noSuchMethod(Invocation.getter(#hasViewportDimension), - returnValue: false) as bool); - @override - bool get haveDimensions => (super - .noSuchMethod(Invocation.getter(#haveDimensions), returnValue: false) - as bool); - @override - bool get allowImplicitScrolling => - (super.noSuchMethod(Invocation.getter(#allowImplicitScrolling), - returnValue: false) as bool); - @override - _i12.ScrollDirection get userScrollDirection => - (super.noSuchMethod(Invocation.getter(#userScrollDirection), - returnValue: _i12.ScrollDirection.idle) as _i12.ScrollDirection); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - _i12.AxisDirection get axisDirection => - (super.noSuchMethod(Invocation.getter(#axisDirection), - returnValue: _i12.AxisDirection.up) as _i12.AxisDirection); - @override - _i12.Axis get axis => (super.noSuchMethod(Invocation.getter(#axis), - returnValue: _i12.Axis.horizontal) as _i12.Axis); - @override - bool get outOfRange => - (super.noSuchMethod(Invocation.getter(#outOfRange), returnValue: false) - as bool); - @override - bool get atEdge => - (super.noSuchMethod(Invocation.getter(#atEdge), returnValue: false) - as bool); - @override - double get extentBefore => - (super.noSuchMethod(Invocation.getter(#extentBefore), returnValue: 0.0) - as double); - @override - double get extentInside => - (super.noSuchMethod(Invocation.getter(#extentInside), returnValue: 0.0) - as double); - @override - double get extentAfter => - (super.noSuchMethod(Invocation.getter(#extentAfter), returnValue: 0.0) - as double); - @override - void absorb(_i2.ScrollPosition? other) => - super.noSuchMethod(Invocation.method(#absorb, [other]), - returnValueForMissingStub: null); - @override - double setPixels(double? newPixels) => - (super.noSuchMethod(Invocation.method(#setPixels, [newPixels]), - returnValue: 0.0) as double); - @override - void correctPixels(double? value) => - super.noSuchMethod(Invocation.method(#correctPixels, [value]), - returnValueForMissingStub: null); - @override - void correctBy(double? correction) => - super.noSuchMethod(Invocation.method(#correctBy, [correction]), - returnValueForMissingStub: null); - @override - void forcePixels(double? value) => - super.noSuchMethod(Invocation.method(#forcePixels, [value]), - returnValueForMissingStub: null); - @override - void saveScrollOffset() => - super.noSuchMethod(Invocation.method(#saveScrollOffset, []), - returnValueForMissingStub: null); - @override - void restoreScrollOffset() => - super.noSuchMethod(Invocation.method(#restoreScrollOffset, []), - returnValueForMissingStub: null); - @override - void restoreOffset(double? offset, {bool? initialRestore = false}) => - super.noSuchMethod( - Invocation.method( - #restoreOffset, [offset], {#initialRestore: initialRestore}), - returnValueForMissingStub: null); - @override - void saveOffset() => super.noSuchMethod(Invocation.method(#saveOffset, []), - returnValueForMissingStub: null); - @override - double applyBoundaryConditions(double? value) => - (super.noSuchMethod(Invocation.method(#applyBoundaryConditions, [value]), - returnValue: 0.0) as double); - @override - bool applyViewportDimension(double? viewportDimension) => (super.noSuchMethod( - Invocation.method(#applyViewportDimension, [viewportDimension]), - returnValue: false) as bool); - @override - bool applyContentDimensions( - double? minScrollExtent, double? maxScrollExtent) => - (super.noSuchMethod( - Invocation.method( - #applyContentDimensions, [minScrollExtent, maxScrollExtent]), - returnValue: false) as bool); - @override - bool correctForNewDimensions( - _i7.ScrollMetrics? oldPosition, _i7.ScrollMetrics? newPosition) => - (super.noSuchMethod( - Invocation.method( - #correctForNewDimensions, [oldPosition, newPosition]), - returnValue: false) as bool); - @override - void applyNewDimensions() => - super.noSuchMethod(Invocation.method(#applyNewDimensions, []), - returnValueForMissingStub: null); - @override - _i9.Future ensureVisible(_i13.RenderObject? object, - {double? alignment = 0.0, - Duration? duration = Duration.zero, - _i10.Curve? curve = _i10.Curves.ease, - _i2.ScrollPositionAlignmentPolicy? alignmentPolicy = - _i2.ScrollPositionAlignmentPolicy.explicit, - _i13.RenderObject? targetRenderObject}) => - (super.noSuchMethod( - Invocation.method(#ensureVisible, [ - object - ], { - #alignment: alignment, - #duration: duration, - #curve: curve, - #alignmentPolicy: alignmentPolicy, - #targetRenderObject: targetRenderObject - }), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); - @override - _i9.Future animateTo(double? to, - {Duration? duration, _i10.Curve? curve}) => - (super.noSuchMethod( - Invocation.method( - #animateTo, [to], {#duration: duration, #curve: curve}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); - @override - void jumpTo(double? value) => - super.noSuchMethod(Invocation.method(#jumpTo, [value]), - returnValueForMissingStub: null); - @override - void pointerScroll(double? delta) => - super.noSuchMethod(Invocation.method(#pointerScroll, [delta]), - returnValueForMissingStub: null); - @override - _i9.Future moveTo(double? to, - {Duration? duration, _i10.Curve? curve, bool? clamp = true}) => - (super.noSuchMethod( - Invocation.method(#moveTo, [to], - {#duration: duration, #curve: curve, #clamp: clamp}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i9.Future); - @override - void jumpToWithoutSettling(double? value) => - super.noSuchMethod(Invocation.method(#jumpToWithoutSettling, [value]), - returnValueForMissingStub: null); - @override - _i2.ScrollHoldController hold(_i11.VoidCallback? holdCancelCallback) => - (super.noSuchMethod(Invocation.method(#hold, [holdCancelCallback]), - returnValue: _FakeScrollHoldController_4()) - as _i2.ScrollHoldController); - @override - _i6.Drag drag(_i6.DragStartDetails? details, - _i11.VoidCallback? dragCancelCallback) => - (super.noSuchMethod( - Invocation.method(#drag, [details, dragCancelCallback]), - returnValue: _FakeDrag_5()) as _i6.Drag); - @override - void beginActivity(_i14.ScrollActivity? newActivity) => - super.noSuchMethod(Invocation.method(#beginActivity, [newActivity]), - returnValueForMissingStub: null); - @override - void didStartScroll() => - super.noSuchMethod(Invocation.method(#didStartScroll, []), - returnValueForMissingStub: null); - @override - void didUpdateScrollPositionBy(double? delta) => - super.noSuchMethod(Invocation.method(#didUpdateScrollPositionBy, [delta]), - returnValueForMissingStub: null); - @override - void didEndScroll() => - super.noSuchMethod(Invocation.method(#didEndScroll, []), - returnValueForMissingStub: null); - @override - void didOverscrollBy(double? value) => - super.noSuchMethod(Invocation.method(#didOverscrollBy, [value]), - returnValueForMissingStub: null); - @override - void didUpdateScrollDirection(_i12.ScrollDirection? direction) => super - .noSuchMethod(Invocation.method(#didUpdateScrollDirection, [direction]), - returnValueForMissingStub: null); - @override - void didUpdateScrollMetrics() => - super.noSuchMethod(Invocation.method(#didUpdateScrollMetrics, []), - returnValueForMissingStub: null); - @override - bool recommendDeferredLoading(_i13.BuildContext? context) => (super - .noSuchMethod(Invocation.method(#recommendDeferredLoading, [context]), - returnValue: false) as bool); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void debugFillDescription(List? description) => super.noSuchMethod( - Invocation.method(#debugFillDescription, [description]), - returnValueForMissingStub: null); - @override - void addListener(_i11.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i11.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - _i7.ScrollMetrics copyWith( - {double? minScrollExtent, - double? maxScrollExtent, - double? pixels, - double? viewportDimension, - _i12.AxisDirection? axisDirection}) => - (super.noSuchMethod( - Invocation.method(#copyWith, [], { - #minScrollExtent: minScrollExtent, - #maxScrollExtent: maxScrollExtent, - #pixels: pixels, - #viewportDimension: viewportDimension, - #axisDirection: axisDirection - }), - returnValue: _FakeScrollMetrics_6()) as _i7.ScrollMetrics); -} diff --git a/test/src/ui/pluto_base_cell_test.dart b/test/src/ui/pluto_base_cell_test.dart index 7564a75a3..4e5838b1b 100644 --- a/test/src/ui/pluto_base_cell_test.dart +++ b/test/src/ui/pluto_base_cell_test.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; @@ -9,12 +8,8 @@ import 'package:rxdart/rxdart.dart'; import '../../helper/pluto_widget_test_helper.dart'; import '../../helper/row_helper.dart'; import '../../matcher/pluto_object_matcher.dart'; -import 'pluto_base_cell_test.mocks.dart'; +import '../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), - MockSpec(returnNullOnMissingStub: true), -]) void main() { late MockPlutoGridStateManager stateManager; MockPlutoGridEventManager? eventManager; @@ -51,6 +46,8 @@ void main() { when(stateManager.selectingMode).thenReturn(PlutoGridSelectingMode.cell); when(stateManager.canRowDrag).thenReturn(true); when(stateManager.isSelectedCell(any, any, any)).thenReturn(false); + when(stateManager.enabledRowGroups).thenReturn(false); + when(stateManager.rowGroupDelegate).thenReturn(null); }); Widget buildApp({ diff --git a/test/src/ui/pluto_base_cell_test.mocks.dart b/test/src/ui/pluto_base_cell_test.mocks.dart deleted file mode 100644 index 7013f5dbf..000000000 --- a/test/src/ui/pluto_base_cell_test.mocks.dart +++ /dev/null @@ -1,1291 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/pluto_base_cell_test.dart. -// Do not manually edit this file. - -import 'dart:async' as _i6; -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -class _FakePlutoGridStateManager_14 extends _i1.Fake - implements _i3.PlutoGridStateManager {} - -class _FakeStreamSubscription_15 extends _i1.Fake - implements _i6.StreamSubscription {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} - -/// A class which mocks [PlutoGridEventManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridEventManager extends _i1.Mock - implements _i3.PlutoGridEventManager { - @override - _i3.PlutoGridStateManager get stateManager => - (super.noSuchMethod(Invocation.getter(#stateManager), - returnValue: _FakePlutoGridStateManager_14()) - as _i3.PlutoGridStateManager); - @override - _i2.PublishSubject<_i3.PlutoGridEvent> get subject => - (super.noSuchMethod(Invocation.getter(#subject), - returnValue: _FakePublishSubject_0<_i3.PlutoGridEvent>()) - as _i2.PublishSubject<_i3.PlutoGridEvent>); - @override - _i6.StreamSubscription get subscription => - (super.noSuchMethod(Invocation.getter(#subscription), - returnValue: _FakeStreamSubscription_15()) - as _i6.StreamSubscription); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void init() => super.noSuchMethod(Invocation.method(#init, []), - returnValueForMissingStub: null); - @override - void addEvent(_i3.PlutoGridEvent? event) => - super.noSuchMethod(Invocation.method(#addEvent, [event]), - returnValueForMissingStub: null); - @override - _i6.StreamSubscription<_i3.PlutoGridEvent> listener( - void Function(_i3.PlutoGridEvent)? onData) => - (super.noSuchMethod(Invocation.method(#listener, [onData]), - returnValue: _FakeStreamSubscription_15<_i3.PlutoGridEvent>()) - as _i6.StreamSubscription<_i3.PlutoGridEvent>); -} diff --git a/test/src/ui/pluto_base_column_footer_test.dart b/test/src/ui/pluto_base_column_footer_test.dart index e031d3224..038e270d3 100644 --- a/test/src/ui/pluto_base_column_footer_test.dart +++ b/test/src/ui/pluto_base_column_footer_test.dart @@ -1,15 +1,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/pluto_base_column_footer.dart'; -import 'pluto_base_column_footer_test.mocks.dart'; +import '../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { late MockPlutoGridStateManager stateManager; diff --git a/test/src/ui/pluto_base_column_footer_test.mocks.dart b/test/src/ui/pluto_base_column_footer_test.mocks.dart deleted file mode 100644 index ee4222a1e..000000000 --- a/test/src/ui/pluto_base_column_footer_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/pluto_base_column_footer_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} diff --git a/test/src/ui/pluto_base_column_group_test.dart b/test/src/ui/pluto_base_column_group_test.dart index e5304e370..2fddc5f0c 100644 --- a/test/src/ui/pluto_base_column_group_test.dart +++ b/test/src/ui/pluto_base_column_group_test.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; @@ -8,11 +7,8 @@ import 'package:rxdart/rxdart.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; -import 'pluto_base_column_group_test.mocks.dart'; +import '../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { MockPlutoGridStateManager? stateManager; diff --git a/test/src/ui/pluto_base_column_group_test.mocks.dart b/test/src/ui/pluto_base_column_group_test.mocks.dart deleted file mode 100644 index 0ecf7e97a..000000000 --- a/test/src/ui/pluto_base_column_group_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/pluto_base_column_group_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -} diff --git a/test/src/ui/pluto_base_row_test.dart b/test/src/ui/pluto_base_row_test.dart index 7cb2e7fb5..342cb9d4e 100644 --- a/test/src/ui/pluto_base_row_test.dart +++ b/test/src/ui/pluto_base_row_test.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid/src/ui/ui.dart'; @@ -9,11 +8,8 @@ import 'package:rxdart/rxdart.dart'; import '../../helper/column_helper.dart'; import '../../helper/pluto_widget_test_helper.dart'; import '../../helper/row_helper.dart'; -import 'pluto_base_row_test.mocks.dart'; +import '../../mock/shared_mocks.mocks.dart'; -@GenerateMocks([], customMocks: [ - MockSpec(returnNullOnMissingStub: true), -]) void main() { late MockPlutoGridStateManager stateManager; PublishSubject streamNotifier; @@ -38,6 +34,8 @@ void main() { when(stateManager.hasFocus).thenReturn(true); when(stateManager.canRowDrag).thenReturn(true); when(stateManager.showFrozenColumn).thenReturn(false); + when(stateManager.enabledRowGroups).thenReturn(false); + when(stateManager.rowGroupDelegate).thenReturn(null); }); buildRowWidget({ diff --git a/test/src/ui/pluto_base_row_test.mocks.dart b/test/src/ui/pluto_base_row_test.mocks.dart deleted file mode 100644 index 33889aa20..000000000 --- a/test/src/ui/pluto_base_row_test.mocks.dart +++ /dev/null @@ -1,1246 +0,0 @@ -// Mocks generated by Mockito 5.2.0 from annotations -// in pluto_grid/test/src/ui/pluto_base_row_test.dart. -// Do not manually edit this file. - -import 'dart:ui' as _i5; - -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:pluto_grid/pluto_grid.dart' as _i3; -import 'package:rxdart/rxdart.dart' as _i2; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types - -class _FakePublishSubject_0 extends _i1.Fake - implements _i2.PublishSubject {} - -class _FakePlutoGridColumnSizeConfig_1 extends _i1.Fake - implements _i3.PlutoGridColumnSizeConfig {} - -class _FakeFilteredList_2 extends _i1.Fake implements _i3.FilteredList {} - -class _FakePlutoGridConfiguration_3 extends _i1.Fake - implements _i3.PlutoGridConfiguration {} - -class _FakePlutoColumnMenuDelegate_4 extends _i1.Fake - implements _i3.PlutoColumnMenuDelegate {} - -class _FakePlutoGridLocaleText_5 extends _i1.Fake - implements _i3.PlutoGridLocaleText {} - -class _FakePlutoGridStyleConfig_6 extends _i1.Fake - implements _i3.PlutoGridStyleConfig {} - -class _FakePlutoGridKeyPressed_7 extends _i1.Fake - implements _i3.PlutoGridKeyPressed {} - -class _FakeChangeNotifier_8 extends _i1.Fake implements _i4.ChangeNotifier {} - -class _FakeOffset_9 extends _i1.Fake implements _i5.Offset {} - -class _FakePlutoAutoSize_10 extends _i1.Fake implements _i3.PlutoAutoSize {} - -class _FakePlutoResize_11 extends _i1.Fake implements _i3.PlutoResize {} - -class _FakePlutoGridCellPosition_12 extends _i1.Fake - implements _i3.PlutoGridCellPosition {} - -class _FakePlutoRow_13 extends _i1.Fake implements _i3.PlutoRow {} - -/// A class which mocks [PlutoGridStateManager]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockPlutoGridStateManager extends _i1.Mock - implements _i3.PlutoGridStateManager { - @override - _i2.PublishSubject<_i3.PlutoNotifierEvent> get streamNotifier => - (super.noSuchMethod(Invocation.getter(#streamNotifier), - returnValue: _FakePublishSubject_0<_i3.PlutoNotifierEvent>()) - as _i2.PublishSubject<_i3.PlutoNotifierEvent>); - @override - bool get hasListeners => - (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) - as bool); - @override - set refColumnGroups( - _i3.FilteredList<_i3.PlutoColumnGroup>? setColumnGroups) => - super.noSuchMethod(Invocation.setter(#refColumnGroups, setColumnGroups), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroup> get columnGroups => - (super.noSuchMethod(Invocation.getter(#columnGroups), - returnValue: <_i3.PlutoColumnGroup>[]) as List<_i3.PlutoColumnGroup>); - @override - bool get hasColumnGroups => (super - .noSuchMethod(Invocation.getter(#hasColumnGroups), returnValue: false) - as bool); - @override - bool get showColumnGroups => - (super.noSuchMethod(Invocation.getter(#showColumnGroups), - returnValue: false) as bool); - @override - _i3.PlutoGridColumnSizeConfig get columnSizeConfig => - (super.noSuchMethod(Invocation.getter(#columnSizeConfig), - returnValue: _FakePlutoGridColumnSizeConfig_1()) - as _i3.PlutoGridColumnSizeConfig); - @override - _i3.PlutoAutoSizeMode get columnsAutoSizeMode => - (super.noSuchMethod(Invocation.getter(#columnsAutoSizeMode), - returnValue: _i3.PlutoAutoSizeMode.none) as _i3.PlutoAutoSizeMode); - @override - _i3.PlutoResizeMode get columnsResizeMode => - (super.noSuchMethod(Invocation.getter(#columnsResizeMode), - returnValue: _i3.PlutoResizeMode.none) as _i3.PlutoResizeMode); - @override - bool get enableColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#enableColumnsAutoSize), - returnValue: false) as bool); - @override - bool get activatedColumnsAutoSize => - (super.noSuchMethod(Invocation.getter(#activatedColumnsAutoSize), - returnValue: false) as bool); - @override - _i3.FilteredList<_i3.PlutoColumn> get refColumns => - (super.noSuchMethod(Invocation.getter(#refColumns), - returnValue: _FakeFilteredList_2<_i3.PlutoColumn>()) - as _i3.FilteredList<_i3.PlutoColumn>); - @override - set refColumns(_i3.FilteredList<_i3.PlutoColumn>? setColumns) => - super.noSuchMethod(Invocation.setter(#refColumns, setColumns), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumn> get columns => - (super.noSuchMethod(Invocation.getter(#columns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get columnIndexes => (super - .noSuchMethod(Invocation.getter(#columnIndexes), returnValue: []) - as List); - @override - List get columnIndexesForShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesForShowFrozen), - returnValue: []) as List); - @override - double get columnsWidth => - (super.noSuchMethod(Invocation.getter(#columnsWidth), returnValue: 0.0) - as double); - @override - List<_i3.PlutoColumn> get leftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get leftFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnIndexes), - returnValue: []) as List); - @override - double get leftFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#leftFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get rightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get rightFrozenColumnIndexes => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnIndexes), - returnValue: []) as List); - @override - double get rightFrozenColumnsWidth => - (super.noSuchMethod(Invocation.getter(#rightFrozenColumnsWidth), - returnValue: 0.0) as double); - @override - List<_i3.PlutoColumn> get bodyColumns => - (super.noSuchMethod(Invocation.getter(#bodyColumns), - returnValue: <_i3.PlutoColumn>[]) as List<_i3.PlutoColumn>); - @override - List get bodyColumnIndexes => - (super.noSuchMethod(Invocation.getter(#bodyColumnIndexes), - returnValue: []) as List); - @override - double get bodyColumnsWidth => (super - .noSuchMethod(Invocation.getter(#bodyColumnsWidth), returnValue: 0.0) - as double); - @override - bool get hasSortedColumn => (super - .noSuchMethod(Invocation.getter(#hasSortedColumn), returnValue: false) - as bool); - @override - List get columnIndexesByShowFrozen => - (super.noSuchMethod(Invocation.getter(#columnIndexesByShowFrozen), - returnValue: []) as List); - @override - bool get isDraggingRow => - (super.noSuchMethod(Invocation.getter(#isDraggingRow), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get dragRows => - (super.noSuchMethod(Invocation.getter(#dragRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get canRowDrag => - (super.noSuchMethod(Invocation.getter(#canRowDrag), returnValue: false) - as bool); - @override - set textEditingController( - _i4.TextEditingController? _textEditingController) => - super.noSuchMethod( - Invocation.setter(#textEditingController, _textEditingController), - returnValueForMissingStub: null); - @override - bool get isEditing => - (super.noSuchMethod(Invocation.getter(#isEditing), returnValue: false) - as bool); - @override - bool get autoEditing => - (super.noSuchMethod(Invocation.getter(#autoEditing), returnValue: false) - as bool); - @override - List<_i3.PlutoRow> get filterRows => - (super.noSuchMethod(Invocation.getter(#filterRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasFilter => - (super.noSuchMethod(Invocation.getter(#hasFilter), returnValue: false) - as bool); - @override - bool get keepFocus => - (super.noSuchMethod(Invocation.getter(#keepFocus), returnValue: false) - as bool); - @override - bool get hasFocus => - (super.noSuchMethod(Invocation.getter(#hasFocus), returnValue: false) - as bool); - @override - _i3.PlutoGridConfiguration get configuration => - (super.noSuchMethod(Invocation.getter(#configuration), - returnValue: _FakePlutoGridConfiguration_3()) - as _i3.PlutoGridConfiguration); - @override - _i3.PlutoColumnMenuDelegate get columnMenuDelegate => - (super.noSuchMethod(Invocation.getter(#columnMenuDelegate), - returnValue: _FakePlutoColumnMenuDelegate_4()) - as _i3.PlutoColumnMenuDelegate); - @override - _i3.PlutoGridLocaleText get localeText => (super.noSuchMethod( - Invocation.getter(#localeText), - returnValue: _FakePlutoGridLocaleText_5()) as _i3.PlutoGridLocaleText); - @override - _i3.PlutoGridStyleConfig get style => (super.noSuchMethod( - Invocation.getter(#style), - returnValue: _FakePlutoGridStyleConfig_6()) as _i3.PlutoGridStyleConfig); - @override - _i3.PlutoGridKeyPressed get keyPressed => (super.noSuchMethod( - Invocation.getter(#keyPressed), - returnValue: _FakePlutoGridKeyPressed_7()) as _i3.PlutoGridKeyPressed); - @override - _i4.ChangeNotifier get resizingChangeNotifier => - (super.noSuchMethod(Invocation.getter(#resizingChangeNotifier), - returnValue: _FakeChangeNotifier_8()) as _i4.ChangeNotifier); - @override - double get headerHeight => - (super.noSuchMethod(Invocation.getter(#headerHeight), returnValue: 0.0) - as double); - @override - double get footerHeight => - (super.noSuchMethod(Invocation.getter(#footerHeight), returnValue: 0.0) - as double); - @override - double get columnRowContainerHeight => - (super.noSuchMethod(Invocation.getter(#columnRowContainerHeight), - returnValue: 0.0) as double); - @override - double get rowContainerHeight => - (super.noSuchMethod(Invocation.getter(#rowContainerHeight), - returnValue: 0.0) as double); - @override - bool get showFrozenColumn => - (super.noSuchMethod(Invocation.getter(#showFrozenColumn), - returnValue: false) as bool); - @override - bool get showColumnTitle => (super - .noSuchMethod(Invocation.getter(#showColumnTitle), returnValue: false) - as bool); - @override - bool get showColumnFooter => - (super.noSuchMethod(Invocation.getter(#showColumnFooter), - returnValue: false) as bool); - @override - bool get showColumnFilter => - (super.noSuchMethod(Invocation.getter(#showColumnFilter), - returnValue: false) as bool); - @override - bool get showHeader => - (super.noSuchMethod(Invocation.getter(#showHeader), returnValue: false) - as bool); - @override - bool get showFooter => - (super.noSuchMethod(Invocation.getter(#showFooter), returnValue: false) - as bool); - @override - bool get showLoading => - (super.noSuchMethod(Invocation.getter(#showLoading), returnValue: false) - as bool); - @override - bool get hasLeftFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasLeftFrozenColumns), - returnValue: false) as bool); - @override - bool get hasRightFrozenColumns => - (super.noSuchMethod(Invocation.getter(#hasRightFrozenColumns), - returnValue: false) as bool); - @override - double get headerBottomOffset => - (super.noSuchMethod(Invocation.getter(#headerBottomOffset), - returnValue: 0.0) as double); - @override - double get footerTopOffset => - (super.noSuchMethod(Invocation.getter(#footerTopOffset), returnValue: 0.0) - as double); - @override - double get columnHeight => - (super.noSuchMethod(Invocation.getter(#columnHeight), returnValue: 0.0) - as double); - @override - double get columnFooterHeight => - (super.noSuchMethod(Invocation.getter(#columnFooterHeight), - returnValue: 0.0) as double); - @override - double get columnGroupHeight => (super - .noSuchMethod(Invocation.getter(#columnGroupHeight), returnValue: 0.0) - as double); - @override - double get columnFilterHeight => - (super.noSuchMethod(Invocation.getter(#columnFilterHeight), - returnValue: 0.0) as double); - @override - double get columnBottomOffset => - (super.noSuchMethod(Invocation.getter(#columnBottomOffset), - returnValue: 0.0) as double); - @override - double get rowsTopOffset => - (super.noSuchMethod(Invocation.getter(#rowsTopOffset), returnValue: 0.0) - as double); - @override - double get rowHeight => - (super.noSuchMethod(Invocation.getter(#rowHeight), returnValue: 0.0) - as double); - @override - double get rowTotalHeight => - (super.noSuchMethod(Invocation.getter(#rowTotalHeight), returnValue: 0.0) - as double); - @override - double get bodyTopOffset => - (super.noSuchMethod(Invocation.getter(#bodyTopOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftOffset), returnValue: 0.0) - as double); - @override - double get bodyRightOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightOffset), returnValue: 0.0) - as double); - @override - double get bodyLeftScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyLeftScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyRightScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyRightScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyUpScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyUpScrollOffset), - returnValue: 0.0) as double); - @override - double get bodyDownScrollOffset => - (super.noSuchMethod(Invocation.getter(#bodyDownScrollOffset), - returnValue: 0.0) as double); - @override - double get leftFrozenRightOffset => - (super.noSuchMethod(Invocation.getter(#leftFrozenRightOffset), - returnValue: 0.0) as double); - @override - double get rightFrozenLeftOffset => - (super.noSuchMethod(Invocation.getter(#rightFrozenLeftOffset), - returnValue: 0.0) as double); - @override - double get rightBlankOffset => (super - .noSuchMethod(Invocation.getter(#rightBlankOffset), returnValue: 0.0) - as double); - @override - double get scrollOffsetByFrozenColumn => - (super.noSuchMethod(Invocation.getter(#scrollOffsetByFrozenColumn), - returnValue: 0.0) as double); - @override - _i5.TextDirection get textDirection => - (super.noSuchMethod(Invocation.getter(#textDirection), - returnValue: _i5.TextDirection.rtl) as _i5.TextDirection); - @override - bool get isLTR => - (super.noSuchMethod(Invocation.getter(#isLTR), returnValue: false) - as bool); - @override - bool get isRTL => - (super.noSuchMethod(Invocation.getter(#isRTL), returnValue: false) - as bool); - @override - int get page => - (super.noSuchMethod(Invocation.getter(#page), returnValue: 0) as int); - @override - int get pageSize => - (super.noSuchMethod(Invocation.getter(#pageSize), returnValue: 0) as int); - @override - int get totalPage => - (super.noSuchMethod(Invocation.getter(#totalPage), returnValue: 0) - as int); - @override - bool get isPaginated => - (super.noSuchMethod(Invocation.getter(#isPaginated), returnValue: false) - as bool); - @override - _i3.FilteredList<_i3.PlutoRow> get refRows => - (super.noSuchMethod(Invocation.getter(#refRows), - returnValue: _FakeFilteredList_2<_i3.PlutoRow>()) - as _i3.FilteredList<_i3.PlutoRow>); - @override - set refRows(_i3.FilteredList<_i3.PlutoRow>? setRows) => - super.noSuchMethod(Invocation.setter(#refRows, setRows), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> get rows => (super.noSuchMethod(Invocation.getter(#rows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get checkedRows => - (super.noSuchMethod(Invocation.getter(#checkedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> get unCheckedRows => - (super.noSuchMethod(Invocation.getter(#unCheckedRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool get hasCheckedRow => - (super.noSuchMethod(Invocation.getter(#hasCheckedRow), returnValue: false) - as bool); - @override - bool get hasUnCheckedRow => (super - .noSuchMethod(Invocation.getter(#hasUnCheckedRow), returnValue: false) - as bool); - @override - bool get isHorizontalOverScrolled => - (super.noSuchMethod(Invocation.getter(#isHorizontalOverScrolled), - returnValue: false) as bool); - @override - double get correctHorizontalOffset => - (super.noSuchMethod(Invocation.getter(#correctHorizontalOffset), - returnValue: 0.0) as double); - @override - _i5.Offset get directionalScrollEdgeOffset => - (super.noSuchMethod(Invocation.getter(#directionalScrollEdgeOffset), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - bool get isSelecting => - (super.noSuchMethod(Invocation.getter(#isSelecting), returnValue: false) - as bool); - @override - _i3.PlutoGridSelectingMode get selectingMode => - (super.noSuchMethod(Invocation.getter(#selectingMode), - returnValue: _i3.PlutoGridSelectingMode.cell) - as _i3.PlutoGridSelectingMode); - @override - List<_i3.PlutoGridSelectingCellPosition> get currentSelectingPositionList => - (super.noSuchMethod(Invocation.getter(#currentSelectingPositionList), - returnValue: <_i3.PlutoGridSelectingCellPosition>[]) - as List<_i3.PlutoGridSelectingCellPosition>); - @override - bool get hasCurrentSelectingPosition => - (super.noSuchMethod(Invocation.getter(#hasCurrentSelectingPosition), - returnValue: false) as bool); - @override - List<_i3.PlutoRow> get currentSelectingRows => - (super.noSuchMethod(Invocation.getter(#currentSelectingRows), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - String get currentSelectingText => - (super.noSuchMethod(Invocation.getter(#currentSelectingText), - returnValue: '') as String); - @override - set headerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#headerHeight, value), - returnValueForMissingStub: null); - @override - set footerHeight(double? value) => - super.noSuchMethod(Invocation.setter(#footerHeight, value), - returnValueForMissingStub: null); - @override - set columnFooterHeight(double? value) => - super.noSuchMethod(Invocation.setter(#columnFooterHeight, value), - returnValueForMissingStub: null); - @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); - @override - void notifyListeners() => - super.noSuchMethod(Invocation.method(#notifyListeners, []), - returnValueForMissingStub: null); - @override - void notifyListenersOnPostFrame() => - super.noSuchMethod(Invocation.method(#notifyListenersOnPostFrame, []), - returnValueForMissingStub: null); - @override - void addListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#addListener, [listener]), - returnValueForMissingStub: null); - @override - void removeListener(_i5.VoidCallback? listener) => - super.noSuchMethod(Invocation.method(#removeListener, [listener]), - returnValueForMissingStub: null); - @override - void setCurrentCellPosition(_i3.PlutoGridCellPosition? cellPosition, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentCellPosition, [cellPosition], {#notify: notify}), - returnValueForMissingStub: null); - @override - void updateCurrentCellPosition({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#updateCurrentCellPosition, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? columnIdxByCellKeyAndRowIdx(_i4.Key? cellKey, int? rowIdx) => - (super.noSuchMethod(Invocation.method( - #columnIdxByCellKeyAndRowIdx, [cellKey, rowIdx])) as int?); - @override - void clearCurrentCell({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentCell, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentCell(_i3.PlutoCell? cell, int? rowIdx, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentCell, [cell, rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool canMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canNotMoveCell(_i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#canNotMoveCell, [cellPosition, direction]), - returnValue: false) as bool); - @override - bool canChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - bool canNotChangeCellValue( - {_i3.PlutoColumn? column, - _i3.PlutoRow? row, - dynamic newValue, - dynamic oldValue}) => - (super.noSuchMethod( - Invocation.method(#canNotChangeCellValue, [], { - #column: column, - #row: row, - #newValue: newValue, - #oldValue: oldValue - }), - returnValue: false) as bool); - @override - dynamic filteredCellValue( - {_i3.PlutoColumn? column, dynamic newValue, dynamic oldValue}) => - super.noSuchMethod(Invocation.method(#filteredCellValue, [], - {#column: column, #newValue: newValue, #oldValue: oldValue})); - @override - bool isCurrentCell(_i3.PlutoCell? cell) => - (super.noSuchMethod(Invocation.method(#isCurrentCell, [cell]), - returnValue: false) as bool); - @override - bool isInvalidCellPosition(_i3.PlutoGridCellPosition? cellPosition) => (super - .noSuchMethod(Invocation.method(#isInvalidCellPosition, [cellPosition]), - returnValue: false) as bool); - @override - void setShowColumnGroups(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnGroups, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - List<_i3.PlutoColumnGroupPair> separateLinkedGroup( - {List<_i3.PlutoColumnGroup>? columnGroupList, - List<_i3.PlutoColumn>? columns}) => - (super.noSuchMethod( - Invocation.method(#separateLinkedGroup, [], - {#columnGroupList: columnGroupList, #columns: columns}), - returnValue: <_i3.PlutoColumnGroupPair>[]) - as List<_i3.PlutoColumnGroupPair>); - @override - int columnGroupDepth(List<_i3.PlutoColumnGroup>? columnGroupList) => (super - .noSuchMethod(Invocation.method(#columnGroupDepth, [columnGroupList]), - returnValue: 0) as int); - @override - void removeColumnsInColumnGroup(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInColumnGroup, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void activateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#activateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - void deactivateColumnsAutoSize() => - super.noSuchMethod(Invocation.method(#deactivateColumnsAutoSize, []), - returnValueForMissingStub: null); - @override - _i3.PlutoAutoSize getColumnsAutoSizeHelper( - {Iterable<_i3.PlutoColumn>? columns, double? maxWidth}) => - (super.noSuchMethod( - Invocation.method(#getColumnsAutoSizeHelper, [], - {#columns: columns, #maxWidth: maxWidth}), - returnValue: _FakePlutoAutoSize_10()) as _i3.PlutoAutoSize); - @override - _i3.PlutoResize getColumnsResizeHelper( - {List<_i3.PlutoColumn>? columns, - _i3.PlutoColumn? column, - double? offset}) => - (super.noSuchMethod( - Invocation.method(#getColumnsResizeHelper, [], - {#columns: columns, #column: column, #offset: offset}), - returnValue: _FakePlutoResize_11()) - as _i3.PlutoResize); - @override - void setColumnSizeConfig(_i3.PlutoGridColumnSizeConfig? config) => - super.noSuchMethod(Invocation.method(#setColumnSizeConfig, [config]), - returnValueForMissingStub: null); - @override - void toggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - super.noSuchMethod( - Invocation.method(#toggleFrozenColumn, [column, frozen]), - returnValueForMissingStub: null); - @override - void toggleSortColumn(_i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#toggleSortColumn, [column]), - returnValueForMissingStub: null); - @override - int? columnIndex(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#columnIndex, [column])) as int?); - @override - void insertColumns(int? columnIdx, List<_i3.PlutoColumn>? columns) => super - .noSuchMethod(Invocation.method(#insertColumns, [columnIdx, columns]), - returnValueForMissingStub: null); - @override - void removeColumns(List<_i3.PlutoColumn>? columns) => - super.noSuchMethod(Invocation.method(#removeColumns, [columns]), - returnValueForMissingStub: null); - @override - void moveColumn({_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - super.noSuchMethod( - Invocation.method( - #moveColumn, [], {#column: column, #targetColumn: targetColumn}), - returnValueForMissingStub: null); - @override - void resizeColumn(_i3.PlutoColumn? column, double? offset) => - super.noSuchMethod(Invocation.method(#resizeColumn, [column, offset]), - returnValueForMissingStub: null); - @override - void autoFitColumn(_i4.BuildContext? context, _i3.PlutoColumn? column) => - super.noSuchMethod(Invocation.method(#autoFitColumn, [context, column]), - returnValueForMissingStub: null); - @override - void hideColumn(_i3.PlutoColumn? column, bool? hide, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumn, [column, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void hideColumns(List<_i3.PlutoColumn>? columns, bool? hide, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#hideColumns, [columns, hide], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortAscending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortAscending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortDescending(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortDescending, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void sortBySortIdx(_i3.PlutoColumn? column, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#sortBySortIdx, [column], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showSetColumnsPopup(_i4.BuildContext? context) => - super.noSuchMethod(Invocation.method(#showSetColumnsPopup, [context]), - returnValueForMissingStub: null); - @override - bool limitResizeColumn(_i3.PlutoColumn? column, double? offset) => (super - .noSuchMethod(Invocation.method(#limitResizeColumn, [column, offset]), - returnValue: false) as bool); - @override - bool limitMoveColumn( - {_i3.PlutoColumn? column, _i3.PlutoColumn? targetColumn}) => - (super.noSuchMethod( - Invocation.method(#limitMoveColumn, [], - {#column: column, #targetColumn: targetColumn}), - returnValue: false) as bool); - @override - bool limitToggleFrozenColumn( - _i3.PlutoColumn? column, _i3.PlutoColumnFrozen? frozen) => - (super.noSuchMethod( - Invocation.method(#limitToggleFrozenColumn, [column, frozen]), - returnValue: false) as bool); - @override - bool limitHideColumn(_i3.PlutoColumn? column, bool? hide, - {double? accumulateWidth = 0.0}) => - (super.noSuchMethod( - Invocation.method(#limitHideColumn, [column, hide], - {#accumulateWidth: accumulateWidth}), - returnValue: false) as bool); - @override - void setIsDraggingRow(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setIsDraggingRow, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#setDragRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setDragTargetRowIdx(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setDragTargetRowIdx, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isRowIdxDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxTopDragTarget(int? rowIdx) => - (super.noSuchMethod(Invocation.method(#isRowIdxTopDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowIdxBottomDragTarget(int? rowIdx) => (super.noSuchMethod( - Invocation.method(#isRowIdxBottomDragTarget, [rowIdx]), - returnValue: false) as bool); - @override - bool isRowBeingDragged(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isRowBeingDragged, [rowKey]), - returnValue: false) as bool); - @override - void setEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAutoEditing(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setAutoEditing, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleEditing({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#toggleEditing, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void pasteCellValue(List>? textList) => - super.noSuchMethod(Invocation.method(#pasteCellValue, [textList]), - returnValueForMissingStub: null); - @override - dynamic castValueByColumnType(dynamic value, _i3.PlutoColumn? column) => super - .noSuchMethod(Invocation.method(#castValueByColumnType, [value, column])); - @override - void changeCellValue(_i3.PlutoCell? cell, dynamic value, - {bool? callOnChangedEvent = true, - bool? force = false, - bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#changeCellValue, [ - cell, - value - ], { - #callOnChangedEvent: callOnChangedEvent, - #force: force, - #notify: notify - }), - returnValueForMissingStub: null); - @override - void setFilter(_i3.FilteredListFilter<_i3.PlutoRow>? filter, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setFilter, [filter], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterWithFilterRows(List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setFilterWithFilterRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setFilterRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#setFilterRows, [rows]), - returnValueForMissingStub: null); - @override - List<_i3.PlutoRow> filterRowsByField(String? columnField) => - (super.noSuchMethod(Invocation.method(#filterRowsByField, [columnField]), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - bool isFilteredColumn(_i3.PlutoColumn? column) => - (super.noSuchMethod(Invocation.method(#isFilteredColumn, [column]), - returnValue: false) as bool); - @override - void removeColumnsInFilterRows(List<_i3.PlutoColumn>? columns, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #removeColumnsInFilterRows, [columns], {#notify: notify}), - returnValueForMissingStub: null); - @override - void showFilterPopup(_i4.BuildContext? context, - {_i3.PlutoColumn? calledColumn}) => - super.noSuchMethod( - Invocation.method( - #showFilterPopup, [context], {#calledColumn: calledColumn}), - returnValueForMissingStub: null); - @override - void setGridFocusNode(_i4.FocusNode? focusNode) => - super.noSuchMethod(Invocation.method(#setGridFocusNode, [focusNode]), - returnValueForMissingStub: null); - @override - void setKeepFocus(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setKeepFocus, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void nextFocusOfColumnFilter(_i3.PlutoColumn? column, - {bool? reversed = false}) => - super.noSuchMethod( - Invocation.method( - #nextFocusOfColumnFilter, [column], {#reversed: reversed}), - returnValueForMissingStub: null); - @override - void setGridKey(_i4.GlobalKey<_i4.State<_i4.StatefulWidget>>? key) => - super.noSuchMethod(Invocation.method(#setGridKey, [key]), - returnValueForMissingStub: null); - @override - void setKeyManager(_i3.PlutoGridKeyManager? keyManager) => - super.noSuchMethod(Invocation.method(#setKeyManager, [keyManager]), - returnValueForMissingStub: null); - @override - void setEventManager(_i3.PlutoGridEventManager? eventManager) => - super.noSuchMethod(Invocation.method(#setEventManager, [eventManager]), - returnValueForMissingStub: null); - @override - void setGridMode(_i3.PlutoGridMode? mode) => - super.noSuchMethod(Invocation.method(#setGridMode, [mode]), - returnValueForMissingStub: null); - @override - void setOnChanged(_i3.PlutoOnChangedEventCallback? onChanged) => - super.noSuchMethod(Invocation.method(#setOnChanged, [onChanged]), - returnValueForMissingStub: null); - @override - void setColumnMenuDelegate( - _i3.PlutoColumnMenuDelegate? columnMenuDelegate) => - super.noSuchMethod( - Invocation.method(#setColumnMenuDelegate, [columnMenuDelegate]), - returnValueForMissingStub: null); - @override - void setCreateHeader(_i3.CreateHeaderCallBack? createHeader) => - super.noSuchMethod(Invocation.method(#setCreateHeader, [createHeader]), - returnValueForMissingStub: null); - @override - void setCreateFooter(_i3.CreateFooterCallBack? createFooter) => - super.noSuchMethod(Invocation.method(#setCreateFooter, [createFooter]), - returnValueForMissingStub: null); - @override - void setOnSelected(_i3.PlutoOnSelectedEventCallback? onSelected) => - super.noSuchMethod(Invocation.method(#setOnSelected, [onSelected]), - returnValueForMissingStub: null); - @override - void setOnSorted(_i3.PlutoOnSortedEventCallback? onSorted) => - super.noSuchMethod(Invocation.method(#setOnSorted, [onSorted]), - returnValueForMissingStub: null); - @override - void setOnRowChecked(_i3.PlutoOnRowCheckedEventCallback? onRowChecked) => - super.noSuchMethod(Invocation.method(#setOnRowChecked, [onRowChecked]), - returnValueForMissingStub: null); - @override - void setOnRowDoubleTap( - _i3.PlutoOnRowDoubleTapEventCallback? onRowDoubleTap) => - super.noSuchMethod( - Invocation.method(#setOnRowDoubleTap, [onRowDoubleTap]), - returnValueForMissingStub: null); - @override - void setOnRowSecondaryTap( - _i3.PlutoOnRowSecondaryTapEventCallback? onRowSecondaryTap) => - super.noSuchMethod( - Invocation.method(#setOnRowSecondaryTap, [onRowSecondaryTap]), - returnValueForMissingStub: null); - @override - void setOnRowsMoved(_i3.PlutoOnRowsMovedEventCallback? onRowsMoved) => - super.noSuchMethod(Invocation.method(#setOnRowsMoved, [onRowsMoved]), - returnValueForMissingStub: null); - @override - void setConfiguration(_i3.PlutoGridConfiguration? configuration, - {bool? updateLocale = true, bool? applyColumnFilter = true}) => - super.noSuchMethod( - Invocation.method(#setConfiguration, [ - configuration - ], { - #updateLocale: updateLocale, - #applyColumnFilter: applyColumnFilter - }), - returnValueForMissingStub: null); - @override - void resetCurrentState({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#resetCurrentState, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void handleOnSelected() => - super.noSuchMethod(Invocation.method(#handleOnSelected, []), - returnValueForMissingStub: null); - @override - void forceUpdate() => super.noSuchMethod(Invocation.method(#forceUpdate, []), - returnValueForMissingStub: null); - @override - _i3.PlutoGridCellPosition cellPositionToMove( - _i3.PlutoGridCellPosition? cellPosition, - _i3.PlutoMoveDirection? direction) => - (super.noSuchMethod( - Invocation.method(#cellPositionToMove, [cellPosition, direction]), - returnValue: _FakePlutoGridCellPosition_12()) - as _i3.PlutoGridCellPosition); - @override - void moveCurrentCell(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCell, [direction], {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveCurrentCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveCurrentCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveCurrentCellByRowIdx, [rowIdx, direction], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCell(_i3.PlutoMoveDirection? direction) => - super.noSuchMethod(Invocation.method(#moveSelectingCell, [direction]), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfColumns(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfColumns, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellToEdgeOfRows(_i3.PlutoMoveDirection? direction, - {bool? force = false, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellToEdgeOfRows, [direction], - {#force: force, #notify: notify}), - returnValueForMissingStub: null); - @override - void moveSelectingCellByRowIdx(int? rowIdx, _i3.PlutoMoveDirection? direction, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#moveSelectingCellByRowIdx, [rowIdx, direction], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setLayout(_i4.BoxConstraints? size) => - super.noSuchMethod(Invocation.method(#setLayout, [size]), - returnValueForMissingStub: null); - @override - void setShowColumnTitle(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnTitle, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFooter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFooter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowColumnFilter(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setShowColumnFilter, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setShowLoading(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setShowLoading, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetShowFrozenColumn() => - super.noSuchMethod(Invocation.method(#resetShowFrozenColumn, []), - returnValueForMissingStub: null); - @override - bool shouldShowFrozenColumns(double? width) => - (super.noSuchMethod(Invocation.method(#shouldShowFrozenColumns, [width]), - returnValue: false) as bool); - @override - bool enoughFrozenColumnsWidth(double? width) => - (super.noSuchMethod(Invocation.method(#enoughFrozenColumnsWidth, [width]), - returnValue: false) as bool); - @override - void notifyResizingListeners() => - super.noSuchMethod(Invocation.method(#notifyResizingListeners, []), - returnValueForMissingStub: null); - @override - void setTextDirection(_i5.TextDirection? textDirection) => - super.noSuchMethod(Invocation.method(#setTextDirection, [textDirection]), - returnValueForMissingStub: null); - @override - void setGridGlobalOffset(_i5.Offset? offset) => - super.noSuchMethod(Invocation.method(#setGridGlobalOffset, [offset]), - returnValueForMissingStub: null); - @override - void setPageSize(int? pageSize, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setPageSize, [pageSize], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setPage(int? page, {bool? notify = true}) => - super.noSuchMethod(Invocation.method(#setPage, [page], {#notify: notify}), - returnValueForMissingStub: null); - @override - void resetPage({bool? notify = true}) => - super.noSuchMethod(Invocation.method(#resetPage, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - int? getRowIdxByOffset(double? offset) => - (super.noSuchMethod(Invocation.method(#getRowIdxByOffset, [offset])) - as int?); - @override - _i3.PlutoRow getNewRow() => - (super.noSuchMethod(Invocation.method(#getNewRow, []), - returnValue: _FakePlutoRow_13()) as _i3.PlutoRow); - @override - List<_i3.PlutoRow> getNewRows({int? count = 1}) => - (super.noSuchMethod(Invocation.method(#getNewRows, [], {#count: count}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - List<_i3.PlutoRow> setSortIdxOfRows(List<_i3.PlutoRow>? rows, - {bool? increase = true, int? start = 0}) => - (super.noSuchMethod( - Invocation.method( - #setSortIdxOfRows, [rows], {#increase: increase, #start: start}), - returnValue: <_i3.PlutoRow>[]) as List<_i3.PlutoRow>); - @override - void setRowChecked(_i3.PlutoRow? row, bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setRowChecked, [row, flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void insertRows(int? rowIdx, List<_i3.PlutoRow>? rows, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#insertRows, [rowIdx, rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void prependNewRows({int? count = 1}) => super.noSuchMethod( - Invocation.method(#prependNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void prependRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#prependRows, [rows]), - returnValueForMissingStub: null); - @override - void appendNewRows({int? count = 1}) => - super.noSuchMethod(Invocation.method(#appendNewRows, [], {#count: count}), - returnValueForMissingStub: null); - @override - void appendRows(List<_i3.PlutoRow>? rows) => - super.noSuchMethod(Invocation.method(#appendRows, [rows]), - returnValueForMissingStub: null); - @override - void removeCurrentRow() => - super.noSuchMethod(Invocation.method(#removeCurrentRow, []), - returnValueForMissingStub: null); - @override - void removeRows(List<_i3.PlutoRow>? rows, {bool? notify = true}) => super - .noSuchMethod(Invocation.method(#removeRows, [rows], {#notify: notify}), - returnValueForMissingStub: null); - @override - void removeAllRows({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#removeAllRows, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByOffset(List<_i3.PlutoRow>? rows, double? offset, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByOffset, [rows, offset], {#notify: notify}), - returnValueForMissingStub: null); - @override - void moveRowsByIndex(List<_i3.PlutoRow>? rows, int? indexToMove, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #moveRowsByIndex, [rows, indexToMove], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleAllRowChecked(bool? flag, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleAllRowChecked, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setRowColorCallback(_i3.PlutoRowColorCallback? rowColorCallback) => super - .noSuchMethod(Invocation.method(#setRowColorCallback, [rowColorCallback]), - returnValueForMissingStub: null); - @override - void setScroll(_i3.PlutoGridScrollController? scroll) => - super.noSuchMethod(Invocation.method(#setScroll, [scroll]), - returnValueForMissingStub: null); - @override - _i5.Offset toDirectionalOffset(_i5.Offset? offset) => - (super.noSuchMethod(Invocation.method(#toDirectionalOffset, [offset]), - returnValue: _FakeOffset_9()) as _i5.Offset); - @override - void scrollByDirection(_i3.PlutoMoveDirection? direction, double? offset) => - super.noSuchMethod( - Invocation.method(#scrollByDirection, [direction, offset]), - returnValueForMissingStub: null); - @override - bool canHorizontalCellScrollByDirection( - _i3.PlutoMoveDirection? direction, _i3.PlutoColumn? columnToMove) => - (super.noSuchMethod( - Invocation.method( - #canHorizontalCellScrollByDirection, [direction, columnToMove]), - returnValue: false) as bool); - @override - void moveScrollByRow(_i3.PlutoMoveDirection? direction, int? rowIdx) => super - .noSuchMethod(Invocation.method(#moveScrollByRow, [direction, rowIdx]), - returnValueForMissingStub: null); - @override - void moveScrollByColumn(_i3.PlutoMoveDirection? direction, int? columnIdx) => - super.noSuchMethod( - Invocation.method(#moveScrollByColumn, [direction, columnIdx]), - returnValueForMissingStub: null); - @override - bool needMovingScroll(_i5.Offset? offset, _i3.PlutoMoveDirection? move) => - (super.noSuchMethod(Invocation.method(#needMovingScroll, [offset, move]), - returnValue: false) as bool); - @override - void updateCorrectScrollOffset() => - super.noSuchMethod(Invocation.method(#updateCorrectScrollOffset, []), - returnValueForMissingStub: null); - @override - void updateScrollViewport() => - super.noSuchMethod(Invocation.method(#updateScrollViewport, []), - returnValueForMissingStub: null); - @override - void resetScrollToZero() => - super.noSuchMethod(Invocation.method(#resetScrollToZero, []), - returnValueForMissingStub: null); - @override - void setSelecting(bool? flag, {bool? notify = true}) => super.noSuchMethod( - Invocation.method(#setSelecting, [flag], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setSelectingMode(_i3.PlutoGridSelectingMode? mode, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setSelectingMode, [mode], {#notify: notify}), - returnValueForMissingStub: null); - @override - void setAllCurrentSelecting() => - super.noSuchMethod(Invocation.method(#setAllCurrentSelecting, []), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPosition( - {_i3.PlutoGridCellPosition? cellPosition, bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPosition, [], - {#cellPosition: cellPosition, #notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionByCellKey(_i4.Key? cellKey, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionByCellKey, [cellKey], - {#notify: notify}), - returnValueForMissingStub: null); - @override - void setCurrentSelectingPositionWithOffset(_i5.Offset? offset) => - super.noSuchMethod( - Invocation.method(#setCurrentSelectingPositionWithOffset, [offset]), - returnValueForMissingStub: null); - @override - void setCurrentSelectingRowsByRange(int? from, int? to, - {bool? notify = true}) => - super.noSuchMethod( - Invocation.method( - #setCurrentSelectingRowsByRange, [from, to], {#notify: notify}), - returnValueForMissingStub: null); - @override - void clearCurrentSelecting({bool? notify = true}) => super.noSuchMethod( - Invocation.method(#clearCurrentSelecting, [], {#notify: notify}), - returnValueForMissingStub: null); - @override - void toggleSelectingRow(int? rowIdx, {bool? notify = true}) => - super.noSuchMethod( - Invocation.method(#toggleSelectingRow, [rowIdx], {#notify: notify}), - returnValueForMissingStub: null); - @override - bool isSelectingInteraction() => - (super.noSuchMethod(Invocation.method(#isSelectingInteraction, []), - returnValue: false) as bool); - @override - bool isSelectedRow(_i4.Key? rowKey) => - (super.noSuchMethod(Invocation.method(#isSelectedRow, [rowKey]), - returnValue: false) as bool); - @override - bool isSelectedCell( - _i3.PlutoCell? cell, _i3.PlutoColumn? column, int? rowIdx) => - (super.noSuchMethod( - Invocation.method(#isSelectedCell, [cell, column, rowIdx]), - returnValue: false) as bool); - @override - void handleAfterSelectingRow(_i3.PlutoCell? cell, dynamic value) => super - .noSuchMethod(Invocation.method(#handleAfterSelectingRow, [cell, value]), - returnValueForMissingStub: null); - @override - void updateVisibilityLayout({bool? notify = false}) => super.noSuchMethod( - Invocation.method(#updateVisibilityLayout, [], {#notify: notify}), - returnValueForMissingStub: null); -}