flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
10.99k stars 426 forks source link

Extension Support and Plugin Section in `Awesome Flet` #2197

Open itsmeadarsh2008 opened 9 months ago

itsmeadarsh2008 commented 9 months ago

Extension Support and Plugin Section in Awesome Flet I kindly request the implementation of extension support in the flet project. This enhancement aims to allow contributors to seamlessly publish their extensions, thereby expanding the project's functionality and fostering a more collaborative community.

Additionally, I propose the creation of a plugin section in Awesome Flet, where contributors can showcase and share their plugins. These plugins could be component types, similar to React libraries, with a focus on component libraries in general.

In simpler terms, once this feature is implemented, users will be able to import the flet component library and leverage it for much faster production. This means developers can expedite their development processes and enhance efficiency by utilizing the flet component library.

Objectives:

Your attention to this matter is greatly appreciated.

Thank you.

itsmeadarsh2008 commented 9 months ago

Any Information?

ndonkoHenri commented 9 months ago
  • Implement extension support in the flet project.

What is meant by extension here?

  • Create a dedicated plugin section in Awesome Flet for contributors to showcase and share their extensions.

@xzripper, what do you think of adding this Plugin section in the Awesome flet repo.

  • Enhance the versatility of the flet project.
  • Encourage a more vibrant ecosystem of extensions.

Any suggestions @itsmeadarsh2008 ?

xzripper commented 9 months ago

I like the idea, but I don't understand what is meant by extension

itsmeadarsh2008 commented 9 months ago
  • Implement extension support in the flet project.

What is meant by extension here?

  • Create a dedicated plugin section in Awesome Flet for contributors to showcase and share their extensions.

@xzripper, what do you think of adding this Plugin section in the Awesome flet repo?

  • Enhance the versatility of the flet project.
  • Encourage a more vibrant ecosystem of extensions.

Any suggestions @itsmeadarsh2008 ?

Extensions let you create your custom component library for the flet framework, similar to popular ones for React.js like Next UI (https://nextui.org/), Chakra UI (https://chakra-ui.com/), and Ant Design (https://ant.design/).

You can build beautiful, smooth apps with less code using this extension. If you're an experienced developer familiar with Flutter packages, you can easily bring your packages into the flet environment, just like community-unofficial packages.

For instance, let's say you want a music visualizer in your flet app. A kind developer has already ported the music_visualizer: ^1.0.4 package (https://pub.dev/packages/music_visualizer) from pub.dev to a flet component library. To install, run pip install flet-music-visualizer.

Once installed, integrate it into your code: SAMPLE CODE

import flet as ft
from music_visualizer import music_visualizer

def main(page: ft.Page):
    page.title = "Flet Music Visualizer Example"
    page.vertical_alignment = ft.MainAxisAlignment.CENTER

    # Create a Row with the music visualizer
    row_with_visualizer = ft.Row([
        music_visualizer('/path/to/mp3')
    ])

    # Add the Row to the Page
    page.add(row_with_visualizer)

    # Update the page
    page.update()

# Run the flet app with the main function as the target
ft.app(target=main)

Now, you're ready to elevate your app with the power of the extension, making development simpler and more efficient.

itsmeadarsh2008 commented 9 months ago

To test the UI component libraries we need a sample app with all native components and a configuration file that describes the styles of components. For example BorderRadius, Color, Color scheme etc.

In the above comments. I have mentioned the plugin term and extension interchangeably. Although both terms refer to the same meaning (objective).

itsmeadarsh2008 commented 9 months ago

updates?

ndonkoHenri commented 9 months ago

I like your idea. Flet needs the basic components/controls and for the idea with extensions to be successful, the devs need to be taught how to implement new packages/widgets. With time perhaps...

itsmeadarsh2008 commented 9 months ago

Can you make a sample app with all flet components present for UI development? I can develop a better UI and publish it to the marketplace.