Skip to content

Feat: implement font display and update with skin updates - #11

Merged
koukibadr merged 4 commits into
mainfrom
feat/skin/implement-font-management
Aug 10, 2026
Merged

Feat: implement font display and update with skin updates#11
koukibadr merged 4 commits into
mainfrom
feat/skin/implement-font-management

Conversation

@koukibadr

@koukibadr koukibadr commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Remote themes can now specify and apply a font family throughout the app.
    • Added support for configuring bundled Open Sans and Roboto fonts in the example app.
    • Exposed the currently active theme font for app integrations.
  • Style

    • Refined app bar and movie dialog typography.
    • Updated dialog action styling with improved theme-based colors and spacing.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@koukibadr, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3e8755bb-04b3-46fd-bd82-a449de03957f

📥 Commits

Reviewing files that changed from the base of the PR and between 64483ee and afb5a57.

📒 Files selected for processing (3)
  • example/lib/pages/home_page.dart
  • lib/flutter_skin.dart
  • lib/models/skin_model.dart
📝 Walkthrough

Walkthrough

The PR adds remote font-family support to SkinModel and ThemeData. It exposes the active font through FlutterSkin, enables bundled example fonts, changes the example API key, and updates dialog styling.

Changes

Font theme support and example integration

Layer / File(s) Summary
Remote font theme pipeline
lib/models/skin_model.dart, lib/flutter_skin.dart, lib/remote/fskin_remote_config.dart
SkinModel parses the remote font value. FlutterSkin.themeFont exposes it, and ThemeData applies the configured font family.
Example configuration and UI updates
example/pubspec.yaml, example/lib/main.dart, example/lib/pages/home_page.dart
The example enables OpenSans and Roboto assets, changes the API key, reformats text styles, and replaces the dialog close button with a custom container.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A bunny found a font in the stream,
And placed it in the theme’s bright scheme.
“Close” now wears colors neat,
While OpenSans hops on tiny feet.
The skin grows stylish, soft, and clean.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main changes: font support and updates to the skin configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@example/lib/pages/home_page.dart`:
- Around line 210-228: Raise the Flutter SDK lower bound in pubspec.yaml above
the version that introduced ColorScheme.tertiaryContainer and
onTertiaryContainer, keeping the constraint consistent with the roles used by
the Close button in the surrounding widget.

In `@lib/models/skin_model.dart`:
- Line 29: Remove the unconditional full-map print from SkinModel.fromMap in
lib/models/skin_model.dart, replacing it with controlled redacted diagnostics
only if needed; also remove or debug-gate the per-tap color print in
example/lib/pages/home_page.dart lines 211-213.

In `@lib/remote/fskin_remote_config.dart`:
- Around line 74-78: Update the ThemeData emitted by the skin change stream in
FlutterSkin.onSkinChanged to include the cached configuration’s fontFamily
alongside colorScheme, matching FlutterSkin.toThemeData(). Add or update a
stream test to verify emitted ThemeData.fontFamily reflects remote font changes.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cdde5cb6-83b5-4daf-9b69-3ecc7e25b8bd

📥 Commits

Reviewing files that changed from the base of the PR and between b770fdd and 64483ee.

⛔ Files ignored due to path filters (2)
  • example/assets/fonts/opensans.ttf is excluded by !**/*.ttf
  • example/assets/fonts/robotomono.ttf is excluded by !**/*.ttf
📒 Files selected for processing (6)
  • example/lib/main.dart
  • example/lib/pages/home_page.dart
  • example/pubspec.yaml
  • lib/flutter_skin.dart
  • lib/models/skin_model.dart
  • lib/remote/fskin_remote_config.dart

Comment on lines +210 to 228
onPressed: () {
print(
'onTertiaryContainer: ${Theme.of(context).colorScheme.onTertiaryContainer}',
);
Navigator.pop(context);
},
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.tertiaryContainer,
borderRadius: BorderRadius.circular(4),
),
child: Text(
'Close',
style: TextStyle(
color: Theme.of(context).colorScheme.onTertiaryContainer,
),
),
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 2 \
  'environment:|sdk:|flutter:|flutter-version|channel:' \
  --glob 'pubspec.yaml' \
  --glob 'pubspec.lock' \
  --glob '.fvmrc' \
  --glob 'fvm_config.json' \
  --glob '*.yml' \
  --glob '*.yaml' \
  . || true

Repository: koukibadr/flutter_skin

Length of output: 2047


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Repository SDK declarations:\n'
rg -n 'environment:|sdk:|flutter:|packageInfo|flutter_version|minimum_supported|requires_flutter|pubspec' \
  --glob 'pubspec.yaml' --glob 'README.md' --glob '.github/**' --glob 'analysis_options.yaml' . || true

printf '\nRelevant home_page.dart section:\n'
wc -l example/lib/pages/home_page.dart
sed -n '180,245p' example/lib/pages/home_page.dart

printf '\nFind ColorScheme.tertiaryContainer usages:\n'
rg -n 'onTertiaryContainer|tertiaryContainer' . || true

Repository: koukibadr/flutter_skin

Length of output: 3019


Keep the Flutter lower bound consistent with the new color roles.

tertiaryContainer and onTertiaryContainer require a Flutter version newer than >=1.17.0, but pubspec.yaml still declares that lower bound and allows clients to run with an unsupported SDK. Raise the flutter constraint above the version that introduced these ColorScheme roles.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@example/lib/pages/home_page.dart` around lines 210 - 228, Raise the Flutter
SDK lower bound in pubspec.yaml above the version that introduced
ColorScheme.tertiaryContainer and onTertiaryContainer, keeping the constraint
consistent with the roles used by the Close button in the surrounding widget.

Source: MCP tools

Comment thread lib/models/skin_model.dart Outdated
Comment thread lib/remote/fskin_remote_config.dart Outdated
@koukibadr
koukibadr merged commit 8185aeb into main Aug 10, 2026
4 checks passed
@koukibadr
koukibadr deleted the feat/skin/implement-font-management branch August 10, 2026 09:58
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.

1 participant