Theme logo

Theme

Community
EmadBeltaje
theme

Explains and changes this app’s light/dark theme, default theme, colors, ThemeExtensions, and fonts. Use when the user mentions theme, dark mode, light mode, colors, ThemeExtension, fonts, Google Fonts, MyTheme, or MyStyles.

Overview

PublisherEmadBeltaje
Repositoryflutter_getx_template
Skill nametheme
Stars
519
Forks
138
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by EmadBeltaje on GitHub. Read the source before you install it.

Installation

Install the Theme AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/EmadBeltaje/flutter_getx_template/tree/master/.agent/skills/theme
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/EmadBeltaje/flutter_getx_template.git /tmp/flutter_getx_template
mkdir -p .claude/skills
cp -r /tmp/flutter_getx_template/.agent/skills/theme .claude/skills/theme
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Theme in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Theme on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Theme is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Theme

Light and dark palettes live in color classes. MyTheme.getThemeData builds ThemeData. The current mode is stored in shared preferences (default light). Fonts follow the current language family.

How it works

GetMaterialApp wraps the tree with Theme(data: MyTheme.getThemeData(isLight: MySharedPref.getThemeIsLight())).

Toggle (persists, then GetX updates the mode):

dart
MyTheme.changeTheme();

Read current mode (true = light):

dart
bool themeIsLight = MySharedPref.getThemeIsLight();

changeTheme implementation:

dart
static changeTheme() {
  bool isLightTheme = MySharedPref.getThemeIsLight();
  MySharedPref.setThemeIsLight(!isLightTheme);
  Get.changeThemeMode(!isLightTheme ? ThemeMode.light : ThemeMode.dark);
}

Shared-pref default (this is the default theme):

dart
static bool getThemeIsLight() =>
    _sharedPreferences.getBool(_lightThemeKey) ?? true; // true = light, false = dark

Palette files hold colors. MyStyles maps those colors onto AppBarTheme, TextTheme, buttons, chips, list tiles, and custom ThemeExtensions. MyFonts holds sizes (already .sp) and the active fontFamily.

Read colors from Theme.of(context) in widgets (primaryColor, colorScheme, textTheme, extension<...>()). Edit palettes, not widget files, when the user wants a new brand color.

Change theme (runtime)

Add a control that calls MyTheme.changeTheme(). No other files.

Change default theme

In the shared-pref theme getter, set the fallback:

  • light default: ?? true
  • dark default: ?? false

Done when that fallback matches what the user asked.

Colors

Edit both palettes so light and dark stay in sync. Typical slots: primaryColor, accentColor, scaffoldBackgroundColor, appBarColor / appbarColor, bodyTextColor, buttonColor, and any extension colors at the bottom of each palette class.

MyTheme.getThemeData already wires primaryColor, colorScheme, scaffoldBackgroundColor, cardColor, appBarTheme, textTheme, extensions, etc. After palette edits, existing widgets that read Theme.of(context) pick up the new colors.

Add a ThemeExtension

Use this when the user needs widget-specific colors/styles that do not belong on global ThemeData.

1. Extension class at lib/config/theme/theme_extensions/{snake}_theme_data.dart:

dart
import 'package:flutter/material.dart';

class {pascal}ThemeData extends ThemeExtension<{pascal}ThemeData> {
  final Color? backgroundColor;
  final TextStyle? titleTextStyle;

  const {pascal}ThemeData({
    this.backgroundColor,
    this.titleTextStyle,
  });

  @override
  ThemeExtension<{pascal}ThemeData> copyWith({
    Color? backgroundColor,
    TextStyle? titleTextStyle,
  }) {
    return {pascal}ThemeData(
      backgroundColor: backgroundColor ?? this.backgroundColor,
      titleTextStyle: titleTextStyle ?? this.titleTextStyle,
    );
  }

  @override
  {pascal}ThemeData lerp(ThemeExtension<{pascal}ThemeData>? other, double t) {
    if (other is! {pascal}ThemeData) return this;
    return {pascal}ThemeData(
      backgroundColor: Color.lerp(backgroundColor, other.backgroundColor, t),
      titleTextStyle: TextStyle.lerp(titleTextStyle, other.titleTextStyle, t),
    );
  }
}

