flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
164.98k stars 27.18k forks source link

[mobile] spacebar cannot delete text in RTL mode and cursor is misplaced #63042

Open Add00w opened 4 years ago

Add00w commented 4 years ago

Hello, I am experiencing huge problem with space and obscure text erasing in flutter mobile please watch this video https://drive.google.com/file/d/16ScA6s0oZYVRGwGjnzFWYn9OzsCl-yq4/view

code:

import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:input_bugs/generated/i18n.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      localizationsDelegates: [
        S.delegate,
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],
      supportedLocales: S.delegate.supportedLocales,
      localeListResolutionCallback:
      S.delegate.listResolution(fallback: const Locale('ar', '')),
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
        // This makes the visual density adapt to the platform that you run
        // the app on. For desktop platforms, the controls will be smaller and
        // closer together (more dense) than on mobile platforms.
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: SignInWithEmail(),
    );
  }
}

class SignInWithEmail extends StatefulWidget {
  @override
  _SignInWithEmailState createState() => _SignInWithEmailState();
}

class _SignInWithEmailState extends State<SignInWithEmail> {
  String email, password;
  bool showPassword = false;
  @override
  Widget build(BuildContext context) {

    final _width = MediaQuery.of(context).size.width;
    return Scaffold(
      resizeToAvoidBottomInset: false,

      backgroundColor: Color.fromRGBO(250, 250, 250, 1.0),
      body: SingleChildScrollView(

          child: Center(
                child: Column(
                    children: [
                Padding(
                padding: EdgeInsets.symmetric(horizontal: _width * 0.07),
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.stretch,
                  children: <Widget>[

                    const Text("تسجيل الدخول",
                        style: TextStyle(
                          fontFamily:
                          'HelveticaNeueLTArabic', //'HelveticaNeueLTArabic',
                          color: Color(0xff000000),
                          fontSize: 24,
                          fontWeight: FontWeight.w700,
                          fontStyle: FontStyle.normal,
                        )),
                    SizedBox(
                      height: 20.0,
                    ),
                    Container(
                      width: 311,
                      height: 48,
                      decoration: BoxDecoration(
                          color: Color(0xffffffff).withOpacity(0.0),
                          shape: BoxShape.rectangle,
                          border: Border.all(
                            color: Color.fromRGBO(147, 113, 71, 0.5),
                          )),
                      child: TextField(
                        maxLines: 2, //temp solution
                        minLines: 1, //temp solution
                        keyboardType: TextInputType.emailAddress,
                        onChanged: (value) => email = value,
                        decoration: InputDecoration(
                          border: InputBorder.none,
                          fillColor: Color.fromRGBO(255, 255, 255, .5),
                          filled: true,
                          hintText: 'البريد الالكتروني',
                          hintStyle: TextStyle(
                            fontFamily: 'HelveticaNeueLTArabic-Roman',
                            color: Color(0xff939393),
                            fontSize: 14,
                            fontWeight: FontWeight.w400,
                            fontStyle: FontStyle.normal,
                          ),
                        ),
                      ),
                    ),
                    const SizedBox(
                      height: 10.0,
                    ),
                    Container(
                      width: 311,
                      height: 48,
                      decoration: BoxDecoration(
                        color: Color(0xffffffff).withOpacity(0.0),
                        shape: BoxShape.rectangle,
                        border: Border.all(
                          color: Color.fromRGBO(147, 113, 71, 0.5),
                        ),
                      ),
                      child: TextField(
                        minLines: 1, //temp solution
                        obscureText: !showPassword,
                        onChanged: (value) => password = value,
                        decoration: InputDecoration(
                            border: InputBorder.none,
                            fillColor: Color.fromRGBO(255, 255, 255, .5),
                            filled: true,
                            hintText: 'كلمة المرور',
                            hintStyle: TextStyle(
                              fontFamily: 'HelveticaNeueLTArabic-Roman',
                              color: Color(0xff939393),
                              fontSize: 14,
                              fontWeight: FontWeight.w400,
                              fontStyle: FontStyle.normal,
                            ),
                            suffixIcon: IconButton(
                              color: !showPassword
                                  ? Colors.black45
                                  : Colors.blueAccent,
                              icon: Icon(Icons.visibility),
                              onPressed: () => setState(() {
                                showPassword = !showPassword;
                              }),
                            )),
                      ),
                    ),

                  ],
                ),
              )]))));
            }
  }
