load static method

Future<FluffyThemeData> load(
  1. String themeName
)

Load a theme from the assets by name.

The theme file should be located at assets/themes/$themeName.json.

Implementation

static Future<FluffyThemeData> load(String themeName) async {
  final themeData = await rootBundle.loadString(
    'assets/themes/$themeName.json',
    cache: false,
  );
  final themeJson = jsonDecode(themeData) as Map<String, dynamic>;
  return FluffyThemeData.fromJson(themeJson);
}