Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

canot import vector from flet #107

Open
bobwatcherx opened this issue Dec 16, 2023 · 3 comments
Open

canot import vector from flet #107

bobwatcherx opened this issue Dec 16, 2023 · 3 comments

Comments

@bobwatcherx
Copy link

i try you sample floating action button menu

but error no found package vector

Traceback (most recent call last):
File "C:\Users\LENOVO\Pictures\fletapp\flet2\main.py", line 4, in
from fab import AnimatedMenuButton, MenuItem
File "C:\Users\LENOVO\Pictures\fletapp\flet2\fab.py", line 9, in
from flet import (
ImportError: cannot import name 'Vector' from 'flet' (C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\flet_init_.py)

@bobwatcherx
Copy link
Author

@leo-smi
Copy link

leo-smi commented Sep 9, 2024

up

@non-npc
Copy link
Contributor

non-npc commented Sep 12, 2024

You can get it working by importing the vector properly. There are other issues with the example however that I do not have time to resolve at the moment (Error displaying ElevatedButton),

Here is the code to import the vector properly

`import math
import threading
import time
from dataclasses import dataclass, field
from typing import Callable, Optional

import flet
from beartype.typing import List
from flet import (
ButtonStyle,
ClipBehavior,
Container,
ElevatedButton,
FilledButton,
Page,
Stack,
colors,
icons,
)
from flet_core.utils import Vector`

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

No branches or pull requests

3 participants