Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

A modern UI library built with Flet featuring a range of customized components.

License

NotificationsYou must be signed in to change notification settings

LineIndent/material_design_flet

Repository files navigation

Flet Material Library

A UI library for Flet



BuildDownloadsPython Package IndexPyPI - Python Version

Docs

Modernize your websites and applications by implementing customized Flet controls that improve user experience and overall visual quality. The UI components are flexible and aligned with current design trends.

1. Installation

To use Flet Material, you need to have the following installed:

  • Latest version of Flet
  • Python 3.5+

If you don't have Flet installed, installing Flet Material automatically installs it for you. You can install Flet Material using the following command:

$ pip install flet-material

2. Application Setup

After installing Flet Material, you can test if it's working properly by running the following code snippet:

importfletasftimportflet_materialasfmfm.Theme.set_theme(theme="teal")defmain(page:ft.Page):page.bgcolor=fm.Theme.bgcolorpage.horizontal_alignment="center"page.vertical_alignment="center"button=fm.Buttons(width=220,height=55,title="Give this repo a star!",   )page.add(button)page.update()if__name__=="__main__":ft.flet.app(target=main)

If the package was installed correctly, you should see a centered and customized button.

3. Code Breakdown

The script is similar to the basic Flet application setup, with some minor additions.

At the top of the main file, you need to import the Flet Material library and all its components:

importflet_materialasfm

Below the imported modules is the Theme instance from Flet Material. It sets up the entire application theme so that all colors, primary and accent, are uniform, giving the applications being built a consistent look and feel. For a list of supported theme colors, you can visit the library's documentation online.

For a list of supported theme colors, you can visit the library's documentation online.

fm.Theme.set_theme(theme="teal")

Finally, within the main() method, you can use a new control called fm.Buttons(), which inherits its properties from several Flet classes and can be customized to your liking:

button=fm.Buttons(width=220,height=55,title="Give this repo a star!",)

That's it! You now have access to Flet Material library components!

Contributing

Contributions are highly encouraged and welcomed. Check out thecontributon section of the documentation for more details.

License

Flet Material Library is open-source and licensed under theMIT License.

About

A modern UI library built with Flet featuring a range of customized components.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp