nylo_framework library

Classes

Accumulator
Mutable wrapper of an integer that can be passed by reference to track a value across a recursive stack.
Alignment
A point within a rectangle.
AlignmentDirectional
An offset that's expressed as a fraction of a Size, but whose horizontal component is dependent on the writing direction.
AlignmentGeometry
Base class for Alignment that allows for text-direction aware resolution.
AndroidOptions
AppleOptions
AppTheme
Main App theme object.
AppThemeOptions
Interface to use when creating an app theme option class.
AssetBundleImageKey
Key for the image obtained by an AssetImage or ExactAssetImage.
AssetBundleImageProvider
A subclass of ImageProvider that knows about AssetBundles.
AssetImage
Fetches an image from an AssetBundle, having determined the exact image to use based on the context.
Auth
Authentication class Learn more: https://nylo.dev/docs/5.20.0/authentication
AuthUserEvent
Authentication Event for users.
AutomaticNotchedShape
A NotchedShape created from ShapeBorders.
BackgroundTransformer
The default Transformer for Dio.
Backpack
Backpack class for storing data This class is not designed to store huge amounts of data.
BaseColorStyles
Interface for your base styles. Add more styles here and then implement in light_theme_colors.dart and dark_theme_colors.dart.
BaseController
Nylo's base controller class
BaseOptions
A set of base settings for each Dio(). BaseOptions and Options will be merged into one RequestOptions before sending the requests. See Options.compose.
BaseThemeConfig<T>
Base theme config is used for theme management Set the required parameters to create new themes.
BeveledRectangleBorder
A rectangular border with flattened or "beveled" corners.
Bone
A widget that represents a bone of the loading skeleton effect
BoneMock
A class that provides mock data for generating fake
BoneRenderObject
The render object of the BoneRenderObjectWidget
BoneRenderObjectWidget
A widget that paints a BoxDecoration into a canvas with ManualSkeletonizerPaintingContext.
BooleanRule
BOOLEAN RULE
Border
A border of a box, comprised of four sides: top, right, bottom, left.
BorderDirectional
A border of a box, comprised of four sides, the lateral sides of which flip over based on the reading direction.
BorderRadius
An immutable set of radii for each corner of a rectangle.
BorderRadiusDirectional
An immutable set of radii for each corner of a rectangle, but with the corners specified in a manner dependent on the writing direction.
BorderRadiusGeometry
Base class for BorderRadius that allows for text-direction aware resolution.
BorderSide
A side of a border of a box.
BoxBorder
Base class for box borders that can paint as rectangles, circles, or rounded rectangles.
BoxDecoration
An immutable description of how to paint a box.
BoxPainter
A stateful class that can paint a particular Decoration.
BoxShadow
A shadow cast by a box.
CancelToken
Controls cancellation of Dio's requests.
Canvas
An interface for recording graphical operations.
CapitalizedRule
CAPITALIZED RULE
CircleBorder
A border that fits a circle within the available space.
CircularNotchedRectangle
A rectangle with a smooth circular notch.
ClipContext
Clip utilities used by PaintingContext.
Color
An immutable 32 bit color value in ARGB format.
ColorFilter
A description of a color filter to apply when drawing a shape or compositing a layer with a particular Paint. A color filter is a function that takes two colors, and outputs one color. When applied during compositing, it is independently applied to each pixel of the layer being drawn before the entire layer is merged with the destination.
ColorProperty
DiagnosticsProperty that has an Color as value.
ColorSwatch<T>
A color that has a small table of related colors called a "swatch".
ContainsRule
CONTAINS RULE
ContinuousRectangleBorder
A rectangular border with smooth continuous transitions between the straight sides and the rounded corners.
CupertinoDatePickerModalSheet
CupertinoDatePickerOptions
Options to customize the CupertinoDatePicker.
CupertinoDatePickerOptionsStyle
CycleThemeIconButton
Simple IconButton which cycles themes when pressed. Use as a descendant of ThemeProvider.
DateAgeIsOlderRule
DATE AGE IS OLDER RULE
DateAgeIsYoungerRule
DATE AGE IS YOUNGER RULE
DateInFutureRule
DATE IN FUTURE RULE
DateInPastRule
DATE IN PAST RULE
DateRule
REGEX RULE
DateTimeField
DateTimeField
DateTimeFormField
A FormField that contains a DateTimeField.
Decoration
A description of a box decoration (a decoration applied to a Rect).
DecorationImage
An image for a box decoration.
DecorationImagePainter
The painter for a DecorationImage.
DefaultResponse<T>
Base class used to handle networking responses
Dio
Dio enables you to make HTTP requests easily.
DioApiService
Base API Service class
DioMixin
EdgeInsets
An immutable set of offsets in each of the four cardinal directions.
EdgeInsetsDirectional
An immutable set of offsets in each of the four cardinal directions, but whose horizontal components are dependent on the writing direction.
EdgeInsetsGeometry
Base class for EdgeInsets that allows for text-direction aware resolution.
EmailRule
EMAIL RULE
ErrorInterceptorHandler
The handler for interceptors to handle error occurred during the request.
ErrorStack
ExactAssetImage
Fetches an image from an AssetBundle, associating it with the given scale.
Field
Field is a class that helps in managing form fields
FileImage
Decodes the given File object as an image, associating it with the given scale.
FittedSizes
The pair of sizes returned by applyBoxFit.
FlutterLogoDecoration
An immutable description of how to paint Flutter's logo.
FlutterSecureStorage
FontFeature
A feature tag and value that affect the selection of glyphs in a font.
FontVariation
An axis tag and value that can be used to customize variable fonts.
FontWeight
The thickness of the glyphs used to draw the text.
FormCast
FormCast is a class that helps in managing form casts
FormData
A class to create readable "multipart/form-data" streams. It can be used to submit forms and file uploads to http server.
FormValidator
FormValidator is a class that helps in managing form validation It is used in the NyFormData class Example:
FractionalOffset
An offset that's expressed as a fraction of a Size.
FusedTransformer
A Transformer that has a fast path for decoding UTF8-encoded JSON. If the response is utf8-encoded JSON and no custom decoder is specified in the RequestOptions, this transformer is significantly faster than the default SyncTransformer and the BackgroundTransformer. This improvement is achieved by using a fused Utf8Decoder and JsonDecoder to decode the response, which is faster than decoding the utf8-encoded JSON in two separate steps, since Dart uses a special fast decoder for this case. See https://github.com/dart-lang/sdk/blob/5b2ea0c7a227d91c691d2ff8cbbeb5f7f86afdb9/sdk/lib/_internal/vm/lib/convert_patch.dart#L40
GlyphInfo
The measurements of a character (or a sequence of visually connected characters) within a paragraph.
Gradient
A 2D gradient.
GradientRotation
A GradientTransform that rotates the gradient around the center-point of its bounding box.
GradientTransform
Base class for transforming gradient shaders without applying the same transform to the entire canvas.
Headers
The headers class for requests and responses.
HSLColor
A color represented using alpha, hue, saturation, and lightness.
HSVColor
A color represented using alpha, hue, saturation, and value.
HttpClientAdapter
HttpAdapter is a bridge between Dio and HttpClient.
ImageCache
Class for caching images.
ImageCacheStatus
Information about how the ImageCache is tracking an image.
ImageChunkEvent
An immutable notification of image bytes that have been incrementally loaded.
ImageConfiguration
Configuration information passed to the ImageProvider.resolve method to select a specific image.
ImageInfo
A dart:ui.Image object with its corresponding scale.
ImageProvider<T extends Object>
Identifies an image without committing to the precise final asset. This allows a set of images to be identified and for the precise image to later be resolved based on the environment, e.g. the device pixel ratio.
ImageShader
A shader (as used by Paint.shader) that tiles an image.
ImageSizeInfo
Tracks the bytes used by a dart:ui.Image compared to the bytes needed to paint that image without scaling it.
ImageStream
A handle to an image resource.
ImageStreamCompleter
Base class for those that manage the loading of dart:ui.Image objects for ImageStreams.
ImageStreamCompleterHandle
An opaque handle that keeps an ImageStreamCompleter alive even if it has lost its last listener.
ImageStreamListener
Interface for receiving notifications about the loading of an image.
InlineSpan
An immutable span of inline content which forms part of a paragraph.
InlineSpanSemanticsInformation
The textual and semantic label information for an InlineSpan.
Interceptor
Interceptor helps to deal with RequestOptions, Response, and DioException during the lifecycle of a request before it reaches users.
Interceptors
A Queue-Model list for Interceptors.
InterceptorsWrapper
A helper class to create interceptors in ease.
IOSOptions
Specific options for iOS platform.
IsFalseRule
IS_FALSE RULE
IsTrueRule
IS_TRUE RULE
IsTypeRule
IS_TYPE RULE
LinearBorder
An OutlinedBorder like BoxBorder that allows one to define a rectangular (box) border in terms of zero to four LinearBorderEdges, each of which is rendered as a single line.
LinearBorderEdge
Defines the relative size and alignment of one
LinearGradient
A 2D linear gradient.
LineMetrics
LineMetrics stores the measurements and statistics of a single line in the paragraph.
LinuxOptions
Specific options for Linux platform. Currently there are no specific linux options available.
ListParam<T>
Indicates a param being used as queries or form data, and how does it gets formatted.
Locale
An identifier used to select a user's language and formatting preferences.
LocalizedApp
LocalizedApp A widget that reloads the app when the language is changed. Use this widget as the root of your app.
LogInterceptor
LogInterceptor is used to print logs during network requests. It should be the last interceptor added, otherwise modifications by following interceptors will not be logged. This is because the execution of interceptors is in the order of addition.
LowerCaseRule
LOWERCASE RULE
MacOsOptions
Specific options for macOS platform.
MaskFilter
A mask filter to apply to shapes as they are painted. A mask filter is a function that takes a bitmap of color pixels, and returns another bitmap of color pixels.
MaterialDatePickerOptions
Options to configure the DatePickerDialog.
MaterialTimePickerOptions
Options to configure the TimePickerDialog.
MatrixUtils
Utility functions for working with matrices.
MaxRule
MAX RULE
MemoryImage
Decodes the given Uint8List buffer as an image, associating it with the given scale.
MinRule
MIN RULE
Model
Nylo's Model class
MultiFrameImageStreamCompleter
Manages the decoding and scheduling of image frames.
MultipartFile
A file to be uploaded as part of a MultipartRequest. This doesn't need to correspond to a physical file.
NetworkImage
Fetches the given URL from the network, associating it with the given scale.
NotchedShape
A shape with a notch in its outline.
NotEmptyRule
NOT EMPTY RULE
NumericRule
NUMERIC RULE
NyAction
Nylo's NyAction class
NyApiService
NyAppUsage
Nylo's NyAppUsage class This class is used to monitor app usage.
NyArgument
Nylo Route Argument Contains the data passed from another route.
NyBaseApiService
Base API Service class
NyController
Base NyController
NyEvent
Base interface for Events
NyForm
NyForm is a class that helps in managing forms To create a form, you need to extend the NyFormData class Example:
NyFormData
NyFormData is a class that helps in managing form data
NyFormItem
NyFormItem is a class that helps in managing form items
NyFormPicker
A NyFormPicker widget for Form Fields
NyFormStyle
NyFormStyle is a class that helps in managing form styles
NyFutureBuilder<T>
Simple way to render Future's in your project.
NyLanguageSwitcher
NyLanguageSwitcher is a widget that allows you to switch languages in your app. You can use it in the AppBar or as a bottom sheet modal using the showBottomModal method. Example:
NyListener
Base class for listeners
NyListView<T>
The NyListView widget is a wrapper for the ListView widget. It provides a simple way to display a list of items. Example:
Nylo
NyLocalization
NyLocalization Singleton object that handles localization in Nylo
NyLogger
Logger used for messages you want to print to the console.
NyNavigator
The NyNavigator class is a singleton class that manages the routing of the application. It is a thin layer on top of Navigator to help you encapsulate and manage routing at one place.
NyPage<T extends BaseController>
NyProvider
Base class for Providers.
NyPullToRefresh<T>
NyPullToRefresh is a widget that shows a list of items with a pull to refresh. Example:
NyRequest
Base class to handle requests
NyRichText
NyRichText allows you to display rich text with different styles. Example:
NyRouteGuard
Base class for Nylo's RouteGuard.
NyRouteHistoryObserver
A NavigatorObserver that keeps track of the current route.
NyRouter
NyRouterRoute manages routing, registering routes with transitions, navigating to routes, closing routes. It is a thin layer on top of Navigator to help you encapsulate and manage routing at one place.
NyScheduler
Nylo's Scheduler class This class is used to schedule tasks to run at a later time.
NyState<T extends StatefulWidget>
NyStatefulWidget<T extends BaseController>
StatefulWidget's include a BaseController to access from your child state.
NyStorage
Base class to help manage local storage
NySwitch
NySwitch allows you to switch between the widgets provided by passing in a indexSelected.
NyTextField
Nylo's Text Field Widget
NyThemeOptions<T>
Theme options are used to pass additional data to the theme.
NyValidator
Offset
An immutable 2D floating-point offset.
OneFrameImageStreamCompleter
Manages the loading of dart:ui.Image objects for static ImageStreams (those with only one frame).
Options
The configuration for a single request. BaseOptions and Options will be merged into one RequestOptions before sending the requests. See Options.compose.
OutlinedBorder
A ShapeBorder that draws an outline with the width and color specified by side.
OvalBorder
A border that fits an elliptical shape.
PageTransition<T>
This package allows you amazing transition for your routes Page transition class extends PageRouteBuilder
PageTransitionSettings
This class contains all page transition settings.
Paint
A description of the style to use when drawing on a Canvas.
PaintingEffect
An abstraction for skeleton painting effects consumed by the Skeletonizer.animationController
PasswordV1Rule
PasswordV1 RULE This rule is used to validate a password with the following requirements:
PasswordV2Rule
PasswordV2 RULE This rule is used to validate a password with the following requirements:
Path
A complex, one-dimensional subset of a plane.
PhoneNumberUkRule
UK NUMBER RULE
PhoneNumberUsRule
US NUMBER RULE
PlaceholderDimensions
Holds the Size and baseline required to represent the dimensions of a placeholder in text.
PlaceholderSpan
An immutable placeholder that is embedded inline within text.
PostCodeUkRule
POSTCODE UK RULE
PulseEffect
Creates a painting effect where a two colors are lerped back nad forward based on animation value
QueuedInterceptor
Interceptor in queue.
QueuedInterceptorsWrapper
A helper class to create queued-interceptors in ease.
RadialGradient
A 2D radial gradient.
Radius
A radius for either circular or elliptical shapes.
Rect
An immutable, 2D, axis-aligned, floating-point rectangle whose coordinates are relative to a given origin.
RedirectRecord
A record that records the redirection happens during requests, including status code, request method, and the location.
RegexRule
REGEX RULE
RenderIgnoredSkeleton
A Render object that paints nothing when skeletonizer is enabled
RequestInterceptorHandler
The handler for interceptors to handle before the request has been sent.
RequestOptions
The internal request option class that is the eventual result after BaseOptions and Options are composed.
ResizeImage
Instructs Flutter to decode the image at the specified dimensions instead of at its native size.
ResizeImageKey
Key used internally by ResizeImage.
Response<T>
The Response class contains the payload (could be transformed) that respond from the request, and other information of the response.
ResponseBody
The response wrapper class for adapters.
ResponseInterceptorHandler
The handler for interceptors to handle after respond.
RoundedRectangleBorder
A rectangular border with rounded corners.
RouteGuard
Class interface
RRect
An immutable rounded rectangle with the custom radii for all four corners.
RSTransform
A transform consisting of a translation, a rotation, and a uniform scale.
Shader
Base class for objects such as Gradient and ImageShader which correspond to shaders as used by Paint.shader.
ShaderWarmUp
Interface for drawing an image to warm up Skia shader compilations.
Shadow
A single shadow.
ShapeBorder
Base class for shape outlines.
ShapeDecoration
An immutable description of how to paint an arbitrary shape.
ShimmerEffect
Builds a painting effect where a linear gradient is used to create a shimmer-like effect
Size
Holds a 2D floating-point size.
Skeleton
An interface for a skeleton annotation widget skeleton annotation widgets are used to configure or customize how the skeleton effect is applied to the child widget
Skeletonizer
Paints a skeleton of the child widget
SkeletonizerConfig
Provided the scoped SkeletonizerConfigData to descended widgets
SkeletonizerConfigData
The immutable configuration data for the skeletonizer theme.
SkeletonizerScope
Provides the skeletonizer activation information to the descent widgets
SkeletonizerState
The state of Skeletonizer widget
SliverSkeletonizer
A Skeletonizer widget that can be used in a CustomScrollView
SoldColorEffect
Creates a none-animated painting effect
StadiumBorder
A border that fits a stadium-shaped border (a box with semicircles on the ends) within the rectangle of the widget it is applied to.
StarBorder
A border that fits a star or polygon-shaped border within the rectangle of the widget it is applied to.
StateAction
StateAction class
StorageConfig
Storage configuration for Nylo. You can set the storage options for each platform. E.g. AndroidOptions, IOSOptions, LinuxOptions, WindowsOptions, WebOptions, MacOsOptions
StorageManager
Storage manager for Nylo.
StringRule
STRING RULE
StrutStyle
Defines the strut, which sets the minimum height a line can be relative to the baseline.
SweepGradient
A 2D sweep gradient.
SwitchAnimationConfig
Holds the configuration for the switch animation
SyncAuthToBackpackEvent<T>
Sync Authenticated User to the Backpack
SyncTransformer
If you want to custom the transformation of request/response data, you can provide a Transformer by your self, and replace the transformer by setting the Dio.transformer.
TextAlignVertical
The vertical alignment of text within an input box.
TextBoneBorderRadius
Holds border radius information for TextElement
TextBox
A rectangle enclosing a run of text.
TextDecoration
A linear decoration to draw near the text.
TextHeightBehavior
Defines how to apply TextStyle.height over and under text.
TextPainter
An object that paints a TextSpan tree into a Canvas.
TextPosition
A position in a string of text.
TextRange
A range of characters in a string of text.
TextScaler
A class that describes how textual contents should be scaled for better readability.
TextSelection
A range of text that represents a selection.
TextSpan
An immutable span of text.
TextStyle
An immutable style describing how to format and paint text.
ThemeConsumer
Wrap a widget to use the theme of the closest app theme of the ThemeProvider. If you have multiple screens, wrap each entry point with this widget.
ThemeController
Object which controls the behavior of the theme. This is the object provided through the widget tree.
ThemeDialog
Ready-made SimpleDialog that gives the option to change theme.
ThemeProvider
Wrap MaterialApp in ThemeProvider to get theme functionalities. You may wrap separate parts of the app with multiple ThemeProviders to use multiple theme sections across the app.
ToastMeta
Toast Meta makes it easy to use pre-defined styles in the toast alert.
ToastNotificationStyleMetaHelper
ToastNotificationStyleMetaHelper is used to return the correct value for the ToastNotificationStyleType toast style.
Transformer
Transformer allows changes to the request/response data before it is sent/received to/from the server.
TransformProperty
Property which handles Matrix4 that represent transforms.
UpdateState
UpdateState Model.
UpperCaseRule
LOWERCASE RULE
URLRule
URL RULE
ValidationRule
BASE ValidationRule class Define the required details in the constructor to extend and build your own validation rule.
WebOptions
Specific options for web platform.
WindowsOptions
Specific options for Windows platform.
WordBoundary
A TextBoundary subclass for locating word breaks.
ZipCodeUsRule
ZIPCODE US RULE

