Closed m8811163008 closed 1 year ago
Hi @m8811163008. Thanks for filing this issue. I can see the issue with the clock numbers being shown in English and can also produce the error when confirming the time on the latest master
and stable
channels.
https://github.com/flutter/flutter/assets/53122008/fdaa9664-fbba-460c-bda1-b5c1f33d76a2
```
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
/// Flutter code sample for [showTimePicker].
void main() {
runApp(const ShowTimePickerApp());
}
class ShowTimePickerApp extends StatefulWidget {
const ShowTimePickerApp({super.key});
@override
State
``` [✓] Flutter (Channel stable, 3.10.6, on macOS 13.0 22A380 darwin-arm64, locale en-NG) • Flutter version 3.10.6 on channel stable at /Users/damilolaalimi/sdks/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision f468f3366c (4 weeks ago), 2023-07-12 15:19:05 -0700 • Engine revision cdbeda788a • Dart version 3.0.6 • DevTools version 2.23.1 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/damilolaalimi/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14E300c • CocoaPods version 1.12.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) [✓] VS Code (version 1.80.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.50.0 [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-arm64 • macOS 13.0 22A380 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 115.0.5790.170 [✓] Network resources • All expected network resources are available. • No issues found! ``` ``` [✓] Flutter (Channel master, 3.13.0-17.0.pre.76, on macOS 13.0 22A380 darwin-arm64, locale en-NG) • Flutter version 3.13.0-17.0.pre.76 on channel master at /Users/damilolaalimi/fvm/versions/master • Upstream repository https://github.com/flutter/flutter.git • Framework revision bfbe79feb2 (12 hours ago), 2023-08-06 21:47:34 -0400 • Engine revision 15b5707af4 • Dart version 3.2.0 (build 3.2.0-41.0.dev) • DevTools version 2.26.1 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/damilolaalimi/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14E300c • CocoaPods version 1.12.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) [✓] VS Code (version 1.80.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.50.0 [✓] Connected device (4 available) • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 14 (API 34) (emulator) • iPhone 14 (mobile) • 1A122DE2-0CAB-4C3E-A395-691BF27D626F • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 13.0 22A380 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 115.0.5790.170 [✓] Network resources • All expected network resources are available. • No issues found! ```
Also, this issue might be similar to an already open issue describing this case, can you confirm it is similar to https://github.com/flutter/flutter/issues/85527
Hi @dam-ease , I can confirm the issue is similar to #85527 and it is still shows English digits at TimePickerEntryMode.dial
mode
I had the same issue with you sample code on my iOS device, here is the screen shots but with Material2 the digits issue which was showing the English number has resolved but still show the error message in input
mode.
Hi @m8811163008. Thanks for these. Please can you file a separate issue for that of the regression as described here https://github.com/flutter/flutter/issues/132032#issuecomment-1669063690 so it's easier to track? For the issue with error being thrown when inputting correct time which is similar to an already open issue https://github.com/flutter/flutter/issues/85527, I'd be closing this in favour of the already open one, kindly comment on the issue, upvote for attention and follow up on it for updates. If you disagree with these, kindly comment and I'd reopen this
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Is there an existing issue for this?
Steps to reproduce
Add supported locate to
fa
inMaterialApp
widgetthen call the show
showTimePicker
. It show the English number inTimePickerEntryMode.dial
mode:This screen shot shows the widget shows 0 with farsi font and other numbers with English fonts.
Another problem is related with
TimePickerEntryMode.input
mode: It shows error message with correct digits in supported language and to confirm the dialog we should type English digits. .This screen shot shows widget when you enterinput
mode.When you confirm the time it shows wrong textfield error. This screen shot shows widget with wrong error despite the input is correct.
Expected results
fa
but here the digits are in English formatinput
modeActual results
fa
when time picker is ininput
modeCode sample
Code sample
```dart ... localizationsDelegates: const [ GlobalCupertinoLocalizations.delegate, GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, ComponentLibraryLocalizations.delegate, ], supportedLocales: const [ Locale("fa", "IR"), ], locale: const Locale("fa", "IR"), ... ```Screenshots or Video
Screenshots / Video demonstration
[Upload media here] ![flutter_01](https://github.com/flutter/flutter/assets/20933055/8236277e-f4ee-4a45-b92d-c5a520eb3c3b) ![flutter_02](https://github.com/flu ![flutter_03](https://github.com/flutter/flutter/assets/20933055/640b073d-3adc-47d5-8a55-db914c54df76) tter/flutter/assets/20933055/d99973ab-ca3f-41c7-ba57-f3ad1fc1e6e0)Logs
Logs
```console [Paste your logs here] ```Flutter Doctor output
Doctor output
```console [✓] Flutter (Channel stable, 3.10.5, on macOS 13.0 22A380 darwin-x64, locale en-US) • Flutter version 3.10.5 on channel stable at /Library/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 796c8ef792 (8 weeks ago), 2023-06-13 15:51:02 -0700 • Engine revision 45f6e00911 • Dart version 3.0.5 • DevTools version 2.23.1 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/viraminer/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14E300c • CocoaPods version 1.12.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) [✓] VS Code (version 1.79.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.70.0 [✓] VS Code (version 1.79.2) • VS Code at /Users/viraminer/Downloads/Visual Studio Code.app/Contents • Flutter extension version 3.70.0 [✓] Connected device (3 available) • ViraMiner’s iPhone (mobile) • 00008030-0018391622FA802E • ios • iOS 16.5.1 20F75 • macOS (desktop) • macos • darwin-x64 • macOS 13.0 22A380 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 114.0.5735.198 [✓] Network resources • All expected network resources are available. • No issues found! ```