Skip to main content
New in Flutter SDK 2.6.0, which needs the 2.6.0 native SDKs.
The native SDKs draw the reward sheet. From 2.6.0 the sheet takes its colors, corners, borders, images, and motion from the Style editor in the publisher portal (when the editor is on for your app) and from the variant, with no code. Your code gives it fonts. The per-component components map of the native SDKs is not in the Flutter SDK.

Give the sheet your fonts

Reference: placement().appearance().
On a placement, appearance() styles that presentation’s sheet: accentColor, backgroundColor, textColor, onAccentColor, and sheet reach it. Values the Style editor sets win, and the last call wins. The native SDK draws the sheet, so it cannot use a font that is only a Flutter asset in pubspec.yaml. Register the font in each native app too:
  • iOS: add the font files to the Runner target and list them under UIAppFonts in ios/Runner/Info.plist. Pass a name UIFont(name:size:) loads, such as the PostScript name.
  • Android: add one .ttf or .otf per family to android/app/src/main/res/font/. The name is looked up as given, then in lowercase with every character outside [a-z0-9_] as _, so 'Playfair Display' finds res/font/playfair_display.ttf.
The Android lookup is by name at run time, so release resource shrinking can remove the fonts. Keep them with android/app/src/main/res/raw/keep.xml:
A name the platform cannot load, or a font in res/font that fails to load, draws the system font, and Android logs a warning. A null or blank name keeps the sheet’s own font. Only a placement’s appearance reaches the sheet. A trigger component’s appearance styles the trigger and ignores sheet.

Styles from the Style editor and motion

Colors, corners, borders, images, and motion that the Style editor sets reach the sheet with no code. A Lottie animation plays only when your app links Lottie (lottie-ios 4.x on iOS, com.airbnb.android:lottie 5.2 or later on Android). Without it, the element draws as it did before 2.6.0.