FLUTTER ECOSYSTEM

abom-me/color_hex

16진수 문자열을 Color()로 변환하고, Color()를 16진수 문자열로 변환하는 Flutter 패키지

color_hex 프로젝트 이미지
Stars
2
Forks
0
최근 푸시(UTC)
2023. 10. 18.
프로젝트 상태
활성
Nasr Al-Rahbi GitHub avatar
GITHUB User

Nasr Al-Rahbi ↗

Full-Stack Developer- Flutter, Firebase,PHP And Mysql

Oman
언어DartSwiftKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • flutter_lints개발 의존성^2.0.0

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

color_hex:

A package helps you to convert Hex color to Color() , and convert Color() to hex color

# 👨‍💻 Developed by:

profile

Nasr Al-Rahbi @abom_me

👨🏻‍💻 Find me in :

Twitter Instagram LinkedIn Stack Overflow



🔥 Get Started :

Pubspec changes:

      dependencies:
        color_hex: <last_verison>
How to use it?

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
),)
)