multiutillib
library
Functions
convertBase64ToImage ({required String base64 })
→ Future <Uint8List ? >
convertImageToBase64 ({required String imagePath })
→ Future <String ? >
convertTimeOfDay (TimeOfDay timeOfDay , {String ? timeFormat })
→ String
convertTimeOfDay method
this method will convert time of day to date time format
emailValidator (String ? value )
→ String ?
validation method for validating email id
formatDateTime (String dateTime , {String ? newDateTimeFormat })
→ String
formatDateTime method
this method will format a date string in default or format provided.
getAppVersion ()
→ Future <String >
getAppVersion method
this method will return the current version of the app
getCharFromString ({})
→ String
getCharFromString method
this method will return characters from string passed
getCurrentDate ({String ? newDateTimeFormat })
→ String
getCurrentDate method
this method will get current date in format provided.
getDeviceId ()
→ Future <String >
getDeviceId method
this method will get device info like model name and device id
getDeviceName ()
→ Future <String ? >
getDeviceName method
this method will get device or model name of the device
getNumbersFromString ({})
→ String ?
getNumbersFromString method
this method will return all the digits from string passed
getRandomMobileNumber ()
→ String
getRandomMobileNumber method
this method will return randomly generated mobile number
getRandomNumber ({required int min , required int max })
→ String
getRandomNumber method
this method will return a random number between min and max number passed
getSingleDigitRandomNumber ()
→ String
getSingleDigitRandomNumber method
this method will return a single digit random number
hideProgressDialog ()
→ dynamic
hide progress dialog method
showConfirmationDialog (BuildContext context , {Widget ? transitionAnimation , String negativeBtnText = kNo , String positiveBtnText = kYes , bool barrierDismissible = false , Color dividerColor = Colors.blue , Color negativeBtnColor = Colors.red , Color positiveBtnColor = Colors.blue , TextAlign descTextAlign = TextAlign.center , TextAlign titleTextAlign = TextAlign.center , Duration transitionDuration = const Duration(milliseconds: 400) , DialogAnimationType dialogAnimationType = DialogAnimationType.grow , TextStyle descStyle = const TextStyle(fontSize: 16, letterSpacing: 0.27, color: Colors.black) , TextStyle titleStyle = const TextStyle(fontSize: 18, letterSpacing: 0.27, fontWeight: FontWeight.bold) , TextStyle positiveBtnStyle = const TextStyle(fontSize: 18, letterSpacing: 0.27, fontWeight: FontWeight.w400) , TextStyle negativeBtnStyle = const TextStyle(fontSize: 18, letterSpacing: 0.27, fontWeight: FontWeight.w400) , required String title , required String description , required VoidCallback onPositivePressed })
→ dynamic
This method will show a dialog box with custom UI and animation
showCustomDatePicker ({required BuildContext context , required Function onCancelClick , String applyButtonText = 'Apply' , String cancelButtonText = 'Cancel' , Color leftArrowColor = Colors.blue , Color rightArrowColor = Colors.blue , Color applyButtonColor = Colors.blue , Color cancelButtonColor = Colors.red , Color weekDaysTextColor = Colors.blue , Color selectedDateColor = Colors.blue , Color monthYearTextColor = Colors.black , required dynamic onApplyClick (DateTime ? dateTime )?, TextStyle applyButtonTextStyle = const TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.bold) , TextStyle cancelButtonTextStyle = const TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.bold) , DateTime ? minimumDate , DateTime ? maximumDate , DateTime ? initialStartDate , bool barrierDismissible = false })
→ dynamic
showCustomDateRangePicker ({required BuildContext context , required Function onCancelClick , String applyButtonText = 'Apply' , String cancelButtonText = 'Cancel' , Color leftArrowColor = Colors.blue , Color rightArrowColor = Colors.blue , Color applyButtonColor = Colors.blue , Color cancelButtonColor = Colors.red , Color weekDaysTextColor = Colors.blue , Color selectedRangeColor = Colors.blue , Color monthYearTextColor = Colors.black , required dynamic onApplyClick (DateTime ? startDate , DateTime ? endDate )?, TextStyle applyButtonTextStyle = const TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.bold) , TextStyle cancelButtonTextStyle = const TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.bold) , DateTime ? minimumDate , DateTime ? maximumDate , DateTime ? initialEndDate , DateTime ? initialStartDate , bool barrierDismissible = false })
→ dynamic
showCustomDialog (BuildContext context , {String btnText = kOK , Color btnColor = Colors.blue , bool barrierDismissible = false , Color dividerColor = Colors.blue , TextAlign descTextAlign = TextAlign.center , TextAlign titleTextAlign = TextAlign.center , Duration transitionDuration = const Duration(milliseconds: 400) , DialogAnimationType dialogAnimationType = DialogAnimationType.grow , TextStyle descStyle = const TextStyle(fontSize: 16, letterSpacing: 0.27, color: Colors.black) , TextStyle btnStyle = const TextStyle(fontSize: 18, letterSpacing: 0.27, fontWeight: FontWeight.w400) , TextStyle titleStyle = const TextStyle(fontSize: 18, letterSpacing: 0.27, fontWeight: FontWeight.bold) , required String title , required String description })
→ dynamic
This method will show a dialog box with custom UI and animation
showInkDropProgressDialog (BuildContext context , {String message = 'Please wait...' })
→ dynamic
showProgressDialog (BuildContext context , {String message = 'Please wait...' , Widget ? progressWidget })
→ dynamic
show progress dialog method