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
165.4k stars 27.29k forks source link

Cannot delete obscure text #81052

Closed deathbat7 closed 3 years ago

deathbat7 commented 3 years ago

Hello, I am trying to make obscure text on my registration form, but delete text is not working

$ flutter doctor -v [√] Flutter (Channel stable, 2.0.5, on Microsoft Windows [Version 6.3.9600], locale en-US) • Flutter version 2.0.5 at C:\android\flutter • Framework revision adc687823a (7 days ago), 2021-04-16 09:40:20 -0700 • Engine revision b09f014e96 • Dart version 2.12.3

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1) • Android SDK at D:\SDK • Platform android-30, build-tools 30.0.1 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) • All Android licenses accepted.

[√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0) • Android Studio at C:\Program Files\Android\Android Studio • 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 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.55.2) • VS Code at C:\Users\Agus Hermansyah\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.21.0

[√] Connected device (2 available) • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator) • Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.85

• No issues found!

https://user-images.githubusercontent.com/41502905/115902406-9cebae00-a48c-11eb-9bb6-ab1f052a5325.mp4

nayakastha commented 3 years ago

Could you mention the steps to reproduce this error? It seems to work perfectly fine for me.

deathbat7 commented 3 years ago

Could you mention the steps to reproduce this error? It seems to work perfectly fine for me.

I also don't understand why, even though it was going well before. Are there additional plugins for checking errors? because I didn't see any errors.

nayakastha commented 3 years ago

Could you mention the steps to reproduce this error? It seems to work perfectly fine for me.

I also don't understand why, even though it was going well before. Are there additional plugins for checking errors? because I didn't see any errors.

I don't think there is any specific plug-in for checking errors. Try putting the code snippet. People can surely help.

deathbat7 commented 3 years ago

Could you mention the steps to reproduce this error? It seems to work perfectly fine for me.

I also don't understand why, even though it was going well before. Are there additional plugins for checking errors? because I didn't see any errors.

I don't think there is any specific plug-in for checking errors. Try putting the code snippet. People can surely help.

Here's my complete code

