22
33from beartype import beartype
44
5- from flet .control import Control , OptionalNumber
5+ from flet .constrained_control import ConstrainedControl
6+ from flet .control import OptionalNumber
67from flet .ref import Ref
8+ from flet .types import AnimationValue , OffsetValue , RotateValue , ScaleValue
79
810
9- class Icon (Control ):
11+ class Icon (ConstrainedControl ):
1012 def __init__ (
1113 self ,
1214 name : Optional [str ] = None ,
1315 ref : Optional [Ref ] = None ,
1416 expand : Union [None , bool , int ] = None ,
1517 opacity : OptionalNumber = None ,
18+ rotate : RotateValue = None ,
19+ scale : ScaleValue = None ,
20+ offset : OffsetValue = None ,
21+ animate_opacity : AnimationValue = None ,
22+ animate_size : AnimationValue = None ,
23+ animate_position : AnimationValue = None ,
24+ animate_rotation : AnimationValue = None ,
25+ animate_scale : AnimationValue = None ,
26+ animate_offset : AnimationValue = None ,
1627 tooltip : Optional [str ] = None ,
1728 visible : Optional [bool ] = None ,
1829 disabled : Optional [bool ] = None ,
@@ -24,11 +35,20 @@ def __init__(
2435 size : OptionalNumber = None ,
2536 ):
2637
27- Control .__init__ (
38+ ConstrainedControl .__init__ (
2839 self ,
2940 ref = ref ,
3041 expand = expand ,
3142 opacity = opacity ,
43+ rotate = rotate ,
44+ scale = scale ,
45+ offset = offset ,
46+ animate_opacity = animate_opacity ,
47+ animate_size = animate_size ,
48+ animate_position = animate_position ,
49+ animate_rotation = animate_rotation ,
50+ animate_scale = animate_scale ,
51+ animate_offset = animate_offset ,
3252 tooltip = tooltip ,
3353 visible = visible ,
3454 disabled = disabled ,
0 commit comments