Skip to content

GiYeongUM/flutter_static_utility

Repository files navigation

flutter_static_utility

awesome flutter common utils

Flutter

📋 Util lists

  • checkEmailRegex
  • checkPhoneNumberRegex(Korean)
  • checkNickNameRegex(Korean)
  • checkSMSCodeRegex
  • checkPasswordRegex
  • timeAgo
  • thousandToK
  • thousandToData
dependencies:
  flutter_utils: ^<latest_version>

💪 Use


checkEmailRegex

const result = checkEmailRegex(email: 'example@google.com');
/// return true;

checkPhoneNumberRegex

const result = checkPhoneNumberRegex(phoneNumber: '01012341234');
/// return true;
/// it works only korean phone number
/// global phone number will be updated

checkNickNameRegex

const result = checkNickNameRegex(nickName: 'NickName', min: 2, max: 8);
/// return true;

checkSMSCodeRegex

const result = checkSMSCodeRegex(code: '123456', length: 6);
/// return true;

checkPasswordRegex

const result = checkPasswordRegex(password: 'Abcd1234!', min: 8, max: 20);
/// return true;
/// Upper, Lower, Number, Special Character

timeAgo

const result = timeAgo(dateTime: DateTime.now());
/// return 'Just now';
/// 3 seconds ago ..
/// 2 week ago

thousandToK

const result = thousandToK(30000);
/// return '30.0K';

thousandToData

const result = thousandToData(30000);
/// return DigitData(suffix: 'K', data :30.0, fraction: 1);

About

Flutter common utils

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages