Skip to content

Commit

Permalink
reverted changes of toHexStringRGB to stay with Flutter v3.22.0 in …
Browse files Browse the repository at this point in the history
…v2.x.x
  • Loading branch information
NBAIDan committed Feb 12, 2025
1 parent 669d205 commit c623fb6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/src/color_tools.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ part of nb_maps_flutter;

extension NbMapColorConversion on Color {
String toHexStringRGB() {
final rHex = ((r * 255).toInt() & 0xff).toRadixString(16).padLeft(2, '0');
final gHex = ((g * 255).toInt() & 0xff).toRadixString(16).padLeft(2, '0');
final bHex = ((b * 255).toInt() & 0xff).toRadixString(16).padLeft(2, '0');
return '#$rHex$gHex$bHex';
final r = red.toRadixString(16).padLeft(2, '0');
final g = green.toRadixString(16).padLeft(2, '0');
final b = blue.toRadixString(16).padLeft(2, '0');
return '#$r$g$b';
}
}

0 comments on commit c623fb6

Please sign in to comment.