mirror of
https://github.com/foss42/apidash.git
synced 2025-12-01 18:28:25 +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:
@@ -0,0 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../tokens/colors.dart';
|
||||
|
||||
extension ColorExtension on Color {
|
||||
Color get toDark => Color.alphaBlend(
|
||||
withValues(alpha: kOpacityDarkModeBlend),
|
||||
kColorWhite,
|
||||
);
|
||||
}
|
||||
@@ -1 +1,2 @@
|
||||
export 'color_extensions.dart';
|
||||
export 'context_extensions.dart';
|
||||
|
||||
Reference in New Issue
Block a user