Skip to content

Transform Layer is constructed with an invalid matrix #1855

Answered by FeodorFitsner
Klu1d asked this question in Q&A
Discussion options

You must be logged in to vote

OK, found the issue! User control itself must be expanded (self.expand = True):

from flet import (
    Container,
    UserControl,
    Tabs, Tab,
    Page,
    app
)

class Sec(UserControl):
    def build(self):

        self.expand = True
        self.tabs = Tabs(
            animation_duration=300,
            selected_index=0,
            tabs=[
                Tab(text="STORAGE", content=Container(bgcolor='red')),
                Tab(text="FILE", content=Container(bgcolor='blue')),
            ],
            expand=1,
        )
        
        return self.tabs
    

def main(page: Page):

    tol = Sec()
    page.add(tol)

app(target=main)

I have to admit the error is misleading.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@FeodorFitsner
Comment options

@Klu1d
Comment options

@FeodorFitsner
Comment options

@FeodorFitsner
Comment options

Answer selected by Klu1d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
2 participants