sayur_core library

Classes

Adapter
Adapters provide a mechanism to drive an animation from an arbitrary source. For example, synchronizing an animation with a scroll, controlling an animation with a slider input, or progressing an animation based on the time of day.
AddressNominatim
AlignEffect
An effect that animates the target between the specified begin and end alignments (via Align). Defaults to begin=Align.topCenter, end=Align.center.
Animate
The Flutter Animate library makes adding beautiful animated effects to your widgets simple. It supports both a declarative and chained API. The latter is exposed via the Widget.animate extension, which simply wraps the widget in Animate.
AnimateList<T extends Widget>
Applies animated effects to a list of widgets. It does this by wrapping each widget in Animate, and then proxying calls to all instances. It can also offset the timing of each widget's animation via interval.
BlurEffect
An effect that animates a blur on the target between the specified begin and end blur radiuses (via ImageFiltered). Defaults to begin=0, end=4.
BoxShadowEffect
An effect that animates a BoxShadow between begin and end (via DecoratedBox). A value of null for either will be interpreted as a shadow that matches the other shadow but with a zero offset and blurRadius. You can also specify a borderRadius that defines rounded corners for the shadow. Defaults to begin=null, end=BoxShadow(color: Color(0x80000000), blurRadius: 8.0, offset: Offset(0.0, 4.0))
CallbackEffect
An effect that calls a callback function at a particular point in the animation. It includes a boolean value indicating if the animation is playing in reverse.
ChangeNotifierAdapter
Drives an Animate animation from a ChangeNotifier. The valueGetter should provide a value in the range 0-1 when a change occurs.
ColorEffect
An effect that animates a Color between begin and end, composited with the target using blendMode (via ColorFiltered). A color value of null will be interpreted as a fully transparent version of the other color. Defaults to begin=null, end=Color(0x800099FF).
CrossfadeEffect
An effect that crossfades the incoming child (including preceeding effects) with a new widget (via Stack and FadeTransition). It uses a builder so that the effect can be reused, but note that the builder is only called once when the effect initially builds.
CustomEffect
Provide an easy way to add custom animated effects via a builder method that accepts a BuildContext, target child, and calculated animation value between begin and end.
EasyLoading
EasyLoadingAnimation
Effect<T>
An empty effect that all other effects extend. It can be added to Animate, but has no visual effect.
EffectEntry
Because Effect classes are immutable and may be reused between multiple Animate (or AnimateList) instances, an EffectEntry is created to store values that may be different between instances. For example, due to an interval on AnimateList, or from inheriting timing parameters.
EffectList
Simple helper class to build a list of effects via the chained api. Example:
ElevationEffect
An effect that animates a Material elevation shadow between begin and end (via PhysicalModel). You can also specify a shadow color and borderRadius to add rounded corners. It defaults to begin=0, end=8.
FadeEffect
Animates the opacity of the target between the specified begin and end values (via FadeTransition). It defaults to begin=0, end=1.
FlipEffect
An effect that animates a 2.5D card flip rotation effect (via Transform). The effect can be horizontal or vertical.
FlutterEasyLoading
FollowPathEffect
An effect that moves the target following the specified path (via Transform). The path coordinates are relative to the target's nominal position.
Generator
Get
ListenEffect
An effect that calls a callback function with its current animation value between begin and end.
LottieHelper
MoveEffect
An effect that moves the target between the specified begin and end offsets (via Transform.translate). Defaults to begin=Offset(0, -16), end=Offset.zero. transformHitTests is simply passed on to Transform.translate.
NominatimModel
PermissionConstants
ReceiveNotification
RotateEffect
Effect that rotates the target between begin and end (via RotationTransition). Values are specified in "turns" (360° or 2𝝅 radians), so a begin=0.25, end=2.25 would start with the child rotated a quarter turn clockwise (90 degrees), and rotate two full turns (ending at 810 degrees). Defaults to begin=-1.0, end=0.
SaturateEffect
An effect that animates the color saturation of the target. The begin and end values indicate the saturation level, where 0 is fully desaturated (ie. grayscale) and 1 is normal saturation. Values >1 will oversaturate. Defaults to begin=0, end=1.
SayurTextConstants
ScaleEffect
An effect that scales the target between the specified begin and end offset values (via Transform.scale). Defaults to begin=Offset(0,0), end=Offset(1,1).
ScrollAdapter
Drives an Animate animation from a ScrollController.
ShaderEffect
Effect that applies an animated fragment shader to a target. See Writing and using fragment shaders for information on how to include shaders in your app.
ShaderUpdateDetails
Passed to the ShaderEffect.update callback. Contains information necessary for updating the shader:
ShakeEffect
Effect that shakes the target, using translation, rotation, or both (via Transform).
ShimmerEffect
An effect that animates gradient overlay effects (via ShaderMask), such as the shimmer loading effect popularized by facebook.
SlideEffect
An effect that moves the target based on a fraction of its size per the specified begin and end offsets (via SlideTransition). Defaults to begin=Offset(0, -0.5), end=Offset.zero (slide down from half its height).
SwapEffect
An effect that swaps out the incoming child for a new child at a particular point in time. This includes all preceding effects. It uses a builder so that the effect can be reused, but note that the builder is only called once when the effect initially builds.
ThenEffect
A special convenience "effect" that makes it easier to sequence effects after one another. It does this by establishing a new baseline time equal to the previous effect's end time and its own optional delay. All subsequent effect delays are relative to this new baseline.
TintEffect
An effect that applies an animated color tint to the target (via ColorFiltered). The begin and end values indicate the strength of the tint (0 - 0% tint, 1 - 100% tint). Defaults to begin=0, end=1.
ToggleEffect
An effect that allows you to toggle the behavior of a builder function at a certain point in time.
UpperCaseTextFormatter
ValueAdapter
Drives an Animate animation directly from a value in the range 0-1
ValueNotifierAdapter
Drives an Animate animation from a ValueNotifier. The value from the notifier should be in the range 0-1.
VisibilityEffect
An effect that toggles the visibility of the target (via Visibility). Defaults to end=true.
YurAddField
YurApi
YurAppBar
YurBadge
YurButton
YurCard
YurCheckBox
YurDateTimePicker
YurDivider
YurDropdown
YurExpansionTile
YurFAB
YurForm
YurGoogle
YurIcon
YurImageAsset
YurImageNet
YurListBuilder<T>
YurListView
YurLoadingStack
YurNotification
YurPermissionRequest
YurPieChart
YurRadioButton
YurRing
YurScaffold
YurStack
YurStarRating
YurSwiper
YurSwitch
YurTab
YurTakePhoto
YurText
YurWebView

