Internationalize time numerals in the time picker and TimeOfDay (#12166)

* internationalize time numerals

* tests

* use foundation.dart instead of meta.dart

* address comments
This commit is contained in:
Yegor
2017-09-22 14:35:25 -07:00
committed by GitHub
parent 441b5c2031
commit f2d096010d
9 changed files with 512 additions and 247 deletions

View File

@@ -101,7 +101,7 @@ class _DateTimePicker extends StatelessWidget {
new Expanded(
flex: 3,
child: new _InputDropdown(
valueText: selectedTime.toString(),
valueText: selectedTime.format(context),
valueStyle: valueStyle,
onPressed: () { _selectTime(context); },
),

View File

@@ -182,7 +182,7 @@ class DialogDemoState extends State<DialogDemo> {
if (value != null && value != _selectedTime) {
_selectedTime = value;
_scaffoldKey.currentState.showSnackBar(new SnackBar(
content: new Text('You selected: $value')
content: new Text('You selected: ${value.format(context)}')
));
}
});

View File

@@ -82,7 +82,7 @@ class DateTimeItem extends StatelessWidget {
},
child: new Row(
children: <Widget>[
new Text('$time'),
new Text('${time.format(context)}'),
const Icon(Icons.arrow_drop_down, color: Colors.black54),
]
)