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