mirror of
https://github.com/jlengrand/compose-multiplatform.git
synced 2026-03-10 08:11:20 +00:00
Update Window API tutorial
This commit is contained in:
@@ -85,9 +85,9 @@ fun main() = application {
|
||||
```
|
||||

|
||||
|
||||
If window requires some custom logic on close (for example, to show a dialog), you can override close action using `onCloseRequest`.
|
||||
If the window requires some custom logic on close (for example, to show a dialog), you can override close action using `onCloseRequest`.
|
||||
|
||||
See that instead of an imperative approach to closing the window (`window.close()`) we use a declarative - close the window in response of changing the state: `isOpen = false`.
|
||||
See that instead of an imperative approach to closing the window (`window.close()`) we use a declarative - close the window in response to changing the state: `isOpen = false`.
|
||||
```kotlin
|
||||
import androidx.compose.material.Button
|
||||
import androidx.compose.material.Text
|
||||
@@ -491,4 +491,4 @@ private fun FileDialog(
|
||||
},
|
||||
dispose = FileDialog::dispose
|
||||
)
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user