feat: tela de apps com logos/menu de exclusao, correcao de tema nas mini apps e sidebar de navegacao
This commit is contained in:
@@ -71,11 +71,20 @@ class MiniappBridge {
|
||||
}
|
||||
|
||||
/// Builds the theme palette map sent to mini apps. Colors are serialized as
|
||||
/// `#AARRGGBB` hex strings so they can be used directly in CSS/JS.
|
||||
static Map<String, Object?> buildPalette(ColorScheme scheme, Brightness brightness) {
|
||||
/// `#RRGGBBAA` hex strings (CSS 8-digit order) so they can be used directly
|
||||
/// in CSS/JS.
|
||||
static Map<String, Object?> buildPalette(
|
||||
ColorScheme scheme,
|
||||
Brightness brightness,
|
||||
) {
|
||||
String hex(Color c) {
|
||||
final value = c.toARGB32();
|
||||
return '#${value.toRadixString(16).padLeft(8, '0').toUpperCase()}';
|
||||
final rgb = value & 0xFFFFFF;
|
||||
final alpha = (value >> 24) & 0xFF;
|
||||
return '#${rgb
|
||||
.toRadixString(16)
|
||||
.padLeft(6, '0')}${alpha.toRadixString(16).padLeft(2, '0')}'
|
||||
.toUpperCase();
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user