Polina Cherkasova
baf739c8e6
Remove usage of testWidgetsWithLeakTracking. ( #140239 )
2023-12-15 14:13:31 -08:00
Taha Tesser
eba149fcc3
Revert "Update DataTable test when data row is pressed for Material 3 ( #137230 )" ( #137407 )
...
This reverts commit 64f31b2f1a99f394dc4a9f194a93bf8532f35b77.
*Replace this paragraph with a description of what this PR is changing
or adding, and why. Consider including before/after screenshots.*
*List which issues are fixed by this PR. You must list at least one
issue.*
*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*
## Pre-launch Checklist
- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-10-27 12:04:07 +03:00
Taha Tesser
64f31b2f1a
Update DataTable test when data row is pressed for Material 3 ( #137230 )
...
This updates one of them M3 test to use golden test from https://github.com/flutter/flutter/pull/135901
Keeping it consistent with this [update](https://github.com/flutter/flutter/pull/136809#discussion_r1365053630 )
2023-10-27 07:23:26 +00:00
Taha Tesser
9ab091f92b
Update CircleAvatar & DataTable tests for Material 3 ( #135901 )
...
Updated unit tests for `CircleAvatar` & `DataTable` to have M2 and M3 versions.
More info in #127064
2023-10-09 10:05:28 +00:00
Taha Tesser
75797a8a7e
Fix DataTable's headingTextStyle & dataTextStyle are not merged with default text style ( #134138 )
...
fixes [Inconsistent text color on DataTable in different platforms](https://github.com/flutter/flutter/issues/114470 )
### Code sample
<details>
<summary>expand to view the code sample</summary>
```dart
import 'package:flutter/material.dart';
/// Flutter code sample for [DataTable].
void main() => runApp(const DataTableExampleApp());
class DataTableExampleApp extends StatelessWidget {
const DataTableExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
themeMode: ThemeMode.dark,
theme: ThemeData(),
darkTheme: ThemeData.dark(),
home: Scaffold(
appBar: AppBar(title: const Text('DataTable Sample')),
body: const DataTableExample(),
),
);
}
}
class DataTableExample extends StatelessWidget {
const DataTableExample({super.key});
@override
Widget build(BuildContext context) {
return DataTable(
headingTextStyle: const TextStyle(),
dataTextStyle: const TextStyle(),
columns: const <DataColumn>[
DataColumn(
label: Expanded(
child: Text(
'Name',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
),
DataColumn(
label: Expanded(
child: Text(
'Age',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
),
DataColumn(
label: Expanded(
child: Text(
'Role',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
),
],
rows: const <DataRow>[
DataRow(
cells: <DataCell>[
DataCell(Text('Sarah')),
DataCell(Text('19')),
DataCell(Text('Student')),
],
),
DataRow(
cells: <DataCell>[
DataCell(Text('Janine')),
DataCell(Text('43')),
DataCell(Text('Professor')),
],
),
DataRow(
cells: <DataCell>[
DataCell(Text('William')),
DataCell(Text('27')),
DataCell(Text('Associate Professor')),
],
),
],
);
}
}
```
</details>
### Before
| Desktop | Mobile |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/19c3908d-6b6a-4408-9c6b-da83c8efaa4a " /> | <img src="https://github.com/flutter/flutter/assets/48603081/efda08fb-05f9-437e-be5c-6b6861babe19 " width="350" /> |
### After
| Desktop | Mobile |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/6bd3433f-d61f-4f35-8a2a-f7539a74f93e " /> | <img src="https://github.com/flutter/flutter/assets/48603081/5123a79b-6c2a-4bea-9fbc-64ed3e599826 " width="350" /> |
2023-09-07 08:55:53 +00:00
Bernardo Ferrari
b7046b32db
Improve and optimize non-uniform Borders. ( #124417 )
...
~~Using the same priority order as a Border without borderRadius, it is possible to draw them on top of each other. This is better than the current behavior (crash!) and would work well for a "one color on top, another on bottom" scenario.~~
~~With this, if approved, we move the current number of possible exceptions from 4 to 1 (`BoxShape.circle` + `borderRadius`).~~
~~It is kind of odd how `borderRadius.zero` to `borderRadius != BorderRadius.zero` change, but I think it is better than crashing. Alternatively, we just remove the "original function" and see if any goldens are affected.~~
<img width="448" alt="image" src="https://user-images.githubusercontent.com/351125/236550350-7499d758-5b44-40e6-9105-32671eb21998.png ">
Another one for @gspencergoog. If this works, we could make the paint method public and re-use in the InputBorder PR (if that's also approved). Single line fix.
2023-08-17 04:04:23 +00:00
Ian Hickson
ccdf826466
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.
2023-08-15 00:55:07 +00:00
Polina Cherkasova
a7b69b069f
Unpin leak_tracker and handle breaking changes in API. ( #132352 )
2023-08-14 10:05:20 -07:00
Kate Lovett
f054f5aa09
Move mock canvas to flutter_test ( #131631 )
...
Fixes https://github.com/flutter/flutter/issues/59413
This relocates `mock_canvas.dart` and `recording_canvas.dart` from `flutter/test/rendering` to `flutter_test`.
The testing functionality afforded by mock_canvas should be available to everyone, not just the framework. :)
mock_canvas.dart needed a bit of cleanup - things like formatting and super parameters.
2023-08-07 23:43:03 +00:00
Polina Cherkasova
e8b397caca
Setup leak tracking regression for material. ( #130169 )
2023-07-22 06:45:27 -07:00
Qun Cheng
a5f8b64ef9
Update unit tests in material library for Material 3 ( #128725 )
...
Updates most of the unit tests in the packages/flutter/test/material folder so that they'll pass if ThemeData.useMaterial3 defaults to true.
All of the tests have wired useMaterial3 to false and will need to be updated with a M3 version.
related to #127064
2023-06-13 21:21:13 +00:00
Justin McCandless
63e30480cd
Add secondary tap capabilities to TableRowInkWell ( #123036 )
...
Added new parameters onSecondaryTap and onSecondaryTapDown
2023-03-31 09:42:16 -07:00
Bernardo Ferrari
5054b6e514
Add Non-Uniform Border to Border. ( #121921 )
...
Add Non-Uniform Border to Border.
2023-03-24 01:40:56 +00:00
Taha Tesser
f7fb14ec58
Add customizable mouse cursor to DataTable ( #123128 )
2023-03-23 17:45:34 -07:00
David Neuy
3681b27a47
Fix DataCell overflows when cell height is large by adding dataRowMinHeight, dataRowMaxHeight props. ( #114338 )
...
* Fix DataCell overflows when cell height is large by adding dataRowMinHeight, dataRowMaxHeight props.
* Fix DataCell overflows when cell height is large by adding dataRowMinHeight, dataRowMaxHeight props - add tests.
* Fix analysis errors
* Review changes.
* Add asserts for dataRowMinHeight and dataRowMaxHeight
* Add asserts for dataRowMinHeight and dataRowMaxHeight
* Make dataRowHeight a computed getter
* Remove get only dataRowHeight from hashCode...
* Update deprecated after
* Add new line at end of AUTHORS
* Apply suggestions from code review
* Update packages/flutter/test/material/data_table_test.dart
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
2023-02-23 19:32:29 +00:00
Michael Goderbauer
b308555ed1
Enable dangling_library_doc_comments and library_annotations lints ( #117365 )
2022-12-20 16:03:21 -08:00
Greg Spencer
37b72342b0
Add maybeOf for all the cases where of returns nullable. ( #114120 )
2022-10-31 23:09:09 +00:00
Taha Tesser
df259c5881
Add clipBehavior and apply borderRadius to DataTable's Material ( #113205 )
2022-10-25 20:38:11 +00:00
Taha Tesser
d4a9631651
Revert "[DataTable]: Add ability to only select row using checkbox ( #105123 )" ( #105311 )
2022-06-03 07:18:07 -07:00
Taha Tesser
5fe78541b3
[DataTable]: Add ability to only select row using checkbox ( #105123 )
2022-06-03 06:13:07 -07:00
Pierre-Louis
cb9a1d623c
Use curly_braces_in_flow_control_structures for material ( #104499 )
...
* Use `curly_braces_in_flow_control_structures` for `material`
* include test/material
* add back removed comments
2022-05-25 13:17:06 +02:00
Tong Mu
23bc3d64eb
[Mouse] Remove all pointers at the end of tests ( #102694 )
2022-05-19 17:48:10 -07:00
Darren Austin
17e2fce1cf
Add const MaterialStatePropertyAll class. ( #104127 )
2022-05-19 09:35:33 -07:00
xubaolin
ef5a6da35a
Fix a DataTable crash and improve some docs ( #100959 )
2022-04-19 04:19:08 -07:00
Alex Li
543a7e8588
✨ Android Q transition by default ( #100812 )
2022-03-25 22:25:07 -07:00
Zachary Anderson
bfa272ac3e
Revert " ✨ Android Q transition by default ( #98559 )" ( #100799 )
...
This reverts commit c82ddd39e54fed2401e8b89dd82960d6ac9717d3.
2022-03-25 14:54:21 -07:00
Alex Li
c82ddd39e5
✨ Android Q transition by default ( #98559 )
2022-03-25 14:03:21 -07:00
Michael Goderbauer
5684b9f69e
Enable no_leading_underscores_for_local_identifiers ( #96422 )
2022-01-21 14:43:59 -08:00
Markus Aksli
88ded73061
Fix DataTable _SortArrow changing orientation when state is updated ( #94455 )
2022-01-05 14:10:17 -08:00
Will Lockwood
47e3f1a949
Allow Checkboxes in DataTables to inherit colors from CheckboxTheme ( #96007 )
2022-01-04 13:00:11 -08:00
Dheeraj Verma
8880008452
Update Data Table Class with Borders Like Table Widgets ( #36837 ) ( #92670 )
2021-11-01 09:08:05 -07:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint ( #91409 ) ( #91462 )
2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint ( #91409 )" ( #91461 )
...
This reverts commit 5fd259be244244e14ff87fee9b6a721625f952cd.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint ( #91409 )
2021-10-07 20:13:02 -07:00
Bonsai11
6d2d9b2f3c
Adding onLongPress for DataRow ( #87172 )
...
* Adding onLongPress for DataRow
Useful to be able to e.g. start a selection mode of rows or show a drop down menu.
* Test for onLongPress
* Changed parameter
2021-09-21 11:17:08 -07:00
Hans Muller
afe58fbab5
Revert "Reland "Android Q transition by default ( #82670 )" ( #88409 )" ( #88482 )
2021-08-18 20:22:04 -07:00
Alex Li
df399f9a8d
Reland "Android Q transition by default ( #82670 )" ( #88409 )
...
* Reland "Android Q transition by default (#82670 )"
This reverts commit 4053b4b16cbec129f03cd7201ab1b8250bda72e8.
* Fix `overall_experience_test.dart` for flutter_tools
2021-08-18 09:11:27 -07:00
Jenn Magder
4053b4b16c
Revert "Android Q transition by default ( #82670 )" ( #88394 )
...
This reverts commit a1ae4feac518dbce2862760ff5ceb7f3992c8d43.
2021-08-17 17:48:52 -07:00
Alex Li
a1ae4feac5
Android Q transition by default ( #82670 )
2021-08-17 15:47:07 -07:00
Alexandre Ardhuin
fa19b3d3bd
add missing trailing commas ( #81329 )
2021-04-27 17:09:03 -07:00
Chinmoy
430c57eb3f
Modified DataRow to be disabled when onSelectChanged is not set ( #80184 )
...
This change prevents DataRow from being enabled when onSelectChanged is null.
2021-04-20 11:10:48 -07:00
Chinmoy
bb43d2c632
Added checkboxHorizontalMargin to DataTable and PaginatedDataTable ( #71217 )
2021-02-17 15:11:52 -08:00
Rashid-Khabeer
a178bba5d2
Add onLongPress property to DataCell: #72609 ( #75393 )
2021-02-10 16:56:04 -08:00
Jonah Williams
e5000f6cea
[flutter_tools] Remove usage of --precompiled flag for web tests ( #70977 )
2020-12-01 09:54:01 -08:00
Per Classon
8a7fd39b85
[Material] Parent checkbox in DataTable should deselect all, if children checkboxes are disabled or selected ( #67938 )
2020-10-14 08:57:06 -07:00
Per Classon
7668f06ffe
[Material] Use primary color for selected rows and checkboxes in DataTable ( #67919 )
2020-10-12 10:17:03 -07:00
Per Classon
8d80592d46
Add tristate to parent checkbox for DataTable ( #67414 )
...
* Add tristate to parent checkbox for DataTable to follow Material specifications
2020-10-09 16:33:39 +02:00
Per Classon
ee08c2278a
Add decoration parameter to DataTable and DataTableTheme ( #66640 )
...
* Add decoration parameter to DataTable and DataTableTheme
2020-10-09 14:11:17 +02:00
Alexandre Ardhuin
4acc790252
enable lint cast_nullable_to_non_nullable ( #67629 )
2020-10-08 21:05:43 +02:00
Darren Austin
3c21775c94
Migrate Material framework tests to null safety ( #67556 )
...
Migrate Material framework tests to null safety.
2020-10-07 16:44:00 -07:00