smf_core library

Classes

ActiveDotIndicator
ALC
Application layout config
ApiMessage
APIs messages.
ApiUtils
APIs utilities.
AppAlertDialog
Credential
DataBody
DateTimeUtil
Utility functions for DateTime
DividerWithCenterText
Smart mobile frame dividers.
DomainResult<T>
EmptyAwareWidget
Empty aware widget for String.
ErrorBody
FlavorBanner
Fresh<T>
Wrapper generic class for returning domain data from repository.
HideKeyboard
Hide keyboard when tap the widget.
HttpStatus
Http status
ICredentialStorage
Credential storage interface.
ImagePickerButton
ImagePickerPreview
ImagePlaceholder
Placeholder image for loading image and error image.
ImageUploadButton
ImageUploadPreviewItem
ImageUtils
Logger
Logging message to console as developer.
ModalDismissible
Make modal bottom sheet or dialog dismissible when user tap outside of the widget.
MoneyMaskedTextController
Credit to flutter_masked_text2: ^0.9.1
MonthChooser
MultiImagesPreview
MultiUploadImagesPreview
OrganizationWidget
Widget for showing organization or copy right information.
OTPInput
OTP input box.
PaginatedData<T>
Wrapper generic class for returning domain data from repository with pagination support.
ResponseInfoDto
Data transfer object for responseInfo object from SOAP APIs response.
Result<T>
Wrapper generic class for network response data.
SectionTitle
SizeConfig
Screen size configuration.
SmfCachedNetworkImage
SmfContainer
Smart mobile frame container.
SmfDateSwitcher
Date switcher with left and right arrow icon.
SmfDialogBox
Reusable dialog box with header, content and footer.
SmfErrorPlaceholder
SmfImagePlaceholder
SmfModalBottomSheet
Show modal bottom sheet with rounded corner for topLeft and topRight.
SmfNoDataImage
SmfProgressLoading
SmfSingleDate
Date container for single date.
SmfSingleDateChooser
Date chooser.
SmfSocialAuthButton
Social authentication button.
SmfStateButton
Elevated button with loading state.
SmfStatusBadge
Badge for status message.
SmfStatusBox
Box container for status message.
VimeoConfigDto
Vimeo configuration data object.
VimeoErrorResponseDto
Vimeo error response data object.
VimeoFailure
Vimeo failure object.
VimeoFilesDto
Vimeo files data object.
VimeoLinkInfoDto
Vimeo video link info data object.
VimeoRepository
Repository class to communicate between domain layer and infrastructure layer.
VimeoRequestDto
Vimeo request data object.
VimeoResponse<T>
Data wrapper class for vimeo api response.
VimeoService
Remote service for Vimeo api.
domain layer model for vimeo video link data object.
VimeoVideoLinkDto
Vimeo video link data object.
YoutubeService
Remote service for YouTube video link.
YoutubeVideoQualityUrl
YtHelper
Utilitiy helpers for YouTube video url.

Extensions

BuildContextX on BuildContext
Extensions for BuildContext.
DateTimeX on DateTime
Utilitity extensions for DateTime
DioErrorX on DioError
Extensions of DioError.
DtoListToDomainList on List<VimeoVideoLinkDto>
IntX on int
Extensions for int.
NullableBoolX on bool?
Extensions for nullable bool.
NullableDoubleX on double?
Extensions for nullable double.
NullableStringX on String?
Extensions for nullable String.
NulluableIntX on int?
Extensions for nullable int.
StringX on String
Extensions for String.

Properties

sharedPreferences ↔ SharedPreferences
getter/setter pair

Functions

boolFromJson(Object? json) bool
Convert null value from Object to bool.
clearSharedPref() Future<bool>
clear SharedPref
getBoolAsync(String key, {bool defaultValue = false}) bool
Returns a Bool if exists in SharedPref
getDoubleAsync(String key, {double defaultValue = 0.0}) double
Returns a Double if exists in SharedPref
getIntAsync(String key, {int defaultValue = 0}) int
Returns a Int if exists in SharedPref
getJSONAsync(String key, {Map<String, dynamic>? defaultValue}) Map<String, dynamic>
Returns a JSON if exists in SharedPref
getMatchingSharedPrefKeys(String key) List<String>
Returns List of Keys that matches with given Key
getProportionateScreenHeight(double inputHeight) double
getProportionateScreenWidth(double inputWidth) double
getStringAsync(String key, {String defaultValue = ''}) String
Returns a String if exists in SharedPref
getStringListAsync(String key) List<String>?
Returns a StringList if exists in SharedPref
initializePrefs() Future<void>
launchInAppWebView(Uri url, {Map<String, String> headers = const <String, String>{}}) Future<void>
Launch Uri in InAppWebView.
launchInBrowser(Uri url) Future<void>
Launch Uri in Browser.
launchInWebViewWithoutDomStorage(Uri url) Future<void>
Launch Uri in InAppWebView withoud DOM Storage.
launchInWebViewWithoutJavaScript(Uri url) Future<void>
Launch Uri in InAppWebView withoud javascript.
launchUniversalLinkIos(Uri url) Future<void>
Launch universal Uri link in iOS.
nextDecode<T>(dynamic json, String key) → T
Decode to json 2nd time because consuming SOAP api need to convert for second time.
numFromJson(Object? json) num
Convert null value from Object to num.
removeKey(String key) Future<bool>
remove key from SharedPref
responseData<T>(Response response) → T
Convert data of Response to T
setValue(String key, dynamic value, {bool print = true}) Future<bool>
These codes are from nb_utils package. Add a value in SharedPref based on their type - Must be a String, int, bool, double, Map<String, dynamic> or StringList
showAnimatedDatePicker({required BuildContext context, required DateTime initialDate, required DateTime firstDate, required DateTime lastDate, DateTime? currentDate, DatePickerEntryMode initialEntryMode = DatePickerEntryMode.calendar, SelectableDayPredicate? selectableDayPredicate, String? helpText, String? cancelText, String? confirmText, Locale? locale, bool useRootNavigator = true, RouteSettings? routeSettings, TextDirection? textDirection, TransitionBuilder? builder, DatePickerMode initialDatePickerMode = DatePickerMode.day, String? errorFormatText, String? errorInvalidText, String? fieldHintText, String? fieldLabelText, TextInputType? keyboardType, Offset? anchorPoint}) Future<DateTime?>
Show DateTime picker with easeInOutBack curve animation.
showAnimatedDialog(BuildContext context, {bool barrierDismissible = false, String? barrierLabel, Color? barrierColor, Duration transitionDuration = const Duration(milliseconds: 200), DialogAnimationType animType = DialogAnimationType.curveEaseInOutBack, required Widget dialog, bool shouldDelay = false}) → void
Show dialog with animation and future delay awareness.
showAnimatedTimePicker({required BuildContext context, required TimeOfDay initialTime, TimePickerEntryMode initialEntryMode = TimePickerEntryMode.dial, String? cancelText, String? confirmText, String? helpText, String? errorInvalidText, String? hourLabelText, String? minuteLabelText, EntryModeChangeCallback? onEntryModeChanged, bool useRootNavigator = true, RouteSettings? routeSettings, Offset? anchorPoint}) Future<TimeOfDay?>
Show TimeOfDay picker with easeInOutBack curve animation.
showDialogWithAnimation(BuildContext context, {bool barrierDismissible = false, String? barrierLabel, Color? barrierColor, Duration transitionDuration = const Duration(milliseconds: 200), DialogAnimationType animType = DialogAnimationType.curveEaseInOutBack, required Widget dialog}) → void
Show dialog with some animation
stringFromJson(Object? json) String
Convert null value from Object to empty string.

Exceptions / Errors

RestApiException
Specific Exception for Rest APIs.
SoapApiException
Specific Exception for Soap APIs.
VimeoApiException
Vimeo Exception will throw when the vimeo api request fail.