Skip to content

CupertinoActivityIndicator

An iOS-style activity indicator that spins clockwise.

ft.CupertinoActivityIndicator(
    radius=30,
    color=ft.CupertinoColors.DARK_BACKGROUND_GRAY,
)

CupertinoActivityIndicator

Basic CupertinoActivityIndicator

Inherits: LayoutControl

Properties

  • animating(bool) –

    Whether this indicator is running its animation.

  • color(ColorValue | None) –

    Defines the color of this indicator.

  • progress(Number | None) –

    Determines the percentage of spinner ticks that will be shown.

  • radius(Number) –

    The radius of this indicator.

Examples#

Live example

Basic Example#

import flet as ft


def main(page: ft.Page):
    page.add(
        ft.CupertinoActivityIndicator(
            animating=True,
            color=ft.Colors.RED,
            radius=50,
        )
    )


ft.run(main)

basic

Properties#

animating class-attribute instance-attribute #

animating: bool = True

Whether this indicator is running its animation.

Note

Has no effect if progress is not None.

color class-attribute instance-attribute #

color: ColorValue | None = None

Defines the color of this indicator.

progress class-attribute instance-attribute #

progress: Number | None = None

Determines the percentage of spinner ticks that will be shown.

Typical usage would display all ticks, however, this allows for more fine-grained control such as during pull-to-refresh when the drag-down action shows one tick at a time as the user continues to drag down.

Note

If not None, then animating will be ignored.

Raises:

  • ValueError

    If it is not between 0.0 and 1.0, inclusive.

radius class-attribute instance-attribute #

radius: Number = 10

The radius of this indicator.

Raises:

  • ValueError

    If it is not strictly greater than 0.