Enums

Axis
The two cardinal directions in two dimensions.
AxisDirection
A direction along either the horizontal or vertical Axis in which the origin, or zero position, is determined.
BlendMode
Algorithms to use when painting on the canvas.
BlurStyle
Styles to use for blurs in MaskFilter objects.
BoneButtonType
The type of button bone
BorderStyle
The style of line to draw for a BorderSide in a Border.
BoxFit
How a box should be inscribed into another box.
BoxShape
The shape to use when rendering a Border or BoxDecoration.
Clip
Different ways to clip a widget's content.
DateTimeFieldPickerMode
The mode of the DateTimeField.
DateTimeFieldPickerPlatform
The platform to use for the pickers.
DioExceptionType
The exception enumeration indicates what type of exception has happened during requests.
ErrorStackLogLevel
The level of logging to be displayed
FilterQuality
Quality levels for image sampling in ImageFilter and Shader objects that sample images and for Canvas operations that render images.
FlutterLogoStyle
Possible ways to draw Flutter's logo.
FontStyle
Whether to use the italic type variation of glyphs in the font.
ImageRepeat
How to paint any portions of a box not covered by an image.
KeychainAccessibility
KeyChain accessibility attributes as defined here: https://developer.apple.com/documentation/security/ksecattraccessible?language=objc
KeyCipherAlgorithm
ListFormat
Specifies the array format (a single parameter with multiple parameter or multiple parameters with the same name). and the separator for array items.
LocaleType
Locale Types
PageTransitionType
Transition enum
PaintingStyle
Strategies for painting shapes and paths on a canvas.
PathFillType
Determines the winding rule that decides how the interior of a Path is calculated.
PathOperation
Strategies for combining paths.
PlaceholderAlignment
Where to vertically align the placeholder relative to the surrounding text.
RenderComparison
The description of the difference between two objects, in the context of how it will affect the rendering.
ResizeImagePolicy
Configures the behavior for ResizeImage.
ResponseType
Indicates which transformation should be applied to the response data.
StorageCipherAlgorithm
StrokeCap
Styles to use for line endings.
StrokeJoin
Styles to use for line segment joins.
TextAffinity
A way to disambiguate a TextPosition when its offset could match two different locations in the rendered string.
TextAlign
Whether and how to align text horizontally.
TextAreaSize
TextAreaSize is an enum that helps in managing textarea sizes
TextBaseline
A horizontal line used for aligning text.
TextDecorationStyle
The style in which to draw a text decoration
TextDirection
A direction in which text flows.
TextLeadingDistribution
How the "leading" is distributed over and under the text.
TextOverflow
How overflowing text should be handled.
TextWidthBasis
The different ways of measuring the width of one or more lines of text.
TileMode
Defines what happens at the edge of a gradient or the sampling of a source image in an ImageFilter.
ToastNotificationStyleType
Enum values for the Toast style types.
VertexMode
Defines how a list of points is interpreted when drawing a set of triangles.
VerticalDirection
A direction in which boxes flow vertically.

