-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Description
Steps to reproduce
- evn
[✓] Flutter (Channel stable, 3.24.5, on macOS 14.6 23G80 darwin-arm64 (Rosetta),
locale en-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.3)
[✓] VS Code (version 1.97.2)
4.demo is in the zip file
Expected results
Actual results
when add .navigationBar.isTranslucent = false code ,and run object then exchange tab, the flutter page is white screen
Code sample
2.project is a demo on ios and use flutter module
AppDelegate.swift code:
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow(frame: UIScreen.main.bounds)
window?.backgroundColor = .white
let tab = UITabBarController()
let v1 = UIViewController();
v1.title = "title1"
v1.tabBarItem = UITabBarItem(title: "title1", image: nil, tag: 0)
let navi1 = UINavigationController(rootViewController: v1)
navi1.navigationBar.isTranslucent = false
let flutter = JTFlutterViewController(initialRoute: "/test")
flutter.title = "flutter"
flutter.tabBarItem = UITabBarItem(title: "flutter", image: nil, tag: 1)
let navi2 = UINavigationController(rootViewController: flutter)
navi2.navigationBar.isTranslucent = false
let v2 = UIViewController();
v2.title = "title2"
v2.tabBarItem = UITabBarItem(title: "title2", image: nil, tag: 2)
let navi3 = UINavigationController(rootViewController: v2)
navi3.navigationBar.isTranslucent = false
tab.viewControllers = [
navi1,
navi2,
navi3,
]
window?.rootViewController = tab
window?.makeKeyAndVisible()
return true
}
}
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
[✓] Flutter (Channel stable, 3.24.5, on macOS 14.6 23G80 darwin-arm64 (Rosetta),
locale en-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.3)
[✓] VS Code (version 1.97.2)
Device is iOS15.2 ,iPhone XR