We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
withValues
1 parent 5a53ac3 commit dea13f8Copy full SHA for dea13f8
engine/src/flutter/lib/ui/painting.dart
@@ -288,6 +288,13 @@ class Color {
288
/// If [colorSpace] is provided, and is different than the current color
289
/// space, the component values are updated before transforming them to the
290
/// provided [ColorSpace].
291
+ ///
292
+ /// Example:
293
+ /// ```dart
294
+ /// import 'dart:ui';
295
+ /// /// Create a color with 50% opacity.
296
+ /// Color makeTransparent(Color color) => color.withValues(alpha: 0.5);
297
+ /// ```
298
Color withValues({
299
double? alpha,
300
double? red,
0 commit comments