Littlefish Core Theming

The core theme engine for Littlefish Flutter applications. This package manages theme initialisation, configuration loading, and coordination between the configuration service and concrete theming providers (such as littlefish_theming_m3).

Features

  • Centralised ThemeManager singleton for application-wide theme state
  • Loads theme settings from the Littlefish configuration service or falls back to provider defaults
  • Delegates design-token translation and ThemeData generation to a registered LittleFishThemingService provider
  • Provides light and dark theme support via the active provider

Getting Started

Prerequisites

  • Flutter SDK >=3.35.0
  • littlefish_core registered and initialised (configuration, auth, and logging services)
  • A concrete theming provider (e.g. littlefish_theming_m3) registered with LittleFishCore

Installation

Add the package to your pubspec.yaml:

dependencies:
  littlefish_core_theming: ^0.0.3

Then run:

flutter pub get

Usage

Import and initialise the theme manager after the core services are ready:

import 'package:littlefish_core_theming/theme_manager.dart';

final themeManager = ThemeManager();

final settings = await themeManager.initialise();

final themeData = await themeManager.getAppTheme();

Use the resulting ThemeData with your MaterialApp:

MaterialApp(
  theme: themeData,
);

Architecture

littlefish_core_theming acts as the abstract orchestration layer in the Littlefish theming stack:

Package Role
littlefish_core_theming Theme manager, configuration loading, provider coordination
littlefish_theming_m3 Material 3 concrete provider — token translation and ThemeData generation

Concrete providers implement LittleFishThemingService (defined in littlefish_core) and are registered via the Root Composition pattern at application startup.

License

This project is licensed under the LittleFish Company License. See the LICENSE file for details.