convert_hex 0.1.7 copy "convert_hex: ^0.1.7" to clipboard
convert_hex: ^0.1.7 copied to clipboard

outdated

Hexadecimal conversion for easier adjustment

Installing #

dependencies:
  convert_hex: ^0.1.7

Example #

import 'package:convert_hex/convert_hex.dart';

void main() {
    Hex.decode("2BB9"); //11193
    Hex.decode("1aef2"); //110322

    Hex.encode(2019); //7E3
    Hex.encode(78895); //1342F

    //charDecode => String a-f,A-F
    Hex.charDecode("f"); //15
    Hex.charDecode("A"); //10
    Hex.charDecode("2"); //2
    Hex.charDecode("h"); //null
    
    //charEncode => int 10-15
    Hex.charEncode(10); //A
    Hex.charEncode(3); //3
    Hex.charEncode(-1); //null
    Hex.charEncode(16); //null
    Hex.charEncode(50); //null
    
    //how to use class Hex64
    
    Hex64.decode('Ba'); //90
    
    var convert = Hex64.encode(90,2);//StatusEncode
    convert.isSucceed;//true
    convert.value;//Ba
    
    convert = Hex64.encode(90,1);//StatusEncode
    convert.isSucceed;//false
    convert.value;//Ba
    
    convert = Hex64.encode(90,5);//StatusEncode
    convert.isSucceed;//true
    convert.value;//AAABa
    

}
0
likes
10
pub points
60%
popularity

Publisher

unverified uploader

Hexadecimal conversion for easier adjustment

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on convert_hex