Add or remove fields to match the request. Keep copyWith and lerp in sync with those fields.

2. Colors on both palettes:

dart
static const Color {name}BackgroundColor = Color(0xFF......);

3. Factory on MyStyles:

dart
static {pascal}ThemeData get{pascal}Theme({required bool isLightTheme}) {
  return {pascal}ThemeData(
    backgroundColor: isLightTheme
        ? LightThemeColors.{name}BackgroundColor
        : DarkThemeColors.{name}BackgroundColor,
    titleTextStyle: MyFonts.bodyTextStyle.copyWith(
      fontSize: MyFonts.bodyMediumSize,
      color: isLightTheme
          ? LightThemeColors.bodyTextColor
          : DarkThemeColors.bodyTextColor,
    ),
  );
}

4. Register in MyTheme.getThemeData extensions: list:

dart
extensions: [
  MyStyles.getHeaderContainerTheme(isLightTheme: isLight),
  MyStyles.getEmployeeListItemTheme(isLightTheme: isLight),
  MyStyles.get{pascal}Theme(isLightTheme: isLight),
]

5. Consume:

dart
final ext = Theme.of(context).extension<{pascal}ThemeData>();
Container(color: ext?.backgroundColor);

Done when the class exists, both palettes have the colors, MyStyles builds it, and MyTheme.extensions includes it.

Fonts

Font family is per language:

dart
static Map<String, TextStyle> supportedLanguagesFontsFamilies = {
  'en': const TextStyle(fontFamily: 'Poppins'),
  'ar': const TextStyle(fontFamily: 'Cairo'),
};

MyFonts.getAppFontType reads that map from the current locale, and text themes copy it.

Change fonts

  1. Ask which language(s) and which family (and weights if given). Default weights to register: Regular, Medium, SemiBold.
  2. Look in assets/fonts/ and under flutter: fonts: in pubspec.yaml for that family.
  3. Files already there → skip download. Register the family in pubspec.yaml if missing, then set fontFamily in supportedLanguagesFontsFamilies for those language codes.
  4. Files missing → ask: download from Google Fonts, or will the user add the files? Do not download until they confirm.
  5. User declines download → stop the font change. Tell them to put .ttf / .otf files in assets/fonts/ first, then ask again.
  6. User confirms download → fetch the family from Google Fonts (GitHub google/fonts or https://fonts.google.com/download?family={Family+Name}), unzip, copy the requested weights into assets/fonts/ using names like {Family}-Regular.ttf. Then register and switch the family map.

pubspec.yaml font block (same shape as existing families):

yaml
  fonts:
    - family: Poppins
      fonts:
        - asset: assets/fonts/Poppins-Regular.ttf
          weight: 300
        - asset: assets/fonts/Poppins-Medium.ttf
          weight: 500
        - asset: assets/fonts/Poppins-SemiBold.ttf
          weight: 700
    - family: {Family}
      fonts:
        - asset: assets/fonts/{Family}-Regular.ttf
          weight: 400
        - asset: assets/fonts/{Family}-Medium.ttf
          weight: 500
        - asset: assets/fonts/{Family}-SemiBold.ttf
          weight: 700

Keep assets/fonts/ listed under flutter: assets:.

Font sizes stay on MyFonts with .sp (example: 18.sp). Change those numbers when the user asks for type scale, not by hardcoding fontSize: 18 in widgets.

Done when the files are on disk, pubspec.yaml lists the family, and supportedLanguagesFontsFamilies uses that family name.

Frequently asked questions

What does the Theme AI skill do?

Explains and changes this app’s light/dark theme, default theme, colors, ThemeExtensions, and fonts. Use when the user mentions theme, dark mode, light mode, colors, ThemeExtension, fonts, Google Fonts, MyTheme, or MyStyles.

Why use Theme on TypingMind?

Because you install it once and use it with any model. Theme is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Theme in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/EmadBeltaje/flutter_getx_template/tree/master/.agent/skills/theme. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Theme?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Theme?

As many as you like. As long as a model supports skills, you can use Theme with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Theme AI skill free?

Yes. It is published on GitHub by EmadBeltaje under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