Skip to content

Extend drawing and rendering in lifecycles in iOS #71051

@adeolaex

Description

@adeolaex

Use case

To keep it short, applications built with flutter do not continue to render whilst out of view or in IOS's app switcher.
This is a bad behaviour from mobile apps imo . Might be a limitation from the framework, not sure.

It also causes an unpleasant UI/UX when scrolling through a ListView and the the application is removed from view. When
the application is brought back into view it jumps suddenly depending on the scroll extent.

Here is a gif description comparing Instagram and a mock flutter application.

ezgif-3-922462fb71be

Proposal

According to #5449 and #11421 , this was fixed. Although this was as far back 2017/2018 and Flutter has had many updates since then. Maybe a revision of what was changed could be implemented once more.

Environment

A minimal code snippet that would reproduce this issue.

import 'package:flutter/material.dart';

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

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Issue(),
    );
  }
}

class Issue extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Issue'),
      ),
      body: ListView.builder(
        itemBuilder: (context, index) {
          return Padding(
            padding: const EdgeInsets.all(16.0),
            child: Text('Issue test'),
          );
        },
        itemCount: 350,
      ),
    );
  }
}
flutter doctor -v
[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.7 19H15, locale en-GB)
    • Flutter version 1.22.0 at /Users/adeola/Downloads/flutter
    • Framework revision d408d302e2 (8 weeks ago), 2020-09-29 11:49:17 -0700
    • Engine revision 5babba6c4d
    • Dart version 2.10.0


[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/adeola/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-6222593) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.0.1, Build version 12A7300 • CocoaPods version 1.10.0.rc.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-6222593)

[✓] VS Code (version 1.51.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.16.0

[✓] Connected device (1 available) • iPhone (mobile) • 7301a50cae9aaf2e903ef313e632bfed64bb3704 • ios • iOS 14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work lista: fidelityMatching the OEM platforms bettera: qualityA truly polished experiencec: new featureNothing broken; request for a new capabilityc: regressionIt was better in the past than it is nowc: renderingUI glitches reported at the engine/skia or impeller rendering levelengineflutter/engine related. See also e: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions