Skip to content
Discussion options

You must be logged in to vote

Could be modified as follows (https://flet.dev/docs/getting-started/custom-controls):

from typing import Callable

from flet import (
    AlertDialog,
    Column,
    ControlEvent,
    CrossAxisAlignment,
    MainAxisAlignment,
    Page,
    Radio,
    RadioGroup,
    Text,
    TextAlign,
    TextThemeStyle,
    ThemeMode,
    UserControl,
)

from utils import Preference


class ChooseThemeDialog(AlertDialog):
    def __init__(self, page: Page, callback: Callable[[], None]):
        super().__init__()
        self.pref = Preference(page)
        self.page = page
        self.callback = callback

        self.title = Text(
            value="app theme".title(),
            theme_style=Text…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@thetrotfreak
Comment options

Comment options

You must be logged in to vote
1 reply
@thetrotfreak
Comment options

Answer selected by thetrotfreak
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
3 participants