flutter doctor -v: 
[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.6 19G73, locale en-US)
    • Flutter version 1.17.5 at /Users/addow/Developer/flutter
    • Framework revision 8af6b2f038 (5 weeks ago), 2020-06-30 12:53:55 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at /Users/addow/Library/Android/sdk
    • Platform android-30, build-tools 30.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.6, Build version 11E708
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 47.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.47.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.13.2

[✓] Connected device (1 available)
    • iPhone SE (2nd generation) • E50AFF28-BB84-48BE-931E-329079A30EBA • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)

! Doctor found issues in 1 category.

for some reason cant add the flutter run -verbose result I think because its huge. any fix for this issue?

himanshusharma89 commented 4 years ago

The link is not working, also can you provide a minimal complete reproducible code sample?

Add00w commented 4 years ago

The link is not working, also can you provide a minimal complete reproducible code sample?

if you copy and open in browser it works and I will add code

TahaTesser commented 4 years ago

Hi @EngAddow Can you please provide your flutter doctor -v your flutter run --verbose and a complete reproducible minimal code sample without using third party packages Thank you

Add00w commented 4 years ago

@TahaTesser I added flutter run --verbose and flutter doctor -v reults but it doesnt update the question may be flutter run --verbose result is huge

plse look I added flutter doctor -v in the Q

TahaTesser commented 4 years ago

Hi @EngAddow Can you please provide a complete reproducible minimal runnable code sample without using third party packages Thank you

Add00w commented 4 years ago

Hi @EngAddow Can you please provide a complete reproducible minimal runnable code sample without using third party packages Thank you

I will provide pls wait

Add00w commented 4 years ago

Hi @EngAddow Can you please provide a complete reproducible minimal runnable code sample without using third party packages Thank you

I added complete code I just used flutter_localizations everything else is local and if u can test RTL languages without that librory its ok just try to test RTL problems in the video thanks.

Add00w commented 4 years ago

@TahaTesser any update?

TahaTesser commented 4 years ago

Hi @EngAddow Just tried your code and your video and trying to understand the issues

  1. I can reproduce the firs issue with space and it i cannot delete text, it's not related obscureText at all, it can without it
  2. It doesn't reproduce but in your video cursor is misplaced, it's a known issue

obscureText with spacebar cannot delete in RTL languages and this also happens without obscureText https://github.com/flutter/flutter/issues/57732

ezgif com-resize

cursor misplace, i cannot reproduce, tho it is a known issue https://github.com/flutter/flutter/issues/47745

ezgif com-resize (1)

flutter doctor -v ``` [✓] Flutter (Channel stable, 1.20.1, on Mac OS X 10.15.6 19G73, locale en-GB) • Flutter version 1.20.1 at /Users/taha/Code/flutter_stable • Framework revision 2ae34518b8 (4 days ago), 2020-08-05 19:53:19 -0700 • Engine revision c8e3b94853 • Dart version 2.9.0 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1) • Android SDK at /Users/taha/Code/sdk • Platform android-30, build-tools 30.0.1 • ANDROID_HOME = /Users/taha/Code/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 12.0) • Xcode at /Applications/Xcode-beta.app/Contents/Developer • Xcode 12.0, Build version 12A8179i • CocoaPods version 1.9.3 [✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 48.0.2 • Dart plugin version 193.7361 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] VS Code (version 1.47.3) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.13.2 [✓] Connected device (2 available) • SM M305F (mobile) • 32003c30dc19668f • android-arm64 • Android 10 (API 29) • Taha’s iPhone (mobile) • 00008020-001059882212002E • ios • iOS 14.0 • No issues found! ```
Add00w commented 4 years ago

There are 2 issues in the video I shared

1: when I write something and hit space and write again then try to remove it doesnt 2: when the opscure is in mode show and u write something and then hide and try to remove it wont work

TahaTesser commented 4 years ago

Hi @EngAddow Thanks for explanation, i have updated the original comment and these are known issues

I see there's an open issue addressing the case you described.

  1. https://github.com/flutter/flutter/issues/57732
  2. https://github.com/flutter/flutter/issues/47745

Please follow up on that issue, I'm closing the current one as a duplicate. If you disagree, please write in the comments and I will reopen it. Thank you

Add00w commented 4 years ago

Hi @TahaTesser I was following on this https://github.com/flutter/flutter/issues/47745#issue-542154730 issue as u told me but they said it is only for web plz reopen this issue since it is mobile issue and not duplicate and it is very critical issue.

TahaTesser commented 4 years ago

Hi @EngAddow I cannot reproduce both issues on the latest master, other issues not reproduce anymore

spacebar issue.mp4.zip

delete issue.mp4.zip

code sample ```dart import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:i18n_example/generated/i18n.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { final i18n = I18n.delegate; return MaterialApp( onGenerateTitle: (context) => I18n.of(context).title, theme: ThemeData.dark(), home: Home(), locale: Locale('ar', 'AR'), localizationsDelegates: [ i18n, GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, ], supportedLocales: i18n.supportedLocales, localeResolutionCallback: i18n.resolution( fallback: Locale('en', 'US'), ), ); } } class Home extends StatefulWidget { @override _HomeState createState() => _HomeState(); } class _HomeState extends State { bool showPassowrd = false; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(I18n.of(context).title), ), body: Center( child: TextField( obscureText: showPassowrd, textDirection: TextDirection.rtl, ), ), floatingActionButton: FloatingActionButton.extended( label: Text(showPassowrd ? 'show' : 'hide'), icon: Icon(Icons.swipe), onPressed: () { setState(() { showPassowrd = !showPassowrd; }); }, ), ); } } ```
flutter doctor -v ``` [✓] Flutter (Channel master, 1.22.0-2.0.pre.105, on Linux, locale en_US.UTF-8) • Flutter version 1.22.0-2.0.pre.105 at /home/taha/Code/flutter • Framework revision cad4d1333e (11 hours ago), 2020-08-27 17:48:05 -0700 • Engine revision 77dd1c05b9 • Dart version 2.10.0 (build 2.10.0-67.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /home/taha/Code/sdk • Platform android-30, build-tools 30.0.2 • ANDROID_HOME = /home/taha/Code/sdk • Java binary at: /home/taha/Code/android-studio/jre/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Linux toolchain - develop for Linux desktop • clang version 10.0.0-4ubuntu1 • cmake version 3.16.3 • ninja version 1.10.0 • pkg-config version 0.29.1 [✓] Android Studio (version 4.0) • Android Studio at /home/taha/Code/android-studio • Flutter plugin version 48.1.2 • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] Connected device (1 available) • Linux (desktop) • linux • linux-x64 • Linux • No issues found! ```

Can you upgrade to masterand try again flutter channel master flutter upgrade --force flutter doctor -v

Add00w commented 4 years ago

Hi @EngAddow I cannot reproduce both issues on the latest master, other issues not reproduce anymore

spacebar issue.mp4.zip

delete issue.mp4.zip

code sample

import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:i18n_example/generated/i18n.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final i18n = I18n.delegate;

    return MaterialApp(
      onGenerateTitle: (context) => I18n.of(context).title,
      theme: ThemeData.dark(),
      home: Home(),
      locale: Locale('ar', 'AR'),
      localizationsDelegates: [
        i18n,
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
      ],
      supportedLocales: i18n.supportedLocales,
      localeResolutionCallback: i18n.resolution(
        fallback: Locale('en', 'US'),
      ),
    );
  }
}

