From 7073ce67e5f87c37e0920faf78cd2669baae7e59 Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Sat, 27 Jan 2024 02:05:18 +0100 Subject: [PATCH] CupertinoTextField --- .gitignore | 1 + .../01_cupertino_textfield_example.py | 20 +++++++++++++++++++ .../input/cupertinotextfield/index.py | 2 ++ 3 files changed, 23 insertions(+) create mode 100644 python/apps/controls-gallery/input/cupertinotextfield/01_cupertino_textfield_example.py create mode 100644 python/apps/controls-gallery/input/cupertinotextfield/index.py 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."""