Ad Code

Ticker

6/recent/ticker-posts

How to use flutter in Python | Using Flet in Python | better than Tkinter? | Abhicoder

 

Hey guys! In this blog we are going to use Flutter with Python using Flet in Python Library. It is much easier than Flutter and takes very less space on pc (12.3 MB). So let's create a basic app in flet which will display a Hello World message.
Video Tutorial:-


Installment & Setup:- 

1. Must have Python installed! Recommended the latest version.

2. Open Command Prompt and Type the command

    ( pip install flet )

    and then hit Enter on your keyboard, it will install on your computer.

3. That's it!

Python Code:-

1. Open your favorite IDE and then create a file named "main.py"

2. Paste this code in the file:-

import flet as ft

def main(page: ft.Page):
    page.window_width = 400
    page.window_height = 700
    page.horizontal_alignment = "center"
    page.vertical_alignment = "center"
    page.add(ft.Text(value="Hello World!", size=30))

ft.app(target=main)

After that save the file by pressing CTRL + S. And you are done! Just Run the app and enjoy!

If you liked this blog and found it usefull then please SUBSCRIBE my Youtube Channel! Flet is much better than Tkinter! What do you say? let me know in the comments!

Thanks for reading!


#python #flet #flutter #tkinter #viral

Post a Comment

0 Comments

Ad Code