class Home extends StatefulWidget {
  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  bool showPassowrd = false;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(I18n.of(context).title),
      ),
      body: Center(
        child: TextField(
          obscureText: showPassowrd,
          textDirection: TextDirection.rtl,
        ),
      ),
      floatingActionButton: FloatingActionButton.extended(
        label: Text(showPassowrd ? 'show' : 'hide'),
        icon: Icon(Icons.swipe),
        onPressed: () {
          setState(() {
            showPassowrd = !showPassowrd;
          });
        },
      ),
    );
  }
}

flutter doctor -v

[✓] Flutter (Channel master, 1.22.0-2.0.pre.105, on Linux, locale en_US.UTF-8)
    • Flutter version 1.22.0-2.0.pre.105 at /home/taha/Code/flutter
    • Framework revision cad4d1333e (11 hours ago), 2020-08-27 17:48:05 -0700
    • Engine revision 77dd1c05b9
    • Dart version 2.10.0 (build 2.10.0-67.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /home/taha/Code/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /home/taha/Code/sdk
    • Java binary at: /home/taha/Code/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 4.0)
    • Android Studio at /home/taha/Code/android-studio
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (1 available)
    • Linux (desktop) • linux • linux-x64 • Linux

• No issues found!

Can you upgrade to masterand try again flutter channel master flutter upgrade --force flutter doctor -v

Hi @TahaTesser thanks for your effort but my company says we should use stable which is recommended for production apps so when do u think this solution will be available in the stable Chanel?

and another thing is that when u where testing the obscure text u didnt enter numbers but chars can you try numbers( click show first then write numbers then hide them and try to remove that is the problem)

TahaTesser commented 4 years ago

Hi @EngAddow Just tried numbers as well based on your last comment and there is no issue with that too

flutter doctor -v ``` [✓] Flutter (Channel master, 1.22.0-2.0.pre.139, on Mac OS X 10.15.6 19G2021, locale en-GB) • Flutter version 1.22.0-2.0.pre.139 at /Users/tahatesser/Code/flutter_master • Framework revision c0ea00ed3f (2 hours ago), 2020-08-30 22:20:16 -0700 • Engine revision bada9fc5f3 • Dart version 2.10.0 (build 2.10.0-76.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Users/tahatesser/Code/sdk • Platform android-29, build-tools 29.0.2 • ANDROID_HOME = /Users/tahatesser/Code/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 11.6) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 11.6, Build version 11E708 • CocoaPods version 1.9.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 48.1.2 • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] VS Code (version 1.48.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.13.2 [✓] Connected device (4 available) • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64 • Android 10 (API 29) • macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.6 19G2021 • Web Server (web) • web-server • web-javascript • Flutter Tools • Chrome (web) • chrome • web-javascript • Google Chrome 84.0.4147.135 • No issues found! ```

These fixes will tickle to the stable channel eventually, could you please try them on latest master in a new project and confirm they also not reproducing for you

Thank you

Add00w commented 4 years ago

I will test on master soon and inform u thanks.

Add00w commented 4 years ago

Hi @TahaTesser I have tested on latest master and the problem exists

