NACCWidgetBundle

@main
@MainActor
struct NACCWidgetBundle : WidgetBundle

This file implements a user-configurable widget that displays the cleantime set in the main app.

The display can be just the textual cleantime report, the highest keytag collected, or keytags (before 1 year), and medallions (after one year).

It can also combine the text with the keytag, by displaying the systemMedium family variant. If we display the systemSmall variant, then it can only be one of the above choices.

The widget dynamically adjusts to whatever cleantime is set in the main app, and updates in realtime.

The widget will, by default, display against a yellow gradient (the same one in the app icon), but that can be switched off, in the widget configuration, to use the standard color theme.

  • We just make a widget instance for the body.

    Declaration

    Swift

    @MainActor
    var body: some Widget { get }