-
Notifications
You must be signed in to change notification settings - Fork 29
docs: Add Todo App tutorial for FletX - Create comprehensive step-by… #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…step tutorial for beginners - Includes TodoController with state management - Demonstrates reactive UI updates with FletX - Shows proper separation of concerns - Includes best practices for FletX development Resolves: Issue for adding example tutorials Tutorial covers all FletX fundamentals with real code examples. This tutorial provides a step-by-step guide to building a simple Todo application using FletX. It covers project setup, state management, UI creation, and best practices.
Wgoeh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Diwak4r , there are some issues with your PR please check the comments.
And don't forget to add screenshots or gifs of the final results.
Thanks for your contributions.
docs/examples/todo-app.md
Outdated
|
|
||
| ## Prerequisites | ||
| - Python 3.8+ | ||
| - FletX installed (`pip install fletx`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pip install FletXr --pre see README or documentation.
docs/examples/todo-app.md
Outdated
| "title": title, | ||
| "completed": False | ||
| }) | ||
| self.update() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.update is not defined.
No need to update manually the UI if you use reactive objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed! Removed manual self.update() calls. The tutorial now uses reactive objects that automatically update the UI.
…n 3.12, RxList, and reactive components Addressed all review comments from @Wgoeh: - Fixed Python version requirement from 3.8+ to 3.12+ (only version currently supported) - Updated project setup to use 'fletx new' command for proper project structure - Changed todos from regular list to RxList (Reactive List) for proper UI subscriptions - Removed manual self.update() calls - now uses reactive objects that auto-update UI - Implemented @reactive_list decorator for proper dynamic list handling - Fixed main entry point to use FletXApp instead of TodoPage.run() - Added proper project structure and component generation instructions - Referenced fake-shop example repository for best practices
Einswilli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not try FletX and then write the tutorial with the working code and screenshots???
| from pages.todo_page import TodoPage | ||
|
|
||
| if __name__ == "__main__": | ||
| app = FletXApp(page_class=TodoPage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, see FletX Readme file for usage info.
FletXApp has no attribute page_class.
| from flet import Row, Checkbox, IconButton, icons, Column, Text | ||
|
|
||
| @reactive_list | ||
| class TodoList(FletXComponent): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FletXComponent doesn't exist.
Please take a look at the documentation or Readme for Usage.
You can also browse the fake-shop repo to know more about FletX usage.
Thanks.
…-step tutorial for beginners - Includes TodoController with state management - Demonstrates reactive UI updates with FletX - Shows proper separation of concerns - Includes best practices for FletX development Resolves: Issue for adding example tutorials Tutorial covers all FletX fundamentals with real code examples.
This tutorial provides a step-by-step guide to building a simple Todo application using FletX. It covers project setup, state management, UI creation, and best practices.