Open Pavel-Sulimau opened 3 years ago
It seems normal to me
https://flutter.dev/docs/perf/rendering
"If you are seeing janky (non smooth) animations, make sure that you are profiling performance with an app built in profile mode. The default Flutter build creates an app in debug mode, which is not indicative of release performance. For information, see Flutter’s build modes."
It' s probably because you are using debug mode
You can try running in profile mode flutter run --profile
@Pavel-Sulimau if you want the best performance then you may want to build the release version of your app.
The default one is in debug mode which doesn't provide the best of performance.
If you still have performance issues with the release mode, then you can profile the performance of your app with flutter run --profile
command.
It seems normal to me
default_flutter.mp4
https://flutter.dev/docs/perf/rendering
"If you are seeing janky (non smooth) animations, make sure that you are profiling performance with an app built in profile mode. The default Flutter build creates an app in debug mode, which is not indicative of release performance. For information, see Flutter’s build modes."
It' s probably because you are using debug mode
You can try running in profile mode
flutter run --profile
@germanolira, could you please try it out on an iOS simulator/device?
@germanolira, @EngineerDanny, it seems that I might've been not explicit enough, so I should emphasize that this is not about the animation performance, this is about the way it is animated now. I noticed the described change of animation behavior when I migrated one of my apps to Flutter 2.0 and was testing the app in release mode.
Please pay closer attention to the way how the bottom sheet is transitioned away when the keyboard is appearing. I also added additional videos where you can see the difference in the slow motion. Let me know if it is more clear now.
@Pavel-Sulimau Tried your code sample on iPhone 6s (14.4.1) using latest stable and see below:
I did notice the jump when keyboard pops up first time, but in following tries, the behavior seems to be smooth.
@darshankawar, thanks for your input!
P.S. I'm not saying that the current animation is unbearable, I'm saying it was different and it was better from my my point of view :)
@Pavel-Sulimau
I can't directly go back to 1.22.6 using flutter downgrade
and if I've to do so, need to download that version explicitly and alter config :-), but I'll see what I can do.
@Pavel-Sulimau I can't directly go back to 1.22.6 using
flutter downgrade
and if I've to do so, need to download that version explicitly and alter config :-), but I'll see what I can do.
I can recommend using FVM to be able to quickly switch between different flutter versions.
Precondition: use an iOS simulator/device.
Steps to Reproduce
Please note that this is not about the animation performance, it's about the animation itself.
void main() { runApp(MyApp()); }
class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp(home: MyHomePage()); } }
class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); }
class _MyHomePageState extends State {
TextEditingController _textEditingController = TextEditingController();
@override void dispose() { _textEditingController.dispose(); super.dispose(); }
@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text('Keyboard + Bottom Sheet')), body: Center( child: Padding( padding: const EdgeInsets.all(24.0), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Text( 'Notice the bottom sheet transition animation, Flutter 1.22.6, slow animation mode'), TextField(), ], ), ), ), floatingActionButton: FloatingActionButton( onPressed: _showBottomSheet, child: Icon(Icons.add), ), ); }
void _showBottomSheet() { showModalBottomSheet( context: context, builder: (ctx) => Container(height: 400, color: Colors.red), ); } }
[✓] Flutter (Channel unknown, 1.22.6, on macOS 11.2.3 20D91 darwin-x64, locale en-BY) • Flutter version 1.22.6 at /Users/pavel_sulimau/fvm/versions/1.22.6 • Framework revision 9b2d32b605 (9 weeks ago), 2021-01-22 14:36:39 -0800 • Engine revision 2f0af37152 • Dart version 2.10.5
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/pavel_sulimau/Library/Android/sdk • Platform android-30, build-tools 30.0.2 • 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-6915495) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e • CocoaPods version 1.10.1
[!] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.54.3) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.20.0
[✓] Connected device (1 available) • iPhone 12 Pro Max (mobile) • 8F693604-AEB3-4692-A0E3-A04316E77FFD • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
! Doctor found issues in 1 category.
[✓] Flutter (Channel stable, 2.0.3, on macOS 11.2.3 20D91 darwin-x64, locale en-BY) • Flutter version 2.0.3 at /Users/pavel_sulimau/fvm/versions/stable • Framework revision 4d7946a68d (9 days ago), 2021-03-18 17:24:33 -0700 • Engine revision 3459eb2436 • Dart version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/pavel_sulimau/Library/Android/sdk • Platform android-30, build-tools 30.0.2 • 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-6915495) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e • CocoaPods version 1.10.1
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • 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-b3-6915495)
[✓] VS Code (version 1.54.3) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.20.0
[✓] Connected device (2 available) • iPhone 12 Pro Max (mobile) • 8F693604-AEB3-4692-A0E3-A04316E77FFD • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator) • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.90
• No issues found!