Skip to content

feat: Add textTheme parameter to flutterNesTheme()#247

Merged
erickzanardo merged 3 commits into
erickzanardo:mainfrom
kyungilcho:feat/custom-text-theme
Mar 10, 2026
Merged

feat: Add textTheme parameter to flutterNesTheme()#247
erickzanardo merged 3 commits into
erickzanardo:mainfrom
kyungilcho:feat/custom-text-theme

Conversation

@kyungilcho

Copy link
Copy Markdown
Contributor

Closes #246

Adds an optional TextTheme? textTheme parameter to flutterNesTheme().

When provided, it replaces the default Press Start 2P text theme, enabling non-Latin locales to use custom pixel fonts while ensuring all internal theme derivations use the correct font.

Changes

  • Added TextTheme? textTheme parameter to flutterNesTheme()
  • Internal variable renamed to resolvedTextTheme to avoid shadowing
  • No breaking changes — default behavior preserved when parameter is omitted

Add an optional TextTheme parameter to allow overriding the default
Press Start 2P font for non-Latin locales.

Closes erickzanardo#246

@erickzanardo erickzanardo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kyungilcho can you add an entry to the CHANGELOG.md file?

Also left a very nit comment, other than that looks great! Once we address these two things I will merge a push a new version on pub!

Comment thread lib/src/theme.dart Outdated
/// Creates a Flutter Nes [ThemeData].
///
/// Use [textTheme] to override the default Press Start 2P font
/// for non-Latin locales.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// for non-Latin locales.
/// for non-Latin locales or just to use a different, custom `TextTheme`.

@kyungilcho

Copy link
Copy Markdown
Contributor Author

Updated! Added the CHANGELOG entry under 0.29.0 and applied the doc comment suggestion. Thanks for the review!

@erickzanardo erickzanardo merged commit 727fd64 into erickzanardo:main Mar 10, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add customTextTheme parameter to flutterNesTheme() for non-Latin locale support

2 participants