New function to compute dark mode color

This commit is contained in:
Ankit Mahato
2023-04-20 22:09:58 +05:30
parent 330c023605
commit c83c1d4d77

View File

@ -19,7 +19,7 @@ Color getResponseStatusCodeColor(int? statusCode,
}
}
if (brightness == Brightness.dark) {
col = Color.alphaBlend(col.withOpacity(kOpacityDarkModeBlend), kColorWhite);
col = getDarkModeColor(col);
}
return col;
}
@ -48,7 +48,14 @@ Color getHTTPMethodColor(HTTPVerb method,
break;
}
if (brightness == Brightness.dark) {
col = Color.alphaBlend(col.withOpacity(kOpacityDarkModeBlend), kColorWhite);
col = getDarkModeColor(col);
}
return col;
}
Color getDarkModeColor(Color col) {
return Color.alphaBlend(
col.withOpacity(kOpacityDarkModeBlend),
kColorWhite,
);
}