Enums

BStyle
DialogType
Direction
EasyLoadingAnimationStyle
loading animation
EasyLoadingIndicatorType
loading indicator type. see https://github.com/jogboms/flutter_spinkit#-showcase
EasyLoadingMaskType
loading mask type none default mask type, allow user interactions while loading is displayed clear don't allow user interactions while loading is displayed black don't allow user interactions while loading is displayed custom while mask type is custom, maskColor should not be null
EasyLoadingStatus
loading status
EasyLoadingStyle
loading style
EasyLoadingToastPosition
toast position
InfoType
LoadingStatus
LogType
LottieEnum
ShaderLayer
SizeTextField
SuffixType
UrlScheme
YurBuildCheckbox
YurBuildRadio
YurChannel

Mixins

AnimateManager<T>
Provides a common interface for Animate and AnimateList to attach Effect extensions.

Extensions

AlignEffectExtensions on T
Adds AlignEffect related extensions to AnimateManager.
AnimateListExtensions on List<Widget>
Adds AnimateList related extensions to List<Widget>.
AnimateWidgetExtensions on Widget
Adds Animate related extensions to Widget.
AnimationControllerLoopExtensions on AnimationController
Adds a loop extension on AnimationController identical to repeat but adding a count parameter specifying how many times to repeat before stopping:
BlurEffectExtensions on T
Adds BlurEffect related extensions to AnimateManager.
BoxShadowEffectExtensions on T
Adds BoxShadowEffect related extensions to AnimateManager.
CallbackEffectExtensions on T
Adds CallbackEffect related extensions to AnimateManager.
ColorEffectExtension on T
Adds ColorEffect related extensions to AnimateManager.
CrossfadeEffectExtensions on T
Adds CrossfadeEffect related extensions to AnimateManager.
CustomEffectExtensions on T
Adds CustomEffect related extensions to AnimateManager.
DateTimeExtension on DateTime
EffectExtensions on T
Adds Effect related extensions to AnimateManager.
ElevationEffectExtensions on T
Adds ElevationEffect related extensions to AnimateManager.
FadeEffectExtensions on T
Adds FadeEffect related extensions to AnimateManager.
FlipEffectExtensions on T
Adds FlipEffect related extensions to AnimateManager.
FollowPathEffectExtensions on T
Adds FollowPathEffect related extensions to AnimateManager.
IntExtension on int
ListenEffectExtensions on T
Adds ListenEffect related extensions to AnimateManager.
MoveEffectExtensions on T
Adds MoveEffect related extensions to AnimateManager.
NumDurationExtensions on num
Adds extensions to num (ie. int & double) to make creating durations simple:
OffsetCopyWithExtensions on Offset
Adds a copyWith method to Offset.
RotateEffectExtensions on T
Adds RotateEffect related extensions to AnimateManager.
SaturateEffectExtensions on T
Adds SaturateEffect related extensions to AnimateManager.
ScaleEffectExtensions on T
Adds ScaleEffect related extensions to AnimateManager.
ShaderEffectExtensions on T
Adds ShaderEffect related extensions to AnimateManager.
ShakeEffectExtensions on T
Adds ShakeEffect related extensions to AnimateManager.
ShimmerEffectExtensions on T
Adds ShimmerEffect related extensions to AnimateManager.
SlideEffectExtensions on T
Adds SlideEffect related extensions to AnimateManager.
StringExtension on String
SwapEffectExtensions on T
Adds SwapEffect related extensions to AnimateManager.
ThenEffectExtensions on T
Adds ThenEffect related extensions to AnimateManager.
TintEffectExtensions on T
Adds TintEffect related extensions to AnimateManager.
ToggleEffectExtensions on T
Adds ToggleEffect related extensions to AnimateManager.
TruthyExtension on T
VisibilityEffectExtensions on T
Adds VisibilityEffect related extensions to AnimateManager.

