mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 10:49:49 +08:00
Refactor dark mode color blending to extension method
Moved dark mode color blending logic to a Color extension (toDark) in the design system. Updated usages in ui_utils.dart and related tests to use the new extension. Removed the old getDarkModeColor function for cleaner and more idiomatic code organization.
This commit is contained in:
@@ -49,7 +49,7 @@ void main() {
|
||||
expect(find.byType(SizedBox), findsOneWidget);
|
||||
expect(find.text('DEL'), findsOneWidget);
|
||||
expect(find.text('GET'), findsNothing);
|
||||
Color colDelDarkMode = getDarkModeColor(kColorHttpMethodDelete);
|
||||
Color colDelDarkMode = kColorHttpMethodDelete.toDark;
|
||||
final delTextWithColor = find.byWidgetPredicate(
|
||||
(widget) => widget is Text && widget.style!.color == colDelDarkMode);
|
||||
expect(delTextWithColor, findsOneWidget);
|
||||
|
||||
Reference in New Issue
Block a user