Comments (6)
Could you please share a code sample demonstrating the issue?
from website.
for me this gives me the error module flet does not have attribute MainAxisAlignment
import flet as ft
def main(page: ft.Page):
page.title = "Flet counter example"
page.vertical_alignment = ft.MainAxisAlignment.CENTER
txt_number = ft.TextField(value="0", text_align=ft.TextAlign.RIGHT, width=100)
def minus_click(e):
txt_number.value = str(int(txt_number.value) - 1)
page.update()
def plus_click(e):
txt_number.value = str(int(txt_number.value) + 1)
page.update()
page.add(
ft.Row(
[
ft.IconButton(ft.icons.REMOVE, on_click=minus_click),
txt_number,
ft.IconButton(ft.icons.ADD, on_click=plus_click),
],
alignment=ft.MainAxisAlignment.CENTER,
)
)
ft.app(target=main)
and changing the second line in the main function to page.vertical_alignment = "center"
creates the effect that the demo demonstrates and resolves the issue.
alignment at the end of the method function inside the Row
component also gives the error which needs to be change to the string "center"
I have noticed that the code in the examples repository runs error-free, but the documentation in the website is not consistent with those code examples.
from website.
What version of Flet module do you have installed? It looks like it's not the recent one.
from website.
Please upgrade to the latest version and give it another try.
from website.
My apologies, you're right. I'm not sure how this happened as I did run pip install flet
just about 2 weeks ago or so.
from website.
No worries, we are releasing quite often these days ;) Thanks for trying Flet!
from website.
Related Issues (20)
- Controls Tab, and the 'disabled' property HOT 1
- Onboarding Docs are seriously anti-"Production Ready" HOT 3
- Comment out multilang from docs if it's far far distant plan HOT 1
- Document Page props !
- Broken link on `page.on_scroll`
- fix typo: "Countinuos" of `CountinuosRectangleBorder` and similar to "Continuous"
- Can you add a formatting configuration to this project, such as prettier? HOT 13
- Document `ExpansionTile`, `SegmentedButton`, and `BottomAppBar`
- Incomplete Markdown documentation HOT 2
- Document `SearchBar`
- Pagelet control docs
- Typo in the Audio docs?
- Add a list of supported file formats in `Audio` control docs HOT 2
- `e.data` vs. `e.control.data` HOT 2
- Control docs fixes
- Document `v0.21.0` controls and properties
- Flet accessibility's bug
- CupertinoPicker properties docs
- broken Link to elevatedbutton style HOT 2
- Update RoadMap HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from website.