Mixins

OptionsMixin
The mixin class for options that provides common attributes.
PaintingBinding
Binding for the painting library.

Extensions

DarkMode on BuildContext
Check if the device is in Dark Mode
NyBackpack on String
NyBool on bool?
Extensions for bool
NyBoxScrollView on BoxScrollView
Extensions for ListView
NyColumn on Column
Extensions for Column
NyContext on BuildContext
NyDateTime on DateTime?
Extensions for DateTime
NyDouble on double?
Extensions for double
NyImage on Image
Extensions for Image
NyInt on int?
Extensions for int
NyList on List?
Extensions for List
NyListGeneric on List<T>
Extensions for List
NyMap on Map?
Extensions for Map
NyMapEntry on Iterable<MapEntry<String, dynamic>>
NyRequestHeaders on RequestHeaders
NyRow on Row
Extensions for Row
NySingleChildRenderObjectWidget on SingleChildRenderObjectWidget
Extensions for SingleChildRenderObjectWidget
NyStateful on StatefulWidget
NyStatelessWidget on StatelessWidget
Extensions for StatelessWidget
NyStr on String?
Extensions for String
NyString on String
Extensions for String
NyText on Text
Extensions for Text
NyWidget on Widget
Extensions for Widget
Paginate on List<T>
Extension on the List<T> class that adds a paginate method for easy pagination of list elements.
StringExtension on String
Extensions for String
Translation on String
Translate String.

