Closed
Description
It is tested on iPhone 13 Pro(120HZ) and iPhone12(60HZ), release mode:
When the keyboard showup, the textfield will pushup normally but not so smooth when device is under 120HZ refresh rate.
Also tested iPhone13Pro on low power mode(60HZ),or on iPhone12(60HZ), the animation is not that bad.
Here is the code example
Code
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const TextFieldPage(),
);
}
}
class TextFieldPage extends StatefulWidget {
const TextFieldPage({Key? key}) : super(key: key);
@override
State<TextFieldPage> createState() => _TextFieldPageState();
}
class _TextFieldPageState extends State<TextFieldPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
const Spacer(),
const Text('Keyboard animation', style: TextStyle(fontSize: 26)),
const Spacer(),
SizedBox(
height: 60 + MediaQuery.of(context).padding.bottom,
child: const CupertinoTextField(
decoration: BoxDecoration(color: Colors.red),
)),
],
),
);
}
}
Flutter doctor
[✓] Flutter (Channel master, 3.1.0-0.0.pre.2241, on macOS 12.5 21G72 darwin-arm
(Rosetta), locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for
more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.70.1)
Scanning for devices is taking a long time...[✓] Connected device (2 available)
[✓] HTTP Host Availability
Metadata
Metadata
Assignees
Labels
Important issues not at the top of the work listAnimation APIsEntering text in a text field or keyboard related problemsRelates to speed or footprint issues (see "perf:" labels)Only manifests on certain devicesflutter/engine repository. See also e: labels.Found to occur in 3.0Found to occur in 3.1The issue has been confirmed reproducible and is ready to work oniOS applications specificallyIssue is closed as already fixed in a newer version