main.dart ``` // @dart=2.9 import 'dart:async'; import 'package:after_layout/after_layout.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/services.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:load/load.dart'; import 'package:sipandanayu/page/auth/login.dart'; import 'package:sipandanayu/page/auth/register.dart'; import 'package:sipandanayu/page/auth/reset.dart'; import 'package:sipandanayu/page/home.dart'; import 'package:sipandanayu/page/splash_screen.dart'; import 'package:sipandanayu/utils/uidata.dart'; import 'package:sipandanayu/utils/global.dart' as globals; final _kShouldTestAsyncErrorOnInit = false; final _kTestingCrashlytics = true; Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async { await Firebase.initializeApp(); } const AndroidNotificationChannel channel = AndroidNotificationChannel( 'high_importance_channel', // id 'High Importance Notifications', // title 'This channel is used for important notifications.', // description importance: Importance.high, ); final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler); await flutterLocalNotificationsPlugin .resolvePlatformSpecificImplementation< AndroidFlutterLocalNotificationsPlugin>() ?.createNotificationChannel(channel); await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions( alert: true, badge: true, sound: true, ); runZonedGuarded(() { runApp(MyApp()); }, (error, stackTrace) { FirebaseCrashlytics.instance.recordError(error, stackTrace); }); } class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); } class _MyAppState extends State with AfterLayoutMixin { Future _testAsyncErrorOnInit() async { Future.delayed(const Duration(seconds: 2), () { final List list = []; print(list[100]); }); } Future _initializeFlutterFire() async { await Firebase.initializeApp(); if (_kTestingCrashlytics) { await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true); } else { await FirebaseCrashlytics.instance .setCrashlyticsCollectionEnabled(!kDebugMode); } Function originalOnError = FlutterError.onError; FlutterError.onError = (FlutterErrorDetails errorDetails) async { await FirebaseCrashlytics.instance.recordFlutterError(errorDetails); originalOnError(errorDetails); }; if (_kShouldTestAsyncErrorOnInit) { await _testAsyncErrorOnInit(); } } @override void initState() { super.initState(); _initializeFlutterFire(); FirebaseMessaging.instance.getInitialMessage(); FirebaseMessaging.onMessage.listen((RemoteMessage message) { RemoteNotification notification = message.notification; AndroidNotification android = message.notification?.android; if (notification != null && android != null) { flutterLocalNotificationsPlugin.show( notification.hashCode, notification.title, notification.body, NotificationDetails( android: AndroidNotificationDetails( channel.id, channel.name, channel.description, icon: 'launch_background', ), )); } }); FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {}); } @override void afterFirstLayout(BuildContext context) { FirebaseMessaging.instance.getToken().then((token) { setState(() { globals.androidToken = "$token"; }); }); } @override Widget build(BuildContext context) { return new MaterialApp( builder: (BuildContext context, Widget child) { return LoadingProvider( themeData: LoadingThemeData(tapDismiss: false), loadingWidgetBuilder: (ctx, data) { return MediaQuery( data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), child: Center( child: SizedBox( height: 100, child: Column( children: [ CupertinoActivityIndicator( radius: 15.0, ), SizedBox( height: 10.0, ), Text( "Loading...", style: TextStyle( color: Colors.black38, fontSize: 14, decoration: TextDecoration.none), ), ], ), ), ), ); }, child: child, ); }, title: UIData.appName, theme: ThemeData( appBarTheme: AppBarTheme( brightness: Brightness.light, elevation: 0, color: ThemeData.light().canvasColor, ), primaryColor: Colors.indigo, fontFamily: UIData.helveticaNeueLight, primarySwatch: Colors.blue), debugShowCheckedModeBanner: false, home: SplashScreen(), routes: { UIData.loginRoute: (BuildContext context) => Login(), UIData.registerRoute: (BuildContext context) => Register(), UIData.resetRoute: (BuildContext context) => ResetPass(), }, onGenerateRoute: (settings) { if (settings.name == '/') { return MaterialPageRoute(builder: (context) => TabHome()); } return MaterialPageRoute(builder: (context) => TabHome()); }, onUnknownRoute: (RouteSettings rs) => new MaterialPageRoute(builder: (context) => new Login())); } } ```
myapp.dart ``` import 'package:after_layout/after_layout.dart'; import 'package:badges/badges.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; import 'package:sipandanayu/page/chat.dart'; import 'package:sipandanayu/page/home.dart'; import 'package:sipandanayu/page/notif.dart'; import 'package:sipandanayu/page/pengajuan.dart'; import 'package:shared_preferences/shared_preferences.dart'; SharedPreferences sharedPreferences; int notifPengajuan = 0; int notifChat = 0; class FromRightToLeft extends MaterialPageRoute { FromRightToLeft({WidgetBuilder builder, RouteSettings settings}) : super(builder: builder, settings: settings); @override Widget buildTransitions(BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) { return new SlideTransition( child: new Container( decoration: new BoxDecoration(boxShadow: [ new BoxShadow( color: Colors.black26, blurRadius: 25.0, ) ]), child: child, ), position: new Tween( begin: const Offset(1.0, 0.0), end: Offset.zero, ).animate(new CurvedAnimation( parent: animation, curve: Curves.fastOutSlowIn, )), ); } @override Duration get transitionDuration => const Duration(milliseconds: 400); } class Tabs extends StatefulWidget { @override TabsState createState() => new TabsState(); } class TabsState extends State with AfterLayoutMixin { @override void initState() { super.initState(); } @override void dispose() { super.dispose(); } getCredential() async { sharedPreferences = await SharedPreferences.getInstance(); setState(() { notifPengajuan = sharedPreferences.getInt("notifPengajuan"); notifChat = sharedPreferences.getInt("notifChat"); if (notifPengajuan != null) { if (notifPengajuan > 0) { notifPengajuan = 1; } else { notifPengajuan = 0; } } else { notifPengajuan = 0; } if (notifChat != null) { if (notifChat > 0) { notifChat = 1; } else { notifChat = 0; } } else { notifChat = 0; } }); } Future handleFirebase(jenisNotif) async { if (!mounted) return; if (jenisNotif == 'pesan') { sharedPreferences = await SharedPreferences.getInstance(); setState(() { notifChat = 1; sharedPreferences.setInt("notifChat", 1); }); } else if (jenisNotif == 'pemberitahuan') { sharedPreferences = await SharedPreferences.getInstance(); setState(() { notifPengajuan = 1; sharedPreferences.setInt("notifPengajuan", 1); }); } } @override Future afterFirstLayout(BuildContext context) async { getCredential(); FirebaseMessaging.onMessage.listen((RemoteMessage message) { handleFirebase(message.data['jenis_notif']); }); } int _currentIndex = 0; final List _children = [ new TabHome(), new Pengajuan(), new Notif(), new TabChat(), ]; @override Widget build(BuildContext context) { return MediaQuery( data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), child: new Scaffold( body: _children[_currentIndex], bottomNavigationBar: BottomNavigationBar( backgroundColor: Colors.white, type: BottomNavigationBarType.shifting, elevation: 8.0, showUnselectedLabels: true, onTap: onTabTapped, currentIndex: _currentIndex, selectedItemColor: Colors.indigo, unselectedItemColor: Colors.grey, items: [ BottomNavigationBarItem( label: 'Beranda', icon: Icon(MdiIcons.home), ), BottomNavigationBarItem( label: 'Pengajuan', icon: notifPengajuan > 0 ? Badge( shape: BadgeShape.circle, borderRadius: BorderRadius.circular(100), child: Icon(MdiIcons.formatListBulletedSquare), badgeContent: Container( height: 5, width: 5, decoration: BoxDecoration( shape: BoxShape.circle, color: Colors.white), ), ) : Icon(MdiIcons.formatListBulletedSquare), ), BottomNavigationBarItem( label: 'Notif', icon: notifPengajuan > 0 ? Badge( shape: BadgeShape.circle, borderRadius: BorderRadius.circular(100), child: Icon(MdiIcons.bellRingOutline), badgeContent: Container( height: 5, width: 5, decoration: BoxDecoration( shape: BoxShape.circle, color: Colors.white), ), ) : Icon(MdiIcons.bellOutline), ), BottomNavigationBarItem( label: 'Chat', icon: notifChat > 0 ? Badge( shape: BadgeShape.circle, borderRadius: BorderRadius.circular(100), child: Icon(MdiIcons.forumOutline), badgeContent: Container( height: 5, width: 5, decoration: BoxDecoration( shape: BoxShape.circle, color: Colors.white), ), ) : Icon(MdiIcons.forumOutline), ), ], )), ); } setCredential() async { sharedPreferences = await SharedPreferences.getInstance(); setState(() { sharedPreferences.setString("isLogin", 'false'); sharedPreferences.setString("isLogout", 'true'); }); } Future logOut() async { setCredential(); Navigator.of(context) .pushNamedAndRemoveUntil('/LoginPage', (Route route) => false); } Future onTabTapped(int index) async { sharedPreferences = await SharedPreferences.getInstance(); setState(() { _currentIndex = index; if ((index == 1) || (index == 2)) { notifPengajuan = 0; sharedPreferences.setInt("notifPengajuan", 0); } else if (index == 3) { notifChat = 0; sharedPreferences.setInt("notifChat", 0); } }); } } ```
login.dart ``` import 'package:device_info/device_info.dart'; import 'package:flutter/material.dart'; import 'package:load/load.dart'; import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; import 'package:sipandanayu/myapp.dart'; import 'dart:io'; import 'package:flutter/services.dart'; import 'package:flutter/cupertino.dart'; import 'package:sipandanayu/utils/dialog/dialogGagal.dart'; import 'package:sipandanayu/utils/http.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:sipandanayu/utils/global.dart' as globals; import 'package:dio/dio.dart'; bool isLogout = true; var dio = getDio(); class Login extends StatefulWidget { Login({Key key}) : super(key: key); @override LoginState createState() => new LoginState(); } class _LoginData { String nik = ''; String password = ''; } class LoginState extends State { final GlobalKey _scaffoldKey = new GlobalKey(); final GlobalKey _formKey = new GlobalKey(); final FocusNode myFocusNodeNikLogin = FocusNode(); final FocusNode myFocusNodePasswordLogin = FocusNode(); TextEditingController loginNikController = new TextEditingController(); TextEditingController loginPasswordController = new TextEditingController(); bool _obscureTextLogin = true; PageController _pageController; Color left = Colors.black; Color right = Colors.white; SharedPreferences sharedPreferences; static final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); Map deviceData = {}; @override void dispose() { myFocusNodePasswordLogin.dispose(); myFocusNodeNikLogin.dispose(); _pageController?.dispose(); super.dispose(); } @override void initState() { super.initState(); SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, DeviceOrientation.portraitDown, ]); _pageController = PageController(); getCredential(); } Future initPlatformState() async { Map deviceData; try { if (Platform.isAndroid) { deviceData = _readAndroidBuildData(await deviceInfoPlugin.androidInfo); } else if (Platform.isIOS) { deviceData = _readIosDeviceInfo(await deviceInfoPlugin.iosInfo); } } on PlatformException { deviceData = { 'Error:': 'Failed to get platform version.' }; } if (!mounted) return; setState(() { deviceData = deviceData; globals.deviceId = deviceData['androidId']; }); } Map _readAndroidBuildData(AndroidDeviceInfo build) { return { 'version.securityPatch': build.version.securityPatch, 'version.sdkInt': build.version.sdkInt, 'version.release': build.version.release, 'version.previewSdkInt': build.version.previewSdkInt, 'version.incremental': build.version.incremental, 'version.codename': build.version.codename, 'version.baseOS': build.version.baseOS, 'board': build.board, 'bootloader': build.bootloader, 'brand': build.brand, 'device': build.device, 'display': build.display, 'fingerprint': build.fingerprint, 'hardware': build.hardware, 'host': build.host, 'id': build.id, 'manufacturer': build.manufacturer, 'model': build.model, 'product': build.product, 'supported32BitAbis': build.supported32BitAbis, 'supported64BitAbis': build.supported64BitAbis, 'supportedAbis': build.supportedAbis, 'tags': build.tags, 'type': build.type, 'isPhysicalDevice': build.isPhysicalDevice, 'androidId': build.androidId, 'systemFeatures': build.systemFeatures, }; } Map _readIosDeviceInfo(IosDeviceInfo data) { return { 'name': data.name, 'systemName': data.systemName, 'systemVersion': data.systemVersion, 'model': data.model, 'localizedModel': data.localizedModel, 'identifierForVendor': data.identifierForVendor, 'isPhysicalDevice': data.isPhysicalDevice, 'utsname.sysname:': data.utsname.sysname, 'utsname.nodename:': data.utsname.nodename, 'utsname.release:': data.utsname.release, 'utsname.version:': data.utsname.version, 'utsname.machine:': data.utsname.machine, }; } _LoginData _data = new _LoginData(); String _validateNikLogin(String value) { if (value.length != 16) { return 'value'; } return null; } String _validatePasswordLogin(String value) { if (value.length < 6) { return 'value'; } return null; } void submit() { FocusScope.of(context).requestFocus(new FocusNode()); if (this._formKey.currentState.validate()) { _formKey.currentState.save(); showLoadingDialog(); login(); } } getCredential() async { if (globals.deviceId.length < 1) { await initPlatformState(); } sharedPreferences = await SharedPreferences.getInstance(); setState(() { loginNikController.text = sharedPreferences.getString("nik"); loginPasswordController.text = sharedPreferences.getString("password"); }); if ((sharedPreferences.getString("isLogin") == 'true') && (sharedPreferences.getString("isLogout") == 'false')) { showLoadingDialog(); login(); } } setCredential() async { sharedPreferences = await SharedPreferences.getInstance(); setState(() { sharedPreferences.setString("isFirstTime", 'false'); sharedPreferences.setString("isLogin", 'true'); sharedPreferences.setString("isLogout", 'false'); sharedPreferences.setString("nik", loginNikController.text); sharedPreferences.setString("password", loginPasswordController.text); }); } Future login() async { // login code } @override Widget build(BuildContext context) { return MediaQuery( data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0), child: new Scaffold( key: _scaffoldKey, backgroundColor: Colors.white, body: NotificationListener( onNotification: (overscroll) { overscroll.disallowGlow(); return null; }, child: Center( child: SingleChildScrollView( child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Form( key: this._formKey, child: Column(children: [ Container( child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisSize: MainAxisSize.min, children: [ Container( padding: EdgeInsets.symmetric( vertical: 0.0, horizontal: 30.0), child: TextFormField( inputFormatters: [ FilteringTextInputFormatter .digitsOnly, LengthLimitingTextInputFormatter( 16), ], focusNode: myFocusNodeNikLogin, controller: loginNikController, validator: this._validateNikLogin, onSaved: (String value) { this._data.nik = value; }, maxLines: 1, decoration: InputDecoration( labelText: "NIK Kepala Keluarga", ), ), ), Container( padding: EdgeInsets.symmetric( vertical: 0.0, horizontal: 30.0), child: TextFormField( focusNode: myFocusNodePasswordLogin, controller: loginPasswordController, validator: this._validatePasswordLogin, obscureText: _obscureTextLogin, onSaved: (String value) { this._data.password = value; }, inputFormatters: [ LengthLimitingTextInputFormatter( 30), ], decoration: InputDecoration( labelText: "Password", suffixIcon: Row( mainAxisAlignment: MainAxisAlignment .spaceBetween, mainAxisSize: MainAxisSize.min, children: [ loginPasswordController .text.length > 0 ? GestureDetector( onTap: () { loginPasswordController .clear(); }, child: Icon( MdiIcons.closeCircle, size: 15.0, color: Colors.indigo, ), ) : SizedBox(), GestureDetector( onTap: _toggleLogin, child: Icon( _obscureTextLogin == true ? MdiIcons.eyeOffOutline : MdiIcons.eye, size: 15.0, color: Colors.indigo, ), ), ], ), ), ), ), SizedBox( height: 30.0, ), Container( margin: const EdgeInsets.symmetric( vertical: 16.0, horizontal: 30), child: ButtonTheme( height: 45, child: TextButton( onPressed: this.submit, child: Center( child: Text( "Login".toUpperCase(), style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold), )), ), ), decoration: BoxDecoration( color: Colors.indigo[900], borderRadius: BorderRadius.circular(5), ), ), TextButton( onPressed: () { Navigator.of(context) .pushNamedAndRemoveUntil( '/RegisterPage', (Route route) => false); }, child: RichText( text: TextSpan( children: [ TextSpan( text: "Belum punya akun? ", style: TextStyle( color: Colors.black54)), TextSpan( text: "Daftar disini", style: TextStyle( color: Colors.blue)), ], ), )), TextButton( onPressed: () { Navigator.of(context) .pushNamedAndRemoveUntil( '/ResetPage', (Route route) => false); }, child: Text("Lupa Password", style: TextStyle(color: Colors.blue)), ), ], ), ) ])) ]) ]))))), ); } void _toggleLogin() { setState(() { _obscureTextLogin = !_obscureTextLogin; }); } } ```
pubspec.yaml ``` name: name_app description: descrip publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: sdk: ">=2.7.0 <3.0.0" dependencies: flutter: sdk: flutter after_layout: audioplayers: ^0.18.3 awesome_dialog: badges: cached_network_image: carousel_slider: device_apps: device_info: dio: ^4.0.0 dropdown_search: esys_flutter_share: expandable: firebase_core: firebase_crashlytics: firebase_messaging: ^9.1.1 flutter_local_notifications: flutter_cache_manager: flutter_native_image: flutter_svg: flutter_widget_from_html_core: grouped_buttons: image_picker: intl: introduction_screen: launch_review: load: mask_text_input_formatter: material_design_icons_flutter: open_file: package_info: permission_handler: ext_storage: pk_skeleton: provider: shared_preferences: 2.0.5 timeago: timeline_tile: url_launcher: validate: webview_flutter: dependency_overrides: # necessary because audioplayers: 0.17.4 is not updated to use path_provider 2.0.1 path_provider: dev_dependencies: flutter_test: sdk: flutter flutter: uses-material-design: true assets: - assets/img/ - assets/img/tahapan/ fonts: - family: HelveticaNeueLight fonts: - asset: assets/fonts/HelveticaNeueLight.ttf style: normal ```
darshankawar commented 3 years ago

