Unverified Commit 58190083 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

increase checkbox size and fix header area (#19966)

parent 7e2434c8
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment