File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -342,12 +342,26 @@ class _FormBuilderDateTimePickerState
342
342
343
343
Future <TimeOfDay ?> _showTimePicker (
344
344
BuildContext context, DateTime ? currentValue) async {
345
+ var builder = widget.transitionBuilder;
346
+ if (widget.locale != null ) {
347
+ builder = (context, child) {
348
+ var transitionBuilder = widget.transitionBuilder;
349
+ return Localizations .override (
350
+ context: context,
351
+ locale: widget.locale,
352
+ child: transitionBuilder == null
353
+ ? child
354
+ : transitionBuilder (context, child),
355
+ );
356
+ };
357
+ }
358
+
345
359
final timePickerResult = await showTimePicker (
346
360
context: context,
347
361
initialTime: currentValue != null
348
362
? TimeOfDay .fromDateTime (currentValue)
349
363
: widget.initialTime,
350
- builder: widget.transitionBuilder ,
364
+ builder: builder ,
351
365
useRootNavigator: widget.useRootNavigator,
352
366
routeSettings: widget.routeSettings,
353
367
initialEntryMode: widget.timePickerInitialEntryMode,
You can’t perform that action at this time.
0 commit comments