@deathbat7 I tried a sample code on latest master, and was able to delete the obscure text properly, as below:

https://user-images.githubusercontent.com/67046386/116041388-c8d48280-a68a-11eb-8cb7-cc655bfde435.mov

The code you shared seems to be from your working app which has lot of third party plugins. Please try below code and see if you still get the same issue.

code sample ``` import 'package:flutter/material.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', home: MyHomePage(), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key}) : super(key: key); @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State { @override Widget build(BuildContext context) { return Scaffold( body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ TextField( obscureText: true, decoration: InputDecoration( hintText: 'enter here', ), ) ], ), ), ); } } ```
deathbat7 commented 3 years ago

@deathbat7 I tried a sample code on latest master, and was able to delete the obscure text properly, as below:

81052.mov The code you shared seems to be from your working app which has lot of third party plugins. Please try below code and see if you still get the same issue.

code sample

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            TextField(
              obscureText: true,
              decoration: InputDecoration(
                hintText: 'enter here',
              ),
            )
          ],
        ),
      ),
    );
  }
}

I've tried to make a new project with only one page along with the same code, and it works well. Until now, I haven't found the cause, because there isn't any error.

darshankawar commented 3 years ago

You may need to revisit your code and the plugins you are using to see there's any pattern to it.

deathbat7 commented 3 years ago

