kayta_package

Ferramentas de uso interno pela VVS Sistemas.

Apresentação

Este package facilita o desenvolvimento de app's da empresa VVS Sistemas!

Instalação

dependencies:
  kayta_package: ^1.0.2

Formatters and Validator's

  • CPF (999.999.99-99)
  • CNPJ (99.999.999/9999-99)

Examples:

// Formatters
CPFValidator.format("33461671002") // Result: 334.616.710-02
CNPJValidator.format("85137090000110") // Result: 85.137.090/0001-10

//Validations:
CPFValidator.isValid("334.616.710-02") // true
CPFValidator.isValid("334.616.710-01") // false
CNPJValidator.isValid("12.175.094/0001-19") // true
CNPJValidator.isValid("12.175.094/0001-18") // false

// Remove caracteres
CPFValidator.strip("334.616.710-02") // Result: 33461671002
CNPJValidator.strip("85.137.090/0001-10") // Result: 85137090000110

// Generate
CPFValidator.generate() // Result: 33461671002
CPFValidator.generate(true) // Result: 334.616.710-02 
CNPJValidator.generate() // Result: 85137090000110
CNPJValidator.generate(true) // Result: 85.137.090/0001-10 

TextField Formatters

  • CPF (999.999.99-99)
  • CNPJ (99.999.999/9999-99)
  • CEP (99.999-999)
  • Real (R$) (20.550)
  • Telefone ((99) 9999-9999)
  • Cpf/Cnpj

Examples:

TextFormField(
  inputFormatters: [
    WhitelistingTextInputFormatter.digitsOnly,
    CepInputFormatter(),
  ],
);

LocalStorage (SharedPreferences)

  • LocalStorage.setString, setDouble, setBool, setInt
  • LocalStorage.getString, getDouble, getBool, getInt
  • LocalStorage.load

Examples:

LocalStorage.setString("person_name", "Bernardo Veras");
LocalStorage.getString("person_name"); //Result: "Bernardo Veras"

Libraries

cep_input_formatter
cnpj_input_formatter
cnpj_validator
compound_formatter
compoundable_formatter
cpf_input_formatter
cpf_ou_cpnj_formatter
cpf_validator
kayta_package
local_storage
real_input_formatter
telefone_input_formatter
util
util_data