dart_extend 0.0.2 copy "dart_extend: ^0.0.2" to clipboard
dart_extend: ^0.0.2 copied to clipboard

outdated

A dart pakage with many diffrent method to fasten up your coding.

Features #

Getting started #

How To Use:

Validators #

final email = 'mashoodhussain100@gmail.com'.isemail(); // true
final email = "mashood100".isemail(); // false

    "1223ee2".isNum; //false
    bool isDouble = "122".isNum; // true

check is string value is number or not


 "1223ee2".isNum; //false
 "122".isNum; // true

Formatters #

   final test1 = 44.ordinal(); // 44th
   final test2 = 1.ordinal();// 1st

Remove Duplicates from List


    List myArray = ['x', 'w', 'x', 'y', 'o', 'x', 'y', 'y', 'r', 'a'];
    List unique = myArray.removeduplicates(); //[ x, w, y ,o, r, a ]

Conversations #

From Epoch

   final test1 = 1665102617.epochToDate(); // return DateTime  like  2022-10-07 05:41:03.162
   final time = 1665102617.epochToTime();// 5:30 AM 

From DateTime

   final date1 = DateTime.now().weekOftheYearFromDate(); // return current week number of the year eg: 12

   final date2 = DateTime(2011, 1, 15).weekOftheYearFromDate(); // 2 
   
   
   final week = 112398.minToDuration(); // weeks
   final week = 98.minToDuration(); // 1.6 hr

Additional information #

For more info or contribution visit https://github.com/mashood100/dart_extend

11
likes
0
points
37
downloads

Publisher

unverified uploader

Weekly Downloads

A dart pakage with many diffrent method to fasten up your coding.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, intl

More

Packages that depend on dart_extend