You may need to revisit your code and the plugins you are using to see there's any pattern to it.

Ah, I forgot something, this error appears on some devices, one of which is a Samsung device.

darshankawar commented 3 years ago

@deathbat7 Just trying to confirm if this is specific to Samsung Keyboard. Can you try with other available soft keyboards and see if same behavior occurs ?

nayakastha commented 3 years ago

I don't think it's something pertaining to Samsung because it worked for me and I use Samsung device as well.

deathbat7 commented 3 years ago

@deathbat7 Just trying to confirm if this is specific to Samsung Keyboard. Can you try with other available soft keyboards and see if same behavior occurs ?

This is a file that I have released in Playstore, I hope you can try it. The error is only when you fill in the password section on the login and register pages https://play.google.com/store/apps/details?id=gov.disdukcapilkotabdg.salaman

deathbat7 commented 3 years ago

I don't think it's something pertaining to Samsung because it worked for me and I use Samsung device as well.

This is a file that I have released in Playstore, I hope you can try it. The error is only when you fill in the password section on the login and register pages https://play.google.com/store/apps/details?id=gov.disdukcapilkotabdg.salaman

darshankawar commented 3 years ago

@deathbat7 I tried with Samsung S10 device and it worked as expected and per above comment, it seem to be specific to Samsung make and model. Can you provide the device details on which it doesn't work ?

deathbat7 commented 3 years ago

@deathbat7 I tried with Samsung S10 device and it worked as expected and per above comment, it seem to be specific to Samsung make and model. Can you provide the device details on which it doesn't work ?

Is it true? I also tried it on the Samsung S10 but it still got an error, can I see the video recording? Thank you in advance

darshankawar commented 3 years ago

@deathbat7 I used the Samsung Device Lab to verify this, https://developer.samsung.com/remote-test-lab, which for some reason doesn't allow to record video.

Also, the link you shared earlier, https://play.google.com/store/apps/details?id=gov.disdukcapilkotabdg.salaman, doesn't reveal much about the code, since it just looks like a screenshot.

Since you also mentioned, with a single screen app, it works fine using same device, you may need to revisit your working app code and see if there's anything extra / unusual happening that may be causing such behavior at your end, because we can't replicate it locally using sample code.

Thanks.

pedromassangocode commented 3 years ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.

Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v. All system setups can be slightly different, so it's always better to open new issues and reference related issues.

github-actions[bot] commented 3 years ago

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.