Repository navigation
PaginatedDataTable: arrowHeadColor breaks differentiation between states (enabled/disabled) #160458
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.27Found to occur in 3.27Found to occur in 3.27found in release: 3.28Found to occur in 3.28Found to occur in 3.28frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Steps to reproduce
Put code below in dartpad.
In paginated_data_table.dart Line 530 and following -> Shouldn't the colour be set to the IconButton instead of the Icon?
Expected results
If it is not possible to turn back to the first page, the symbol should be lighter than if it is possible to turn back.
Actual results
The icons for paging have no disabled "state"
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: MyPaginatedTable()));
}
class MyPaginatedTable extends StatelessWidget {
final List<Map<String, dynamic>> _data = List.generate(
50,
(index) => {"id": index + 1, "name": "Item ${index + 1}"},
);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Pagination Test")),
body: PaginatedDataTable(
header: Text('Test Table'),
rowsPerPage: 10,
// arrowHeadColor: Colors.black, // Setzt die aktive Pfeilfarbe
columns: [
DataColumn(label: Text('ID')),
DataColumn(label: Text('Name')),
],
source: _MyDataSource(_data),
),
);
}
}
class _MyDataSource extends DataTableSource {
final List<Map<String, dynamic>> _data;
_MyDataSource(this._data);
@override
DataRow getRow(int index) {
final item = _data[index];
return DataRow.byIndex(
index: index,
cells: [
DataCell(Text(item['id'].toString())),
DataCell(Text(item['name'])),
],
);
}
@override
int get rowCount => _data.length;
@override
bool get isRowCountApproximate => false;
@override
int get selectedRowCount => 0;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.27Found to occur in 3.27Found to occur in 3.27found in release: 3.28Found to occur in 3.28Found to occur in 3.28frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Type
Projects
- StatusShow more project fieldsDone (PR merged)
Activity
[-]arrowHeadColor breaks differentiation between states (enabled/disabled)[/-][+]PaginatedDataTable: arrowHeadColor breaks differentiation between states (enabled/disabled)[/+]danagbemava-nc commentedon Dec 18, 2024
Reproducible on the latest stable & master
Screen.Recording.2024-12-18.at.10.09.00.AM.mov
Screen.Recording.2024-12-18.at.10.09.17.AM.mov
flutter doctor -v
huycozy commentedon Mar 14, 2025
@chrisDK1977 Thanks for filing the issue and also pointing out the LOC causing this. You are correct about setting the color for IconButton.
The button is only enabled when onPressed is not null, and the color logic happens in IconButton widget, not in Color widget, see more at:
flutter/packages/flutter/lib/src/material/icon_button.dart
Line 754 in 8cc303e
flutter/packages/flutter/lib/src/material/icon_button.dart
Line 782 in 8cc303e
Fix arrowHeadColor breaks differentiation between states (#165178)
github-actions commentedon Apr 1, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Fix arrowHeadColor breaks differentiation between states (flutter#165178
Fix arrowHeadColor breaks differentiation between states (#165178)