PaginatedDataTable improvements (#131374)
- slightly improved assert message when row cell counts don't match column count. - more breadcrumbs in API documentation. more documentation in general. - added more documentation for the direction of the "ascending" arrow. - two samples for PaginatedDataTable. - make PaginatedDataTable support hot reloading across changes to the number of columns. - introduce matrix3MoreOrLessEquals. An earlier version of this PR used it in tests, but eventually it was not needed. The function seems useful to keep though.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_api_samples/material/paginated_data_table/paginated_data_table.0.dart' as example;
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('PaginatedDataTable 0', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(const example.DataTableExampleApp());
|
||||
expect(find.text('Associate Professor'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_api_samples/material/paginated_data_table/paginated_data_table.1.dart' as example;
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('PaginatedDataTable 1', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(const example.DataTableExampleApp());
|
||||
expect(find.text('Strange New Worlds'), findsOneWidget);
|
||||
await tester.tap(find.byIcon(Icons.arrow_upward).at(1));
|
||||
await tester.pump();
|
||||
expect(find.text('Strange New Worlds'), findsNothing);
|
||||
await tester.tap(find.byIcon(Icons.chevron_right));
|
||||
await tester.pump();
|
||||
expect(find.text('Strange New Worlds'), findsOneWidget);
|
||||
await tester.tap(find.byIcon(Icons.arrow_upward).at(1));
|
||||
await tester.pump();
|
||||
expect(find.text('Strange New Worlds'), findsNothing);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user