Constants

br0 → const BorderRadius
br12 → const BorderRadius
br16 → const BorderRadius
br20 → const BorderRadius
br24 → const BorderRadius
br32 → const BorderRadius
br4 → const BorderRadius
br40 → const BorderRadius
br48 → const BorderRadius
br8 → const BorderRadius
brBottom12 → const BorderRadius
brBottom16 → const BorderRadius
brBottom20 → const BorderRadius
brBottom24 → const BorderRadius
brBottom32 → const BorderRadius
brBottom4 → const BorderRadius
brBottom40 → const BorderRadius
brBottom48 → const BorderRadius
brBottom8 → const BorderRadius
brH12 → const BorderRadius
brH16 → const BorderRadius
brH20 → const BorderRadius
brH24 → const BorderRadius
brH32 → const BorderRadius
brH4 → const BorderRadius
brH40 → const BorderRadius
brH48 → const BorderRadius
brH8 → const BorderRadius
brTop12 → const BorderRadius
brTop16 → const BorderRadius
brTop20 → const BorderRadius
brTop24 → const BorderRadius
brTop32 → const BorderRadius
brTop4 → const BorderRadius
brTop40 → const BorderRadius
brTop48 → const BorderRadius
brTop8 → const BorderRadius
brW12 → const BorderRadius
brW16 → const BorderRadius
brW20 → const BorderRadius
brW24 → const BorderRadius
brW32 → const BorderRadius
brW4 → const BorderRadius
brW40 → const BorderRadius
brW48 → const BorderRadius
brW8 → const BorderRadius
e0 → const EdgeInsets
e12 → const EdgeInsets
e16 → const EdgeInsets
e20 → const EdgeInsets
e24 → const EdgeInsets
e32 → const EdgeInsets
e4 → const EdgeInsets
e40 → const EdgeInsets
e48 → const EdgeInsets
e8 → const EdgeInsets
eH12 → const EdgeInsets
eH16 → const EdgeInsets
eH20 → const EdgeInsets
eH24 → const EdgeInsets
eH32 → const EdgeInsets
eH4 → const EdgeInsets
eH40 → const EdgeInsets
eH48 → const EdgeInsets
eH8 → const EdgeInsets
eW12 → const EdgeInsets
eW16 → const EdgeInsets
eW20 → const EdgeInsets
eW24 → const EdgeInsets
eW32 → const EdgeInsets
eW4 → const EdgeInsets
eW40 → const EdgeInsets
eW48 → const EdgeInsets
eW8 → const EdgeInsets
gap0 → const SizedBox
gap12 → const SizedBox
gap16 → const SizedBox
gap20 → const SizedBox
gap24 → const SizedBox
gap32 → const SizedBox
gap4 → const SizedBox
gap40 → const SizedBox
gap48 → const SizedBox
gap8 → const SizedBox
gapH12 → const SizedBox
gapH16 → const SizedBox
gapH20 → const SizedBox
gapH24 → const SizedBox
gapH32 → const SizedBox
gapH4 → const SizedBox
gapH40 → const SizedBox
gapH48 → const SizedBox
gapH8 → const SizedBox
gapW12 → const SizedBox
gapW16 → const SizedBox
gapW20 → const SizedBox
gapW24 → const SizedBox
gapW32 → const SizedBox
gapW4 → const SizedBox
gapW40 → const SizedBox
gapW48 → const SizedBox
gapW8 → const SizedBox
primaryBlue → const MaterialColor
primaryRed → const MaterialColor
secondaryYellow → const MaterialColor
spaceGrey → const MaterialColor
tertiaryGreen → const MaterialColor

