diff --git a/engine/src/flutter/lib/ui/painting.dart b/engine/src/flutter/lib/ui/painting.dart index 92d96c7621..d6e6f37dab 100644 --- a/engine/src/flutter/lib/ui/painting.dart +++ b/engine/src/flutter/lib/ui/painting.dart @@ -288,6 +288,13 @@ class Color { /// If [colorSpace] is provided, and is different than the current color /// space, the component values are updated before transforming them to the /// provided [ColorSpace]. + /// + /// Example: + /// ```dart + /// import 'dart:ui'; + /// /// Create a color with 50% opacity. + /// Color makeTransparent(Color color) => color.withValues(alpha: 0.5); + /// ``` Color withValues({ double? alpha, double? red,