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:
@@ -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); },
|
||||
),
|
||||
|
||||
@@ -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)}')
|
||||
));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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),
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user