How to use WindowInsets api in common code so that the color of status bar and navigation is also same has the background color of the screen, right now I m getting white bars on top and bottom on ios, but as per this , we can achieve this in common code since 1.5.0 release for Compose Multiplatform
Edit: Solved✅
What I did?
Added this line to my ContentView,swift file “.edgesIgnoringSafeArea(.all)”
this is how the code looks now
*struct* ComposeView: UIViewControllerRepresentable {
*func* makeUIViewController(context: Context) -> UIViewController {
MainViewControllerKt.MainViewController()
}
*func* updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
}
*struct* ContentView: View {
*var* body: *some* View {
ComposeView()
.edgesIgnoringSafeArea(.all) // added the code here
.ignoresSafeArea(.keyboard)
}
}