increase checkbox size and fix header area (#19966)
This commit is contained in:
parent
7e2434c8ff
commit
5819008320
@ -364,13 +364,16 @@ class DataTable extends StatelessWidget {
|
||||
VoidCallback onRowTap,
|
||||
ValueChanged<bool> onCheckboxChanged
|
||||
}) {
|
||||
Widget contents = new Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: _tablePadding, end: _tablePadding / 2.0),
|
||||
child: new Center(
|
||||
child: new Checkbox(
|
||||
activeColor: color,
|
||||
value: checked,
|
||||
onChanged: onCheckboxChanged,
|
||||
Widget contents = new Semantics(
|
||||
container: true,
|
||||
child: new Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: _tablePadding, end: _tablePadding / 2.0),
|
||||
child: new Center(
|
||||
child: new Checkbox(
|
||||
activeColor: color,
|
||||
value: checked,
|
||||
onChanged: onCheckboxChanged,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -380,34 +380,38 @@ class PaginatedDataTableState extends State<PaginatedDataTable> {
|
||||
|
||||
// CARD
|
||||
return new Card(
|
||||
semanticContainer: false,
|
||||
child: new Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>[
|
||||
new DefaultTextStyle(
|
||||
// These typographic styles aren't quite the regular ones. We pick the closest ones from the regular
|
||||
// list and then tweak them appropriately.
|
||||
// See https://material.google.com/components/data-tables.html#data-tables-tables-within-cards
|
||||
style: _selectedRowCount > 0 ? themeData.textTheme.subhead.copyWith(color: themeData.accentColor)
|
||||
: themeData.textTheme.title.copyWith(fontWeight: FontWeight.w400),
|
||||
child: IconTheme.merge(
|
||||
data: const IconThemeData(
|
||||
opacity: 0.54
|
||||
),
|
||||
child: new ButtonTheme.bar(
|
||||
child: new Container(
|
||||
height: 64.0,
|
||||
padding: new EdgeInsetsDirectional.only(start: startPadding, end: 14.0),
|
||||
// TODO(ianh): This decoration will prevent ink splashes from being visible.
|
||||
// Instead, we should have a widget that prints the decoration on the material.
|
||||
// See https://github.com/flutter/flutter/issues/3782
|
||||
color: _selectedRowCount > 0 ? themeData.secondaryHeaderColor : null,
|
||||
child: new Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: headerWidgets
|
||||
new Semantics(
|
||||
container: true,
|
||||
child: new DefaultTextStyle(
|
||||
// These typographic styles aren't quite the regular ones. We pick the closest ones from the regular
|
||||
// list and then tweak them appropriately.
|
||||
// See https://material.google.com/components/data-tables.html#data-tables-tables-within-cards
|
||||
style: _selectedRowCount > 0 ? themeData.textTheme.subhead.copyWith(color: themeData.accentColor)
|
||||
: themeData.textTheme.title.copyWith(fontWeight: FontWeight.w400),
|
||||
child: IconTheme.merge(
|
||||
data: const IconThemeData(
|
||||
opacity: 0.54
|
||||
),
|
||||
child: new ButtonTheme.bar(
|
||||
child: new Container(
|
||||
height: 64.0,
|
||||
padding: new EdgeInsetsDirectional.only(start: startPadding, end: 14.0),
|
||||
// TODO(ianh): This decoration will prevent ink splashes from being visible.
|
||||
// Instead, we should have a widget that prints the decoration on the material.
|
||||
// See https://github.com/flutter/flutter/issues/3782
|
||||
color: _selectedRowCount > 0 ? themeData.secondaryHeaderColor : null,
|
||||
child: new Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: headerWidgets
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
),
|
||||
new SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
|
Loading…
x
Reference in New Issue
Block a user