import 'package:flutter/material.dart';
void main() {
  runApp(MyApp());
}
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: ChangePasswordScreen(),
    );
  }
}
class ChangePasswordScreen extends StatefulWidget {
  final String token;
  ChangePasswordScreen({Key key, this.token}) : super(key: key);
  @override
  _ChangePasswordScreenState createState() => _ChangePasswordScreenState();
}
class _ChangePasswordScreenState extends State<ChangePasswordScreen> {
  String  confirmPassword;
  bool showPassword = false;
  @override
  Widget build(BuildContext context) {

    final _width = MediaQuery.of(context).size.width;
    final _height = MediaQuery.of(context).size.height;
    return Scaffold(
      resizeToAvoidBottomInset: false,
      appBar: AppBar(
          title: Text("تغيير كلمة المرور ",
              style: TextStyle(
                fontFamily: 'HelveticaNeueLTArabic-Roman',
                color: Color(0xff000000),
                fontSize: 17,
                fontWeight: FontWeight.w400,
                fontStyle: FontStyle.normal,
                letterSpacing: -0.408,
              )),
          centerTitle: true,
          automaticallyImplyLeading: false,
          elevation: 0.0,
          backgroundColor: Color.fromRGBO(250, 250, 250, 1.0),
          actions: [
            IconButton(
              icon: Icon(
                Icons.arrow_forward,
                color: Colors.black,
              ),
              onPressed: () => Navigator.pop(context),
            ),
          ]),
      backgroundColor: Color.fromRGBO(250, 250, 250, 1.0),
      body:SingleChildScrollView(
                child: Center(
                  child: Form(
                    autovalidateMode: AutovalidateMode.always,
                    child: Column(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: [
                          Container(
                            width: _width * 0.9,
                            child: TextFormField(
                              validator: (value) {
                                if (value.isEmpty) {
                                  return 'This is required';
                                } else if (value != 'newpassword') {
                                  return 'This must match the new password';
                                }
                                return null;
                              },
                              obscureText: !showPassword,
                              // minLines: 1, //temp solution
                              onChanged: (confirmP) => confirmPassword = confirmP,
                              style: TextStyle(
                                  fontFamily: 'HelveticaNeueLTArabic-Roman',
                                  color: Color(0xff939393),
                                  fontSize: 14,
                                  fontWeight: FontWeight.w400,
                                  fontStyle: FontStyle.normal,
                                  height: 0.999),textDirection: TextDirection.rtl,
                              decoration: InputDecoration(
                                  suffixIcon: IconButton(
                                    color: !showPassword
                                        ? Colors.black45
                                        : Colors.blueAccent,
                                    icon: Icon(Icons.visibility),
                                    onPressed: () => setState(() {
                                      showPassword = !showPassword;
                                    }),
                                  ),
                                  errorBorder: OutlineInputBorder(
                                    borderRadius: BorderRadius.all(Radius.zero),
                                    borderSide: BorderSide(
                                      color: Color.fromRGBO(171, 124, 57, 1.0),
                                    ),
                                  ),
                                  focusedErrorBorder: OutlineInputBorder(
                                    borderRadius: BorderRadius.all(Radius.zero),
                                    borderSide: BorderSide(
                                      color: Color.fromRGBO(171, 124, 57, 1.0),
                                    ),
                                  ),
                                  labelText: ' تأكيد كلمة المرور الجديدة',
                                  filled: true,
                                  fillColor: Color(0xffffffff),
                                  focusedBorder: OutlineInputBorder(
                                    borderRadius: BorderRadius.all(Radius.zero),
                                    borderSide: BorderSide(
                                      color: Color.fromRGBO(171, 124, 57, 1.0),
                                    ),
                                  ),
                                  enabledBorder: OutlineInputBorder(
                                      borderRadius: BorderRadius.all(Radius.zero),
                                      borderSide: BorderSide(
                                          color:
                                          Color.fromRGBO(171, 124, 57, 1.0)))),
                            ),
                          ),
                          SizedBox(height: 20.0),
                          GestureDetector(
                            onTap: () {
                            },
                            child: Container(
                              alignment: Alignment.center,
                              width: _width * 0.9,
                              height: 50,
                              decoration: BoxDecoration(
                                color: Color(0xff000000),
                                boxShadow: [
                                  BoxShadow(
                                      color: Color(0x407c5f3b),
                                      offset: Offset(0, 5),
                                      blurRadius: 10,
                                      spreadRadius: 0)
                                ],
                              ),
                              child:Text("تغيير كلمة المرور",
                                  style: TextStyle(
                                    fontFamily: 'HelveticaNeueLTArabic',
                                    color: Color(0xffffffff),
                                    fontSize: 16,
                                    fontWeight: FontWeight.w700,
                                    fontStyle: FontStyle.normal,
                                  )),
                            ),
                          ),

                        ]),
                  ),
                ),
              ),);
            }
}

