Repository navigation
did i use wrong with the TextEditingController? #36671
Description
before i explain my issues, please check out its ok about the offical example.
https://api.flutter.dev/flutter/widgets/TextEditingController-class.html
This example doesn't seem to work.
just like this:

Steps to Reproduce
i just copy the code from the example, and run it.
I also have another problem. In my own code, I instantiate a _controller. When I assign a value to the controller property of TextField, the following problem occurs:
- Open simulator;
- Open keyboard;
- Input values;
- Click done;
- The value in the TextField disappears;
I don't know why, but when I remove _controller, the problem disappears.
just a line code about the controller:
TextEditingController _controller = TextEditingController();Logs
[✓] Flutter (Channel stable, v1.7.8+hotfix.3, on Mac OS X 10.14.5 18F203, locale zh-Hans-CN)
• Flutter version 1.7.8+hotfix.3 at /Users/hejingguo/flutter
• Framework revision b712a17 (13 days ago), 2019-07-09 13:14:38 -0700
• Engine revision 54ad777fd2
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
• Android SDK at /Users/hejingguo/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
• CocoaPods version 1.7.3
[✓] iOS tools - develop for iOS devices
• ios-deploy 1.9.4
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 37.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.1)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 36.1.4
• Dart plugin version 191.7830
[✓] VS Code (version 1.36.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.2.0
[✓] Connected device (1 available)
• iPhone 6s • 4AE27175-9674-443D-B05D-0B437F6A927C • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
• No issues found!
Activity
dumplings commentedon Aug 6, 2019
why nobody respond to me... please...
dumplings commentedon Sep 18, 2019
is this a real problem? could anybody respond me a massege?
xlfdyzcs commentedon Sep 24, 2019
你有看输出日志么?
xlfdyzcs commentedon Sep 24, 2019
建议用android studio 调试一下,看看日志,或者你贴出你的代码
TahaTesser commentedon Feb 26, 2020
Hi @dumplings
Are you still experiencing this issue?
Thank you
VladyslavBondarenko commentedon Mar 20, 2020
@dumplings
I can't reproduce it with flutter v1.16.1 and iOS simulator 13.3.
I hope it's fixed, closing.
Comment please if it's not so and I'll reopen the issue
Thank you
lock commentedon Apr 4, 2020
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 -vand a minimal reproduction of the issue.