feat: setup google font support to update app theme - #12
Conversation
|
Warning Review limit reached
Next review available in: 49 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 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds Google font support to ChangesGoogle font theme support
Example configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant SkinModel
participant FlutterSkin
participant google_fonts
participant ThemeData
SkinModel->>FlutterSkin: provide fontFamily and googleFont
FlutterSkin->>google_fonts: resolve googleFont
google_fonts-->>FlutterSkin: return font family
FlutterSkin->>ThemeData: create theme with selected font
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@lib/flutter_skin.dart`:
- Around line 106-112: Update the remote theme construction around ThemeData so
the fallbackTheme decision occurs before evaluating the fontFamily expression.
When colors is null and fallbackTheme is provided, return or use the fallback
theme without invoking GoogleFonts.getFont; only resolve the remote font for
paths that actually construct the remote theme.
- Around line 106-112: Update the ThemeData construction in
lib/flutter_skin.dart to apply the selected Google font across the full text
theme using GoogleFonts.getTextTheme and the base theme’s textTheme, rather than
assigning only GoogleFonts.getFont(...).fontFamily. Preserve the existing
fontFamily override and fallback font selection behavior.
- Around line 94-112: The font selection in toThemeData must validate dynamic
names before calling GoogleFonts.getFont. Trim googleFont and fallbackFont,
select the first candidate present in GoogleFonts.asMap(), and use Roboto when
neither is supported, preserving the existing fontFamily override behavior.
In `@pubspec.yaml`:
- Line 18: Update the Flutter SDK constraint in pubspec.yaml to a lower bound of
>=3.38.0 to satisfy google_fonts ^8.2.1, or downgrade google_fonts to a release
compatible with the existing >=1.17.0 constraint.
🪄 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: 56cfff62-3a68-4a94-b42f-41872c19abd6
📒 Files selected for processing (4)
example/lib/main.dartlib/flutter_skin.dartlib/models/skin_model.dartpubspec.yaml
2777917 to
952e317
Compare
Summary by CodeRabbit
New Features
Improvements