Skip to content

Conversation

@ZeroCool940711
Copy link
Contributor

Added missing imports for flet.icons and flet.colors, because these imports were missing the only way to use them was to call them directly or importing them directly from the app we are building, this would cause that when using something like:

from flet import icons, colors

icons.PALETTE
colors.BLACK

the code would work but when just importing flet and using those items from flet directly it would cause an error as they would not be found inside flet, so, the following code would cause an error:

import flet

flet.icons.PALETTE 
flet.colors.BLACK

After adding the import to the __init__.py script the second example would then work as normal as well as the first one.

Added missing imports for `flet.icons` and `flet.colors`, because these imports were missing the only way to use them was to call them directly or importing them directly from the app we are building, this would cause that when using something like 
```
from flet import icons, colors

icons.PALETTE
colors.BLACK
```
on this example the code would work but when just importing flet and using those items from flet directly it would cause an error as they would not be found inside flet, so, the following code would cause an error
```
import flet

flet.icons.PALETTE 
flet.colors.BLACK
```
After adding the import to the `__init__.py` script the second example would then work as normal as well as the first one.
@CLAassistant
Copy link

CLAassistant commented Nov 6, 2022

CLA assistant check
All committers have signed the CLA.

@FeodorFitsner FeodorFitsner merged commit 821e34a into flet-dev:main Nov 7, 2022
@ZeroCool940711 ZeroCool940711 deleted the patch-1 branch November 7, 2022 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants