Open Add00w opened 4 years ago
The link is not working, also can you provide a minimal complete reproducible code sample?
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
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
@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
Hi @EngAddow Can you please provide a complete reproducible minimal runnable code sample without using third party packages Thank you
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
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.
@TahaTesser any update?
Hi @EngAddow Just tried your code and your video and trying to understand the issues
obscureText
at all, it can without it 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
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.
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
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.
Hi @EngAddow
I cannot reproduce both issues on the latest master
, other issues not reproduce anymore
Can you upgrade to master
and try again
flutter channel master
flutter upgrade --force
flutter doctor -v
Hi @EngAddow I cannot reproduce both issues on the latest
master
, other issues not reproduce anymorecode 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
master
and try againflutter 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)
Hi @EngAddow Just tried numbers as well based on your last comment and there is no issue with that too
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
I will test on master soon and inform u thanks.
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!
I’m unable to reproduce the issue to pinpoint the cause even multiple tries. The issue needs further investigation.
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?
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
@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
@TahaTesser now I am using flutter 1.22 and this issue still exists aren't you trying to solve it or what?
RTL text input in Flutter is impossible. Any idea if this is going to get fixed?
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.
@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.
@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.
Like this? I'm able to delete, but is the cursor position or anything else wrong?
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.
Unfortunately, this problem has not been solved yet !!!!!!!!!!!!!!!!
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
Anyone want want this issue to be fixed soon pls thumbs up for this issue to be noticable thanks.
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; }
This issue is missing a priority label. Please set a priority label when adding the triaged-design
label.
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:
for some reason cant add the flutter run -verbose result I think because its huge. any fix for this issue?