Skip to content

Commit 0132452

Browse files
authored
flutter: prefer const for Color class (#197)
* flutter: prefer const for `Color` class * flutter: resolve changes flutterColor.ts
1 parent f322e51 commit 0132452

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/backend/src/flutter/builderImpl/flutterColor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export const flutterColor = (
238238
: `Colors.white.withValues(alpha: ${opacityToAlpha(opacity)})`;
239239
} else {
240240
// Always use full 8-digit hex which includes alpha channel
241-
colorCode = `Color(0x${rgbTo8hex(color, opacity).toUpperCase()})`;
241+
colorCode = `const Color(0x${rgbTo8hex(color, opacity).toUpperCase()})`;
242242
}
243243

244244
// Add variable name as a comment if it exists

0 commit comments

Comments
 (0)