v0.0.1
color_hex
हेक्स स्ट्रिंग को Color() में और Color() को हेक्स स्ट्रिंग में परिवर्तित करने के लिए Flutter पैकेज
6लाइक 76630-दिन डाउनलोड140Pub अंक
AndroidiOSWebmacOSWindowsLinux
हेक्स स्ट्रिंग को Color() में और Color() को हेक्स स्ट्रिंग में परिवर्तित करने के लिए Flutter पैकेज
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
Nasr Al-Rahbi @abom_me
Pubspec changes:
dependencies:
color_hex: <last_verison>
you can add it to your text or color as extension like this :
Color color=Colors.deepPurple;
String hex="#000000";
/// here we convert the hex to color and the color to hex
Text(color.convertToHex.hex,style: TextStyle(color: hex.convertToColor),),
Another way you can convert it using the function :
Color color=Colors.deepPurple;
String hex="#000000";
InkWell(
onTap: (){
/// Convert HexColor to Color()
print(hexToColor(hex).toString());
/// Convert Color() to HexColor
print(colorToHex(color).hex);
print(colorToHex(color).color);
},
child:Text("click to convert",style: TextStyle(
/// here we convert the color to hex then we convert the hex to color again
color: color.convertToHex.hex!.convertToColor
),)
)
निर्भरता सूची 3 आइटम
{"sdk":"flutter"}{"sdk":"flutter"}^2.0.0उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