Constants

kDefaultCancelStyle → const TextStyle
kDefaultFontSize → const double
The default font size if none is specified.
kTextHeightNone → const double
A TextStyle.height value that indicates the text span should take the height defined by the font, which may not be exactly the height of TextStyle.fontSize.
nyloVersion → const String
Nylo version
skeletonizerConfigData → const SkeletonizerConfigData
Singleton instance for skeletonizer theme configurations.

Properties

debugCaptureShaderWarmUpImage ShaderWarmUpImageCallback
Called by ShaderWarmUp.execute immediately after it creates an Image.
getter/setter pair
debugCaptureShaderWarmUpPicture ShaderWarmUpPictureCallback
Called by ShaderWarmUp.execute immediately after it creates a Picture.
getter/setter pair
debugDisableShadows bool
Whether to replace all shadows with solid color blocks.
getter/setter pair
debugImageOverheadAllowance int
The number of bytes an image must use before it triggers inversion when debugInvertOversizedImages is true.
getter/setter pair
debugInvertOversizedImages bool
If true, the framework will color invert and horizontally flip images that have been decoded to a size taking at least debugImageOverheadAllowance bytes more than necessary.
getter/setter pair
debugNetworkImageHttpClientProvider HttpClientProvider?
Provider from which NetworkImage will get its HttpClient in debug builds.
getter/setter pair
debugOnPaintImage PaintImageCallback?
If not null, called when the framework is about to paint an Image to a Canvas with an ImageSizeInfo that contains the decoded size of the image as well as its output size.
getter/setter pair
imageCache ImageCache
The singleton that implements the Flutter framework's image cache.
no setter

Functions

api<T extends NyApiService>(dynamic request(T request), {BuildContext? context, Map<String, dynamic> headers = const {}, String? bearerToken, String? baseUrl, int? page, String? queryNamePage, String? queryNamePerPage, int? perPage, int? retry, Duration? retryDelay, bool retryIf(DioException dioException)?, bool? shouldSetAuthHeaders, List<Type> events = const []}) → dynamic
api helper Example:
applyBoxFit(BoxFit fit, Size inputSize, Size outputSize) FittedSizes
Apply a BoxFit value.
axisDirectionIsReversed(AxisDirection axisDirection) bool
Returns whether traveling along the given axis direction visits coordinates along that axis in numerically decreasing order.
axisDirectionToAxis(AxisDirection axisDirection) Axis
Returns the Axis that contains the given AxisDirection.
bootApplication(Map<Type, NyProvider> providers) Future<Nylo>
Boots application providers.
bootFinished(Nylo nylo, Map<Type, NyProvider> providers, {String key = "nylo"}) Future<Nylo>
Called after Nylo finishes booting.
combineSemanticsInfo(List<InlineSpanSemanticsInformation> infoList) List<InlineSpanSemanticsInformation>
Combines _semanticsInfo entries where permissible.
dataToModel<T>({required dynamic data, Map<Type, dynamic>? modelDecoders}) → T
Return an object from your modelDecoders using data.
debugAssertAllPaintingVarsUnset(String reason, {bool debugDisableShadowsOverride = false}) bool
Returns true if none of the painting library debug variables have been changed.
debugDescribeTransform(Matrix4? transform) List<String>
Returns a list of strings representing the given transform in a format useful for TransformProperty.
debugFlushLastFrameImageSizeInfo() → void
Flushes inter-frame tracking of image size information from paintImage.
decodeImageFromList(Uint8List bytes) Future<Image>
Creates an image from a list of bytes.
detect24HourFormat(BuildContext context) bool
A function that returns a boolean value to determine if the 24-hour format should be used based on the current locale.
dump(dynamic value, {String? tag, bool alwaysPrint = false}) → dynamic
Dump a message to the console. Example:
event<T>({Map? data}) → dynamic
Event helper for Nylo Example:
flipAxis(Axis direction) Axis
Returns the opposite of the given Axis.
flipAxisDirection(AxisDirection axisDirection) AxisDirection
Returns the opposite of the given AxisDirection.
getAppTextTheme(TextStyle appThemeFont, TextTheme textTheme) TextTheme
Returns a text theme for a app font. Returns a TextTheme.
getEnv(String key, {dynamic defaultValue}) → dynamic
Returns a value from the .env file the key must exist as a string value e.g. APP_NAME.
getImageAsset(String imageName) String
Returns the full image path for a image in /public/assets/images/ directory. Provide the name of the image, using imageName parameter.
getPublicAsset(String asset) String
Returns the full path for an asset in /public/assets directory. Usage e.g. getPublicAsset('videos/welcome.mp4');
hashList(Iterable<Object?>? arguments) int
Combine the Object.hashCode values of an arbitrary number of objects from an Iterable into one value. This function will return the same value if given null as if given an empty list.
hashValues(Object? arg01, Object? arg02, [Object? arg03 = _hashEnd, Object? arg04 = _hashEnd, Object? arg05 = _hashEnd, Object? arg06 = _hashEnd, Object? arg07 = _hashEnd, Object? arg08 = _hashEnd, Object? arg09 = _hashEnd, Object? arg10 = _hashEnd, Object? arg11 = _hashEnd, Object? arg12 = _hashEnd, Object? arg13 = _hashEnd, Object? arg14 = _hashEnd, Object? arg15 = _hashEnd, Object? arg16 = _hashEnd, Object? arg17 = _hashEnd, Object? arg18 = _hashEnd, Object? arg19 = _hashEnd, Object? arg20 = _hashEnd]) int
Combine up to twenty objects' hash codes into one value.
lerpFontVariations(List<FontVariation>? a, List<FontVariation>? b, double t) List<FontVariation>?
Interpolate between two lists of FontVariation objects.
loadJson<T>(String fileName, {bool cache = true}) Future<T?>
Load a json file from the assets folder.
match<T>(dynamic value, Map<String, dynamic> values(), {dynamic defaultValue}) → T?
Match a value from a Map of data. It will return null if a match is not found.
now() DateTime
Get the DateTime.now() value.
nyApi<T>({required dynamic request(T), Map<Type, dynamic> apiDecoders = const {}, BuildContext? context, Map<String, dynamic> headers = const {}, String? bearerToken, String? baseUrl, int? page, int? perPage, String queryParamPage = "page", String? queryParamPerPage, int? retry = 0, Duration? retryDelay, bool retryIf(DioException dioException)?, bool? shouldSetAuthHeaders, List<Type> events = const []}) Future
API helper
nyColorStyle<T>(BuildContext context, {String? themeId}) → T
Helper to get the color styles Find a color style from the Nylo's appThemes.
nyEvent<T>({Map? params, Map<Type, NyEvent> events = const {}}) → dynamic
Event helper
nyHexColor(String hexColor) Color
Hex Color
nyRoutes(dynamic build(NyRouter router)) NyRouter
Builds the routes in the router.dart file
paintBorder(Canvas canvas, Rect rect, {BorderSide top = BorderSide.none, BorderSide right = BorderSide.none, BorderSide bottom = BorderSide.none, BorderSide left = BorderSide.none}) → void
Paints a border around the given rectangle on the canvas.
paintImage({required Canvas canvas, required Rect rect, required Image image, String? debugImageLabel, double scale = 1.0, double opacity = 1.0, ColorFilter? colorFilter, BoxFit? fit, Alignment alignment = Alignment.center, Rect? centerSlice, ImageRepeat repeat = ImageRepeat.noRepeat, bool flipHorizontally = false, bool invertColors = false, FilterQuality filterQuality = FilterQuality.medium, bool isAntiAlias = false, BlendMode blendMode = BlendMode.srcOver}) → void
Paints an image into the given rectangle on the canvas.
paintZigZag(Canvas canvas, Paint paint, Offset start, Offset end, int zigs, double width) → void
Draw a line between two points, which cuts diagonally back and forth across the line that connects the two points.
positionDependentBox({required Size size, required Size childSize, required Offset target, required bool preferBelow, double verticalOffset = 0.0, double margin = 10.0}) Offset
Position a child box within a container box, either above or below a target point.
routeTo(String routeName, {dynamic data, Map<String, dynamic>? queryParameters, NavigationType navigationType = NavigationType.push, dynamic result, bool removeUntilPredicate(Route route)?, PageTransitionSettings? pageTransitionSettings, PageTransitionType? pageTransition, dynamic onPop(dynamic value)?}) → dynamic
Navigate to a new route.
routeToAuth({dynamic data, NavigationType navigationType = NavigationType.pushAndForgetAll, dynamic result, bool removeUntilPredicate(Route route)?, PageTransitionSettings? pageTransitionSettings, PageTransitionType? pageTransition, dynamic onPop(dynamic value)?}) → dynamic
Navigate to the auth route.
routeToInitial({dynamic data, NavigationType navigationType = NavigationType.pushAndForgetAll, dynamic result, bool removeUntilPredicate(Route route)?, PageTransitionSettings? pageTransitionSettings, PageTransitionType? pageTransition, dynamic onPop(dynamic value)?}) → dynamic
Navigate to the initial route.
showAdaptiveDateTimePicker({required BuildContext context, required DateTimeFieldPickerMode mode, DateTimeFieldPickerPlatform? pickerPlatform, DateTime? initialPickerDateTime, DateTime? firstDate, DateTime? lastDate, CupertinoDatePickerOptions cupertinoDatePickerOptions = const CupertinoDatePickerOptions(), MaterialDatePickerOptions materialDatePickerOptions = const MaterialDatePickerOptions(), MaterialTimePickerOptions materialTimePickerOptions = const MaterialTimePickerOptions()}) Future<DateTime?>
Displays an adaptive date and time picker based on the current platform.
showCupertinoDateTimePicker({required BuildContext context, required DateTimeFieldPickerMode mode, DateTime? initialPickerDateTime, DateTime? firstDate, DateTime? lastDate, CupertinoDatePickerOptions cupertinoDatePickerOptions = const CupertinoDatePickerOptions()}) Future<DateTime?>
Displays a Cupertino-style date and time picker in a modal popup.
showMaterialDateTimePicker({required BuildContext context, required DateTimeFieldPickerMode mode, DateTime? initialPickerDateTime, DateTime? firstDate, DateTime? lastDate, MaterialDatePickerOptions materialDatePickerOptions = const MaterialDatePickerOptions(), MaterialTimePickerOptions materialTimePickerOptions = const MaterialTimePickerOptions()}) Future<DateTime?>
Displays a Material-style date and time picker in a modal popup. The context parameter is required to provide the necessary context for the picker. The mode parameter specifies whether to show a date, time, or both date and time picker. The initialPickerDateTime parameter sets the initial date and time to be displayed by the picker.
showNextLog() → void
If you call showNextLog it will force the app to display the next 'NyLogger' log even if your app's APP_DEBUG is set to false.
showToastNotification(BuildContext context, {ToastNotificationStyleType? style, String? title, IconData? icon, String? description, Duration? duration}) → dynamic
Display a new Toast notification to the user. Provide a valid ToastNotificationStyleType i.e. ToastNotificationStyleType.SUCCESS Set a title, description to personalise the message.
sleep(int seconds) → dynamic
Sleep for a given amount of milliseconds.
textDirectionToAxisDirection(TextDirection textDirection) AxisDirection
Returns the AxisDirection in which reading occurs in the given TextDirection.
trans(String key, {Map<String, String>? arguments}) String
Returns the translation value from the key you provide. E.g. trans("hello") lang translation will be returned for the app locale.
updateState<T>(String name, {dynamic data, dynamic setValue(T? currentValue)?}) → void
Update's the state of a NyState Widget in your application. Provide the name of the state and then return a value in the callback setValue.

