Skip to content

[iOS 26] Changing SystemUiMode doesn't change safe area #175520

Description

@MinSeungHyun

Steps to reproduce

  1. Run any Flutter app on iOS 26
  2. Change SystemUiMode to immersive by running SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);

Expected results

The top padding of SafeArea is correctly changed as the SystemUiMode changes.
Running on iOS 18.6

Simulator.Screen.Recording.-.iPad.Pro.11-inch.4th.generation.-.2025-09-18.at.00.01.59.mov

Actual results

The top padding of SafeArea keeps the previous value. But after rotating the screen or resizing the window, the top padding is updated to the correct value.
Running on iOS 26

Simulator.Screen.Recording.-.iPad.Pro.11-inch.4th.generation.-.2025-09-18.at.00.04.02.mov

Code sample

Code sample
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  bool _isImmersive = false;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Container(
          width: double.infinity,
          height: double.infinity,
          color: Colors.grey,
          child: Column(
            spacing: 8,
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Text('Immersive mode: $_isImmersive'),
              Text(
                'Safe area padding top: ${MediaQuery.of(context).padding.top}',
              ),
              FilledButton(
                onPressed: () {
                  if (_isImmersive) {
                    SystemChrome.setEnabledSystemUIMode(
                      SystemUiMode.edgeToEdge,
                    );
                    setState(() {
                      _isImmersive = false;
                    });
                  } else {
                    SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
                    setState(() {
                      _isImmersive = true;
                    });
                  }
                },
                child: const Text('Test'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.35.4, on macOS 26.0 25A354 darwin-arm64, locale en-KR) [251ms]
    • Flutter version 3.35.4 on channel stable at /Users/seunghyun/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d693b4b9db (25 hours ago), 2025-09-16 14:27:41 +0000
    • Engine revision c298091351
    • Dart version 3.9.2
    • DevTools version 2.48.0
    • Feature flags: enable-web, no-enable-linux-desktop, no-enable-macos-desktop, no-enable-windows-desktop,
      enable-android, enable-ios, cli-animations, enable-lldb-debugging

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,036ms]
    • Android SDK at /Users/seunghyun/Library/Android/Sdk
    • Emulator version 35.2.10.0 (build_id 12414864) (CL:N/A)
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/seunghyun/Library/Android/Sdk
    • Java binary at: /Users/seunghyun/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.0) [708ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17A324
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [18ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.3) [18ms]
    • Android Studio at /Users/seunghyun/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 21.0.6+-13368085-b895.109)

[✓] IntelliJ IDEA Ultimate Edition (version 2025.1.2) [17ms]
    • IntelliJ at /Users/seunghyun/Applications/IntelliJ IDEA Ultimate.app
    • 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

[✓] VS Code (version 1.101.1) [5ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.112.0

[✓] Connected device (5 available) [5.8s]
    • Seunghyun’s iPad (wireless) (mobile)         • 00008020-001B59413A83002E            • ios            • iOS 18.6.2
      22G100
    • iPhone 14 Pro (mobile)                       • 3794BC81-1DEA-4AF4-B5FA-3DA2FCF87C6F • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-26-0 (simulator)
    • iPad Pro (11-inch) (4th generation) (mobile) • 36564CCB-3F65-4FBF-8956-495C518CA3DE • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-26-0 (simulator)
    • iPad Pro (11-inch) (4th generation) (mobile) • 1E2A25BD-1080-47CF-82C6-831C4928805A • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-18-6 (simulator)
    • Chrome (web)                                 • chrome                               • web-javascript • Google Chrome
      140.0.7339.133

[✓] Network resources [312ms]
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work liste: OS-version specificAffects only some versions of the relevant operating systeme: device-specificOnly manifests on certain devicesengineflutter/engine related. See also e: labels.f: material designflutter/packages/flutter/material repository.found in release: 3.35Found to occur in 3.35found in release: 3.37Found to occur in 3.37frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Not started

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions