From 3518c3d965a641d1b743605eb25e3048445069f6 Mon Sep 17 00:00:00 2001 From: HosamHasanRamadan Date: Wed, 3 Jul 2024 01:58:35 +0300 Subject: [PATCH 1/2] add alpha to color result --- lib/system_theme.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/system_theme.dart b/lib/system_theme.dart index 2bc3b77..44b8764 100644 --- a/lib/system_theme.dart +++ b/lib/system_theme.dart @@ -170,7 +170,7 @@ class SystemAccentColor { Color? _retrieve(dynamic map) { assert(map == null || map is Map); if (map == null) return null; - return Color.fromRGBO(map['R'], map['G'], map['B'], 1.0); + return Color.fromARGB(map['A'] ?? 255,map['R'], map['G'], map['B']); } /// Releases any used resources From d6d47c9f3b2ba85547e569219ce42bc0907b6780 Mon Sep 17 00:00:00 2001 From: Bruno D'Luka <45696119+bdlukaa@users.noreply.github.com> Date: Wed, 3 Jul 2024 09:50:10 -0300 Subject: [PATCH 2/2] feat: Formatting --- lib/system_theme.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/system_theme.dart b/lib/system_theme.dart index 44b8764..bb94d55 100644 --- a/lib/system_theme.dart +++ b/lib/system_theme.dart @@ -170,7 +170,7 @@ class SystemAccentColor { Color? _retrieve(dynamic map) { assert(map == null || map is Map); if (map == null) return null; - return Color.fromARGB(map['A'] ?? 255,map['R'], map['G'], map['B']); + return Color.fromARGB(map['A'] ?? 255, map['R'], map['G'], map['B']); } /// Releases any used resources