Skip to content

Commit d80edf3

Browse files
authored
Fix types and make code consistent with docs. (#2364)
* Fix types * Make code consistent with docs
1 parent 21baa62 commit d80edf3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ def main(page: Page):
4747
txt_number = TextField(value="0", text_align="right", width=100)
4848

4949
def minus_click(e):
50-
txt_number.value = int(txt_number.value) - 1
50+
txt_number.value = str(int(txt_number.value) - 1)
5151
page.update()
5252

5353
def plus_click(e):
54-
txt_number.value = int(txt_number.value) + 1
54+
txt_number.value = str(int(txt_number.value) + 1)
5555
page.update()
5656

5757
page.add(
@@ -88,7 +88,7 @@ The app will be started in a native OS window - what a nice alternative to Elect
8888
Now, if you want to run the app as a web app, just replace the last line with:
8989

9090
```python
91-
flet.app(target=main, view=flet.WEB_BROWSER)
91+
flet.app(target=main, view=flet.AppView.WEB_BROWSER)
9292
```
9393

9494
run again and now you instantly get a web app:

0 commit comments

Comments
 (0)