and this is flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 1.22.0-10.0.pre.87, on Microsoft Windows [Version 10.0.18362.1016], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Android Studio (version 3.3)
[√] VS Code (version 1.48.2)
[√] Connected device (1 available)
• No issues found!
TahaTesser commented 4 years ago

I’m unable to reproduce the issue to pinpoint the cause even multiple tries. The issue needs further investigation.

Add00w commented 4 years ago

I’m unable to reproduce the issue to pinpoint the cause even multiple tries. The issue needs further investigation.

please try these steps: 1) click show icon(to make non obscure) 2) then write numbers 3) click show icon (to make obscure) 4) try to remove and tell me what u get?

Hixie commented 4 years ago

If the issue is fixed on master then it'll be fixed on stable at our next stable release (they happen about 4 times a year). If the issue is not fixed on master then we need very clear steps to reproduce so that we can track down the issue.

cc @justinmc

TahaTesser commented 4 years ago

@EngAddow disagrees and confirms the issue is still reproducible on master but I am unable to reproduce it on multiple devices in RTL language and keyboard

Add00w commented 3 years ago

@TahaTesser now I am using flutter 1.22 and this issue still exists aren't you trying to solve it or what?

xJon commented 3 years ago

RTL text input in Flutter is impossible. Any idea if this is going to get fixed?

Add00w commented 3 years ago

Flutter is wonderful framework which we liked a lot but this is one critical issue we have and we are waiting flutter team to respond to our issue.

justinmc commented 3 years ago

@EngAddow If I try your steps in https://github.com/flutter/flutter/issues/63042#issuecomment-689594187 I think I can't reproduce the problem (on master). Am I doing something wrong? Pardon my lack of knowledge of Arabic and RTL languages.

Add00w commented 3 years ago

@EngAddow If I try your steps in #63042 (comment) I think I can't reproduce the problem (on master). Am I doing something wrong? Pardon my lack of knowledge of Arabic and RTL languages.

Thanks @justinmc I see you are writing arabic but what I want is to write english words or numbers (e.g "hello" or 1234) in RTL text field then you will see the issue.

justinmc commented 3 years ago

Like this? I'm able to delete, but is the cursor position or anything else wrong?

xJon commented 3 years ago

Is there any upcoming fix or workaround? It's really unfortunate Flutter does not properly support RTL. I am actually unable to reproduce the same exact issue on an emulator (but one can still notice auto-complete is suddenly unavailable with RTL text + spaces), but it is completely present in any physical device. Also, weirdly setting maxLines: null or any other value bigger than 1 seems to resolve the issue.

hussenIbrahim commented 3 years ago

Unfortunately, this problem has not been solved yet !!!!!!!!!!!!!!!!

Add00w commented 3 years ago

Like this? I'm able to delete, but is the cursor position or anything else wrong?

The label and validation message of your textfield appears from left side means not RTL you should make your whole field or app RTL not LTR thanks

Add00w commented 3 years ago

Anyone want want this issue to be fixed soon pls thumbs up for this issue to be noticable thanks.

mikron123 commented 3 years ago

A temporary fix is to manually copy that character into the onChanged TextField listener to a relaceAll line. You can copy this code as it handles both cases (I found 2 different characters) :

onChanged: (value){ value = value.replaceAll("‎", ""); value = value.replaceAll("‏", ""); controller.text = value; }

flutter-triage-bot[bot] commented 4 months ago

This issue is missing a priority label. Please set a priority label when adding the triaged-design label.