Skip to content

Commit d53230a

Browse files
committed
Rename Icon.name to Icon.icon
1 parent 7ae1bff commit d53230a

File tree

17 files changed

+51
-51
lines changed

17 files changed

+51
-51
lines changed

packages/flet/lib/src/controls/icon.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class IconControl extends StatelessWidget {
2020
return ConstrainedControl(
2121
control: control,
2222
child: Icon(
23-
control.getIconData("name"),
23+
control.getIconData("icon"),
2424
size: control.getDouble("size"),
2525
color: control.getColor("color", context),
2626
blendMode: control.getBlendMode("blend_mode"),

sdk/python/examples/apps/controls-gallery/components/controls_grid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def display(self, control_group):
3232
alignment=ft.MainAxisAlignment.START,
3333
vertical_alignment=ft.MainAxisAlignment.CENTER,
3434
controls=[
35-
ft.Icon(name=ft.Icons.FOLDER_OPEN),
35+
ft.Icon(ft.Icons.FOLDER_OPEN),
3636
ft.Text(
3737
value=grid_item.name,
3838
weight=ft.FontWeight.W_500,

sdk/python/examples/apps/controls-gallery/components/left_navigation_menu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def __init__(self, color, name):
66
super().__init__()
77
self.content = ft.Row(
88
controls=[
9-
ft.Icon(name=ft.Icons.COLOR_LENS_OUTLINED, color=color),
9+
ft.Icon(ft.Icons.COLOR_LENS_OUTLINED, color=color),
1010
ft.Text(name),
1111
],
1212
)

sdk/python/examples/apps/controls-gallery/examples/buttons/elevatedbutton/04_elevatedbuttons_with_custom_content.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ def example():
1010
width=150,
1111
content=ft.Row(
1212
[
13-
ft.Icon(name=ft.Icons.FAVORITE, color="pink"),
14-
ft.Icon(name=ft.Icons.AUDIOTRACK, color="green"),
15-
ft.Icon(name=ft.Icons.BEACH_ACCESS, color="blue"),
13+
ft.Icon(ft.Icons.FAVORITE, color="pink"),
14+
ft.Icon(ft.Icons.AUDIOTRACK, color="green"),
15+
ft.Icon(ft.Icons.BEACH_ACCESS, color="blue"),
1616
],
1717
alignment=ft.MainAxisAlignment.SPACE_AROUND,
1818
),

sdk/python/examples/apps/controls-gallery/examples/buttons/outlinedbutton/04_outlinedbuttons_with_custom_content.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ def example():
1010
width=150,
1111
content=ft.Row(
1212
[
13-
ft.Icon(name=ft.Icons.FAVORITE, color="pink"),
14-
ft.Icon(name=ft.Icons.AUDIOTRACK, color="green"),
15-
ft.Icon(name=ft.Icons.BEACH_ACCESS, color="blue"),
13+
ft.Icon(ft.Icons.FAVORITE, color="pink"),
14+
ft.Icon(ft.Icons.AUDIOTRACK, color="green"),
15+
ft.Icon(ft.Icons.BEACH_ACCESS, color="blue"),
1616
],
1717
alignment=ft.MainAxisAlignment.SPACE_AROUND,
1818
),

sdk/python/examples/apps/controls-gallery/examples/buttons/textbutton/04_textbuttons_with_custom_content.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ def example():
1010
width=150,
1111
content=ft.Row(
1212
[
13-
ft.Icon(name=ft.Icons.FAVORITE, color="pink"),
14-
ft.Icon(name=ft.Icons.AUDIOTRACK, color="green"),
15-
ft.Icon(name=ft.Icons.BEACH_ACCESS, color="blue"),
13+
ft.Icon(ft.Icons.FAVORITE, color="pink"),
14+
ft.Icon(ft.Icons.AUDIOTRACK, color="green"),
15+
ft.Icon(ft.Icons.BEACH_ACCESS, color="blue"),
1616
],
1717
alignment=ft.MainAxisAlignment.SPACE_AROUND,
1818
),

sdk/python/examples/apps/controls-gallery/examples/displays/icon/01_icons_with_different_colors_and_sizes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
def example():
77
return ft.Row(
88
[
9-
ft.Icon(name=ft.Icons.FAVORITE, color=ft.Colors.PINK),
10-
ft.Icon(name=ft.Icons.AUDIOTRACK, color=ft.Colors.GREEN_400, size=30),
11-
ft.Icon(name=ft.Icons.BEACH_ACCESS, color=ft.Colors.BLUE, size=50),
12-
ft.Icon(name="settings", color="#c1c1c1"),
9+
ft.Icon(ft.Icons.FAVORITE, color=ft.Colors.PINK),
10+
ft.Icon(ft.Icons.AUDIOTRACK, color=ft.Colors.GREEN_400, size=30),
11+
ft.Icon(ft.Icons.BEACH_ACCESS, color=ft.Colors.BLUE, size=50),
12+
ft.Icon(ft.Icons.SETTINGS, color="#c1c1c1"),
1313
]
1414
)

sdk/python/examples/apps/controls-gallery/examples/layout/cupertinolisttile/01_cupertinolisttile_example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ def tile_clicked(e):
1212
ft.CupertinoListTile(
1313
additional_info=ft.Text("Wed Jan 24"),
1414
bgcolor_activated=ft.Colors.AMBER_ACCENT,
15-
leading=ft.Icon(name=ft.CupertinoIcons.GAME_CONTROLLER),
15+
leading=ft.Icon(ft.CupertinoIcons.GAME_CONTROLLER),
1616
title=ft.Text("CupertinoListTile not notched"),
1717
subtitle=ft.Text("Subtitle"),
18-
trailing=ft.Icon(name=ft.CupertinoIcons.ALARM),
18+
trailing=ft.Icon(ft.CupertinoIcons.ALARM),
1919
on_click=tile_clicked,
2020
),
2121
ft.CupertinoListTile(
2222
notched=True,
2323
additional_info=ft.Text("Thu Jan 25"),
24-
leading=ft.Icon(name=ft.CupertinoIcons.GAME_CONTROLLER),
24+
leading=ft.Icon(ft.CupertinoIcons.GAME_CONTROLLER),
2525
title=ft.Text("CupertinoListTile notched"),
2626
subtitle=ft.Text("Subtitle"),
27-
trailing=ft.Icon(name=ft.CupertinoIcons.ALARM),
27+
trailing=ft.Icon(ft.CupertinoIcons.ALARM),
2828
on_click=tile_clicked,
2929
),
3030
]

sdk/python/examples/controls/cupertino_button/basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ def main(page: ft.Page):
2828
content=ft.Text("Disabled CupertinoButton"),
2929
),
3030
ft.ElevatedButton(
31-
adaptive=True, # a CupertinoButton will be rendered when running on apple-platform
31+
adaptive=True,
3232
bgcolor=ft.CupertinoColors.SYSTEM_TEAL,
3333
content=ft.Row(
3434
tight=True,
3535
controls=[
36-
ft.Icon(name=ft.Icons.FAVORITE, color="pink"),
36+
ft.Icon(ft.Icons.FAVORITE, color="pink"),
3737
ft.Text("ElevatedButton+adaptive"),
3838
],
3939
),

sdk/python/examples/controls/cupertino_list_tile/notched.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ def handle_tile_click(e: ft.Event[ft.CupertinoListTile]):
99
ft.CupertinoListTile(
1010
additional_info=ft.Text("Wed Jan 24"),
1111
bgcolor_activated=ft.Colors.AMBER_ACCENT,
12-
leading=ft.Icon(name=ft.CupertinoIcons.GAME_CONTROLLER),
12+
leading=ft.Icon(ft.CupertinoIcons.GAME_CONTROLLER),
1313
title=ft.Text("CupertinoListTile: notched = False"),
1414
subtitle=ft.Text("Subtitle"),
15-
trailing=ft.Icon(name=ft.CupertinoIcons.ALARM),
15+
trailing=ft.Icon(ft.CupertinoIcons.ALARM),
1616
on_click=handle_tile_click,
1717
),
1818
ft.CupertinoListTile(
1919
notched=True,
2020
additional_info=ft.Text("Thu Jan 25"),
21-
leading=ft.Icon(name=ft.CupertinoIcons.GAME_CONTROLLER),
21+
leading=ft.Icon(ft.CupertinoIcons.GAME_CONTROLLER),
2222
title=ft.Text("CupertinoListTile: notched = True"),
2323
subtitle=ft.Text("Subtitle"),
24-
trailing=ft.Icon(name=ft.CupertinoIcons.ALARM),
24+
trailing=ft.Icon(ft.CupertinoIcons.ALARM),
2525
on_click=handle_tile_click,
2626
),
2727
)

0 commit comments

Comments
 (0)