Skip to content

Conversation

@Diwak4r
Copy link

@Diwak4r Diwak4r commented Nov 29, 2025

…-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.

…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.
Copy link
Contributor

@Wgoeh Wgoeh left a 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.


## Prerequisites
- Python 3.8+
- FletX installed (`pip install fletx`)
Copy link
Contributor

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.

"title": title,
"completed": False
})
self.update()
Copy link
Contributor

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.

Copy link
Author

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
Copy link
Contributor

@Einswilli Einswilli left a 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)
Copy link
Contributor

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):
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants