Logo di Theme

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.

Add to TypingMind

Panoramica

Pubblicato daEmadBeltaje
Repositoryflutter_getx_template
Nome della skilltheme
Stelle
519
Fork
138
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da EmadBeltaje su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Theme in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/EmadBeltaje/flutter_getx_template/tree/master/.agent/skills/theme
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Theme in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Theme non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Theme non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Theme su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Theme è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Theme in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/EmadBeltaje/flutter_getx_template/tree/master/.agent/skills/theme. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Theme?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Theme?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Theme: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Theme è gratuita?

Sì. È pubblicata su GitHub da EmadBeltaje con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