Commit bc12a8c
authored
Audio dispose fix (#5893)
* Add resource cleanup in audio and component classes
Dispose of the audio player in AudioService and clear hooks in Component on unmount to ensure proper resource management and prevent potential memory leaks.
* Refactor flashlight service to remove custom exceptions
Removed custom exception classes and error handling from the flet-flashlight Python and Dart implementations. The Flashlight service methods now directly invoke platform methods without raising or returning custom errors. Updated example usage and cleaned up related imports and documentation.
* Rename Flashlight methods to 'on' and 'off'
Changed method names from 'turn_on' and 'turn_off' to 'on' and 'off' in the Flashlight class and updated example usage accordingly for consistency and brevity.
* Await clipboard setData operation
Added 'await' to Clipboard.setData in ClipboardService to ensure the operation completes before proceeding. This improves reliability when setting clipboard data asynchronously.
* Replace ElevatedButton with Button in example
Updated the flashlight example to use ft.Button instead of ft.ElevatedButton for consistency or UI preference.
* Remove Flashlight exception docs and nav entries
Deleted documentation files for Flashlight exception classes and removed their references from the mkdocs navigation and the index page. This streamlines the documentation by eliminating detailed exception class pages for Flashlight.1 parent 0441768 commit bc12a8c
File tree
18 files changed
+21
-237
lines changed- packages/flet/lib/src/services
- sdk/python
- examples/services
- audio
- flashlight
- packages
- flet-audio/src/flutter/flet_audio/lib/src
- flet-flashlight/src
- flet_flashlight
- flutter/flet_flashlight/lib/src
- flet
- docs/flashlight
- exceptions
- src/flet/components
18 files changed
+21
-237
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
9 | 8 | | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
Lines changed: 0 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 1 | | |
11 | 2 | | |
12 | 3 | | |
13 | 4 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 5 | | |
Lines changed: 0 additions & 65 deletions
This file was deleted.
Lines changed: 5 additions & 66 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 3 | | |
16 | 4 | | |
17 | 5 | | |
| |||
21 | 9 | | |
22 | 10 | | |
23 | 11 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 12 | + | |
38 | 13 | | |
39 | 14 | | |
40 | 15 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 16 | + | |
53 | 17 | | |
54 | | - | |
| 18 | + | |
55 | 19 | | |
56 | 20 | | |
57 | 21 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 22 | + | |
79 | 23 | | |
80 | 24 | | |
81 | 25 | | |
82 | 26 | | |
83 | 27 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 28 | + | |
Lines changed: 3 additions & 64 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 20 | + | |
46 | 21 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 22 | + | |
72 | 23 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 24 | + | |
86 | 25 | | |
87 | 26 | | |
88 | 27 | | |
| |||
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
0 commit comments