Files
petitspas/frontend/lib/models/card_assets.dart
T
jmartinandCursor 42163826fe fix(#173): 9-slice manuel avec coins à taille logique fixe
Remplace DecorationImage.centerSlice (inopérant si bulle trop
basse) par un peintre 9 zones : coins fixes, centre extensible.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 17:10:40 +02:00

36 lines
1.1 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:flutter/material.dart';
enum CardColorVertical {
red('assets/cards/card_red.png'),
pink('assets/cards/card_pink.png'),
peach('assets/cards/card_peach.png'),
lime('assets/cards/card_lime.png'),
lavender('assets/cards/card_lavender.png'),
green('assets/cards/card_green.png'),
blue('assets/cards/card_blue.png');
final String path;
const CardColorVertical(this.path);
}
enum CardColorHorizontal {
red('assets/cards/card_red_h.png'),
pink('assets/cards/card_pink_h.png'),
peach('assets/cards/card_peach_h.png'),
lime('assets/cards/card_lime_h.png'),
lavender('assets/cards/card_lavender_h.png'),
green('assets/cards/card_green_h.png'),
blue('assets/cards/card_blue_h.png');
final String path;
const CardColorHorizontal(this.path);
/// Zone centrale extensible en pixels source (~1024×512).
/// Coins source ≈ 160×90 — mappés ensuite à une taille logique fixe.
static const Rect centerSlice = Rect.fromLTRB(160, 90, 864, 422);
/// Taille logique des coins (indépendante de la largeur d’écran).
static const double cornerWidth = 56;
static const double cornerHeight = 40;
}