This is a small library that basically converts RGB values to hexadecimal values, you can use it with flutter or dart.
clone the repo and just import it
import 'rgb.dart';
// use it
rgbToHex( 200, 200, 200 ); // returns #C8C8C8
You can also clone it in your project root and then import it, However keep in mind that that isn't best practice, and I wouldn't recommend doing that.
# In project/.
git clone https://github.com/MinaSameh1/dart_rgb_hex.git
// In project/bin/file.dart
import '../dart_rgb_hex/rgb.dart';
// use it
print(rgbToHex(64, 36, 36)); // outputs #402424
If you want to run the tests, first run this to get the test dependency:
dart pub get
Then
dart test testRGB.dart
I would recommend reading this if you want to get more into testing :)
The Effective Dart was used for writing documentation.