Typedefs

ColorBuilderByAppTheme = Color Function(AppTheme theme)
Gives a AppTheme and builds a Color.
DecoderBufferCallback = Future<Codec> Function(ImmutableBuffer buffer, {bool allowUpscaling, int? cacheHeight, int? cacheWidth})
Performs the decode process for use in ImageProvider.loadBuffer.
DefaultTransformer = SyncTransformer
DioError = DioException
DioError describes the exception info when a request failed.
DioErrorType = DioExceptionType
Deprecated in favor of DioExceptionType and will be removed in future major versions.
DioMediaType = MediaType
The type (alias) for specifying the content-type of the MultipartFile.
FormStyleCheckbox = Map<String, FormCast Function()>
FormStyleCheckbox is a typedef that helps in managing form style checkboxes
FormStyleTextField = Map<String, NyTextField Function(NyTextField)>
FormStyleTextField is a typedef that helps in managing form style text fields
HeaderForEachCallback = void Function(String name, List<String> values)
The signature that iterates header fields.
HttpClientProvider = HttpClient Function()
Signature for a method that returns an HttpClient.
ImageChunkListener = void Function(ImageChunkEvent event)
Signature for listening to ImageChunkEvent events.
ImageDecoderCallback = Future<Codec> Function(ImmutableBuffer buffer, {TargetImageSizeCallback? getTargetSize})
Performs the decode process for use in ImageProvider.loadImage.
ImageErrorListener = void Function(Object exception, StackTrace? stackTrace)
Signature for reporting errors when resolving images.
ImageListener = void Function(ImageInfo image, bool synchronousCall)
Signature for callbacks reporting that an image is available.
InlineSpanVisitor = bool Function(InlineSpan span)
Called on each span as InlineSpan.visitChildren walks the InlineSpan tree.
InterceptorErrorCallback = void Function(DioException error, ErrorInterceptorHandler handler)
The signature of Interceptor.onError.
InterceptorSendCallback = void Function(RequestOptions options, RequestInterceptorHandler handler)
The signature of Interceptor.onRequest.
InterceptorSuccessCallback = void Function(Response response, ResponseInterceptorHandler handler)
The signature of Interceptor.onResponse.
JsonDecodeCallback = FutureOr Function(String)
The callback definition for decoding a JSON string.
JsonEncodeCallback = FutureOr<String> Function(Object)
The callback definition for encoding a JSON object.
NyRouteView = Widget Function(BuildContext context)
Painter = void Function(PaintingContext context, Offset offset)
/ A signature for a function that paints with a PaintingContext.
PaintImageCallback = void Function(ImageSizeInfo info)
Called when the framework is about to paint an Image to a Canvas with an ImageSizeInfo that contains the decoded size of the image as well as its output size.
ProgressCallback = void Function(int count, int total)
The type of a progress listening callback when sending or receiving data.
RequestEncoder = FutureOr<List<int>> Function(String request, RequestOptions options)
The type of a request encoding callback.
RequestHeaders = Map<String, dynamic>
Typedef for RequestHeaders
ResponseDecoder = FutureOr<String?> Function(List<int> responseBytes, RequestOptions options, ResponseBody responseBody)
The type of a response decoding callback.
RouteView = (String, Widget Function(BuildContext context))
Type definition for the route view.
ShaderWarmUpImageCallback = bool Function(Image image)
The signature of debugCaptureShaderWarmUpImage.
ShaderWarmUpPictureCallback = bool Function(Picture picture)
The signature of debugCaptureShaderWarmUpPicture.
SkeletonizerPainter = void Function(SkeletonizerPaintingContext context, Rect paintBounds, Painter paint, TextDirection? textDirection)
A signature for a function that paints with a SkeletonizerPaintingContext.
ThemeChanged = void Function(AppTheme oldTheme, AppTheme newTheme)
ThemeControllerHandler = void Function(ThemeController controller, Future<String?> previouslySavedThemeFuture)
Handler which provides the activated controller.
ValidateStatus = bool Function(int? status)
The type of a response status code validate callback.
VoidCallback = void Function()
Signature of callbacks that have no arguments and return no data.

Exceptions / Errors

DioException
DioException describes the exception info when a request failed.
NetworkImageLoadException
The exception thrown when the HTTP request to load a network image fails.
NotNullableError<T>
A TypeError thrown by _checkNotNullable.
ValidationException
Default implementation of ValidationException which carries a attribute and validationRule.