Returns the normalized platform identifier used by Flet. Returns: One of: `windows`, `linux`, or `darwin`. Raises: :class:`~flet.FletUnsupportedPlatformException`: If the current platform is unsupported.
()
| 145 | |
| 146 | |
| 147 | def get_platform(): |
| 148 | """ |
| 149 | Returns the normalized platform identifier used by Flet. |
| 150 | |
| 151 | Returns: |
| 152 | One of: `windows`, `linux`, or `darwin`. |
| 153 | |
| 154 | Raises: |
| 155 | :class:`~flet.FletUnsupportedPlatformException`: If the current platform is |
| 156 | unsupported. |
| 157 | """ |
| 158 | p = platform.system() if not is_mobile() else "" |
| 159 | if is_windows(): |
| 160 | return "windows" |
| 161 | elif p == "Linux": |
| 162 | return "linux" |
| 163 | elif p == "Darwin": |
| 164 | return "darwin" |
| 165 | else: |
| 166 | raise FletUnsupportedPlatformException(f"Unsupported platform: {p}") |
| 167 | |
| 168 | |
| 169 | def get_arch(): |
nothing calls this directly
no test coverage detected