extensions

A new Flutter Extension plugin.

String Extension:

Email Validation:

  var email = "chiragprami@gmail.com";
    var isValidEmail = email.isEmail();

More:

   var email = "chiragprami@gmail.com";
    var isValidEmail = email.isEmail();

    var number = "2500";
    var convertedTODouble = number.convertToDouble();
    var convertedTODoubleWithFraction = number.convertToDouble(fraction: 2);
    var convertedToInt = number.convertToInt();

    String userName;
    var checkIsNullOrNot = userName.nullSafeString();
    var checkUserNameIsNull = userName.isNull();

    var alphaNumber = "9234AA44dd";
    var isAlphanumeric = number.isAlphanumeric();

    var userProfile = "20.20";
    var isValidPercentage = userProfile.isPercentage();

Redirect screen:

   context.redirectTo(child: NewScreen());

Push only:

   context.redirectOnly(child: HomeScreen());

HideKeyboard:

   context.hideKeyboard();

Dialog:

   context.openDialog(child: NewScreen());

Libraries

extensions