feat(store): Play feature graphic (1024x500) generator
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
// lib/ui/branding/feature_graphic_painter.dart
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'app_icon_painter.dart';
|
||||
|
||||
/// Paints the Play feature graphic (1024×500): navy field, the brand blocks on
|
||||
/// the left, wordmark + tagline on the right.
|
||||
class FeatureGraphic {
|
||||
static void paint(Canvas canvas, Size size) {
|
||||
final rect = Offset.zero & size;
|
||||
AppIconMark.paintBackground(canvas, rect);
|
||||
|
||||
// Blocks on the left, vertically centered.
|
||||
canvas.save();
|
||||
final blockArea = size.height * 0.74;
|
||||
canvas.translate(size.height * 0.16, (size.height - blockArea) / 2);
|
||||
AppIconMark.paintBlocks(canvas, blockArea, groupFraction: 0.92);
|
||||
canvas.restore();
|
||||
|
||||
void text(String s, double dy, double fontSize, FontWeight w, Color c) {
|
||||
final tp = TextPainter(
|
||||
text: TextSpan(
|
||||
text: s,
|
||||
style: TextStyle(
|
||||
color: c, fontSize: fontSize, fontWeight: w, letterSpacing: 0.5),
|
||||
),
|
||||
textDirection: TextDirection.ltr,
|
||||
)..layout();
|
||||
tp.paint(canvas, Offset(size.height * 1.02, dy));
|
||||
}
|
||||
|
||||
text('Block Seasons', size.height * 0.34, 76, FontWeight.w900, Colors.white);
|
||||
text('A new season of blocks every few weeks.', size.height * 0.50, 30,
|
||||
FontWeight.w500, const Color(0xFFB9C4E6));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user