Browse Source

Update Window API tutorial

pull/735/merge
Igor Demin 3 years ago committed by GitHub
parent
commit
0dca246ce1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      tutorials/Window_API_new/README.md

6
tutorials/Window_API_new/README.md

@ -85,9 +85,9 @@ fun main() = application {
```
![](window_splash.gif)
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
)
```
```

Loading…
Cancel
Save