fp_util 1.0.0-dev.7 copy "fp_util: ^1.0.0-dev.7" to clipboard
fp_util: ^1.0.0-dev.7 copied to clipboard

outdated

Utilities and Extensions for num,BuildContext,EdgeInsets,File,String. constants for horizontal and vertical spacing.

FPUtil #

Utilities and Extensions for num,BuildContext,EdgeInsets,File,String. constants for horizontal and vertical spacing.

Constants #

  1. Vertical Spacing
    Sizes.gapV4  - vertical gap of 4 px
    Sizes.gapV8 - vertical gap of 8 px
    Sizes.gapV12 - vertical gap of 12 px
    Sizes.gapV16 - vertical gap of 16 px
    Sizes.gapV24 - vertical gap of 24 px
    Sizes.gapV32 - vertical gap of 32 px
    Sizes.gapV48 - vertical gap of 48 px
    Sizes.gapV54 - vertical gap of 54 px
    Sizes.gapV64  - vertical gap of 64 px
  1. Horizontal Spacing
   Sizes.gapH4  - horizontal gap of 4 px
   Sizes.gapH8 - horizontal gap of 8 px
   Sizes.gapH12 - horizontal gap of 12 px
   Sizes.gapH16 - horizontal gap of 16 px
   Sizes.gapH24 - horizontal gap of 24 px
   Sizes.gapH32 - horizontal gap of 32 px
   Sizes.gapH48 - horizontal gap of 48 px
   Sizes.gapH54 - horizontal gap of 54 px
   Sizes.gapH64  - horizontal gap of 64 px

Extensions #

String Extensions


String text = 'hello world';

/// capitalize first letter of string
final capitalize = text.capitalize;

/// checks given string is null or empty
bool isNullOrEmpty  = text.isNullOrEmpty;

/// checks given text is not null and not empty
bool isNotNullNotEmpty = text.isNotNullNotEmpty;

/// checks given string is blank
bool isBlank = text.isBlank;

/// checks given string os not blank
bool isNotBlank = text.isNotBlank;

/// checks string is email
bool isEmail = text.isEmail;

/// returns default value is given string is blank
String withDefault = text.getOrDefault('default value');

/// return null if given string is nullOrEmpty
String? withNull = text.getOrNull();

/// checks string is valid phone number
bool get isPhoneNumber = text.isValidPhoneNumber;

/// checks string is number
bool get isNumeric = text.isNumeric;

/// removes whitespace from string
String removeWhiteSpace = text.removeWhiteSpace;

/// removes \n from string
String removeNextLine = text.removeNextLine;

/// converts to bool
bool? isBool = text.toBool;

/// converts to int
int? isInt = text.isInt;

/// converts to double
double? isDouble = text.toDouble;

/// check string is valid url
bool isUrl = text.isUrl;

/// check string is image  path
bool isImage = text.isImage;

/// checks string is video path
bool isVideo = text.isVideo;

/// checks string is audio path
bool isAudio = text.isAudio;

/// checks string is pdf path
bool isPdf = text.isPdf;

/// checks string is text path
bool isText = text.isTxt;

/// checks string is office word file
bool isDocx = text.isDocx;

/// checks string is office excel
bool isXls = text.isXls;

/// checks string is office presentation file
bool isPpt = text.isPpt;

/// checks string is svg path
bool isSvg = text.isSvg;

/// checks string is xml file path
bool isXml= text.isXml;

/// checks string is file path
bool isFile = text.isFile;

Num Extensions #

4
likes
0
points
375
downloads

Publisher

verified publisherkishormainali.com

Weekly Downloads

Utilities and Extensions for num,BuildContext,EdgeInsets,File,String. constants for horizontal and vertical spacing.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

file_picker, flutter, flutter_svg, freezed_annotation, image_picker, intl, mime, path

More

Packages that depend on fp_util