diff --git a/.gitignore b/.gitignore index 81229367..80dc01d9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .DS_Store .vscode/ .venv/ +.idea/ diff --git a/python/apps/controls-gallery/input/cupertinotextfield/01_cupertino_textfield_example.py b/python/apps/controls-gallery/input/cupertinotextfield/01_cupertino_textfield_example.py new file mode 100644 index 00000000..f65cfb03 --- /dev/null +++ b/python/apps/controls-gallery/input/cupertinotextfield/01_cupertino_textfield_example.py @@ -0,0 +1,20 @@ +import flet as ft + +name = "CupertinoTextField example" + + +def example(): + t1 = ft.CupertinoTextField( + placeholder_text="Enter text here", + ) + + t2 = ft.CupertinoTextField( + bgcolor=ft.colors.BLUE_100, + shadow=ft.BoxShadow(color=ft.colors.RED_400, blur_radius=5, spread_radius=5), + placeholder_text="Enter text here", + placeholder_style=ft.TextStyle(color=ft.colors.GREEN_300, italic=True), + suffix=ft.Icon(ft.icons.EDIT), + suffix_visibility_mode=ft.VisibilityMode.EDITING, + ) + + return ft.Column(controls=[t1, t2]) diff --git a/python/apps/controls-gallery/input/cupertinotextfield/index.py b/python/apps/controls-gallery/input/cupertinotextfield/index.py new file mode 100644 index 00000000..395999d5 --- /dev/null +++ b/python/apps/controls-gallery/input/cupertinotextfield/index.py @@ -0,0 +1,2 @@ +name = "CupertinoTextField" +description = """An iOS-style text field."""