Properties

doubleCurrency ↔ NumberFormat
getter/setter pair
globalContext BuildContext
no setter
integerCurrency ↔ NumberFormat
getter/setter pair

Functions

charToInt(String char) int
clearSharedPref() Future<bool>
df() → void
dfp(dynamic parameter) → void
getShared<T>({required String key, required T defaultValue}) Future<T>
getSharedBool({required String key}) Future<bool>
getSharedDateTime({required String key}) Future<DateTime>
getSharedDouble({required String key}) Future<double>
getSharedInt({required String key}) Future<int>
getSharedList({required String key, required List<String> defaultValue}) Future<List<String>>
getSharedString({required String key}) Future<String>
parseStringToInt(String text) int
parseStringToMap(String input) Map<String, String>
removeSharedPref({required String key}) Future<bool>
selectDate({required BuildContext context, DateTime? initialDate, DateTime? firstDate, DateTime? lastDate, TimeOfDay? initialTime, bool withTimePick = false, bool selectableDayPredicate(DateTime)?}) Future<String>
setShared<T>({required String key, required T value}) Future<bool>
setSharedBool({required String key, required bool value}) Future<bool>
setSharedDateTime({required String key, required DateTime setDateTimeTo}) Future<bool>
setSharedDouble({required String key, required double setDoubleTo}) Future<bool>
setSharedInt({required String key, required int setIntTo}) Future<bool>
setSharedList({required String key, required List<String> setListTo}) Future<bool>
setSharedString({required String key, required String setStringTo}) Future<bool>
tryParseDate(String input) DateTime?
YurAlertDialog({required BuildContext context, required String title, required String message, required String buttonText, required dynamic onConfirm(), DialogType dialogType = DialogType.confirmation, String? message2, String? message3, dynamic onCancel()?, String? cancelText, Color barrierColor = Colors.black54, double elevasi = 24, dynamic textAlign = TextAlign.justify, int maxMessageLine = 4, FontWeight fontWeight = FontWeight.w400, bool isDismissable = true}) → dynamic
YurBottomSheet({required BuildContext context, required Widget widget(), String? title, String? subTitle, double? height}) Future
YurCustomDialog({String? title, required Widget content, required List<Widget> actions, Widget? icon, bool isDismisable = true, dynamic onPopInvoked(bool)?}) Future
YurDialog1({required String title, required String subtitle, required String buttonConfirm, required dynamic onPressedConfirm(), double? sizeSubtitle, String? buttonCancel, Widget? icon, bool isDismisable = true, bool? isWithPostFrame, FontWeight? fontWeight}) Future
YurDownload({required String url, required String fileName}) Future<void>
YurDownloadFile(String url, String fileName) Future<String>
YurEmptyItem(String title, String subtitle, {EdgeInsetsGeometry? padding}) Widget
YurLoading({String? message, bool isDismisable = false, required LoadingStatus loadingStatus, InfoType toastType = InfoType.info, EasyLoadingIndicatorType indicatorType = EasyLoadingIndicatorType.chasingDots, Color? backgroundColor, int duration = 2}) → void
YurLog(dynamic message, {String? name}) → void
YurPinput({required BuildContext context, required int length, required TextEditingController controller, bool isObscure = false, bool isDigitsOnly = false, bool isReadOnly = false, dynamic onTap()?}) → Pinput
YurPosition({required double latitude, required double longitude, double? accuracy, double? altitude, double? heading, double? speed, double? speedAccuracy, double? altitudeAccuracy, double? headingAccuracy}) → Position
YurScreenShot({required bool isOn}) Future<void>
YurSearch<T>({required BuildContext context, required dynamic onConfirm(TextEditingController textController), dynamic onCancel()?, bool isDialogShow = false, bool isDismissable = true, bool isSuccess = true, required String labelForm, required TextEditingController textController}) Future<T?>
YurShowPicker({required BuildContext context, required TextEditingController controller, double? minHour, double? minMinute, dynamic onChanged(String)?}) → void
YurSnackBar({required String message, InfoType snackBarType = InfoType.success, double duration = 3, double fontSize = 16.0, int maxLines = 2, TextAlign textAlign = TextAlign.start}) → void
YurTextStyle({double fontSize = 16, FontWeight fontWeight = FontWeight.normal, Color color = Colors.black, FontStyle fontStyle = FontStyle.normal, TextDecoration decoration = TextDecoration.none, double letterSpacing = 0.3, List<Shadow> shadows = const [], double height = 1.0, String fontFamily = 'Poppins'}) TextStyle
YurTheme() ThemeData
YurToast({required String message, InfoType toastType = InfoType.info, Toast duration = Toast.LENGTH_SHORT, ToastGravity gravity = ToastGravity.CENTER, int timeInSecForIosWeb = 1, Color? backgroundColor, Color? textColor = Colors.white, double fontSize = 14.0}) → void

Typedefs

AnimateCallback = void Function(AnimationController controller)
Function signature for Animate callbacks.
CustomEffectBuilder = Widget Function(BuildContext context, double value, Widget child)
EasyLoadingStatusCallback = void Function(EasyLoadingStatus status)
ReparentChildBuilder = Widget Function(Widget parent, Widget child)
The builder type used by Animate.reparentTypes. It must accept an existing parent widget, and rebuild it with the provided child. In effect, it clones the provided parent widget with the new child.
ShaderUpdateCallback = EdgeInsets? Function(ShaderUpdateDetails details)
Function signature for ShaderEffect update handlers.
ToggleEffectBuilder = Widget Function(BuildContext context, bool value, Widget child)