knt_ui library

Classes

AccessibilitySection
All the simulated accessibility settings.
AndroidBuildVersion
Version values of the current Android operating system build derived from android.os.Build.VERSION.
AndroidDeviceInfo
Information derived from android.os.Build.
AndroidDisplayMetrics
Details for the current display
AssetLoader
abstract class used to building your Custom AssetLoader Example:
BaseDeviceInfo
The base class for platform's device info.
Bidi
This provides utility methods for working with bidirectional text. All of the methods are static, and are organized into a class primarily to group them together for documentation and discoverability.
BidiFormatter
Bidi stands for Bi-directional text. According to Wikipedia: Bi-directional text is text containing text in both text directionalities, both right-to-left (RTL) and left-to-right (LTR). It generally involves text containing different types of alphabets, but may also refer to boustrophedon, which is changing text directionality in each row.
BytesLoader
An interface that can be implemented to support decoding vector graphic binary assets from different byte sources.
Cache
The cache for decoded SVGs.
CachedNetworkImage
Image widget to show NetworkImage with caching functionality.
CachedNetworkImageProvider
IO implementation of the CachedNetworkImageProvider; the ImageProvider to load network images using a cache.
ColorMapper
A class that transforms from one color to another during SVG parsing.
CustomDeviceInfoData
Info about a device and its frame.
DashedLinePainter
DateFormat
DateFormat is for formatting and parsing dates in a locale-sensitive manner.
DefaultSvgTheme
The SVG theme to apply to descendant SvgPicture widgets which don't have explicit theme values.
DefinedSetting
DefinedUI
DeviceFrame
Simulate a physical device and embedding a virtual screen into it.
DeviceFrameStyle
The device frame style only allows to update the keyboardStyle for now.
DeviceFrameTheme
The theme gives a style to all its descentant device frames.
DeviceIdentifier
A unique identifier that represents a device.
DeviceInfo
Info about a device and its frame.
DeviceInfoPlugin
Provides device and operating system information.
DeviceInfoPlusLinuxPlugin
See DeviceInfoPlatform
DeviceInfoPlusWindowsPlugin
The Windows implementation of DeviceInfoPlatform.
DeviceKeyboardStyle
The keyboard style allows to customize the virtual onscreen keyboard visuals.
DevicePreview
Simulates how the result of builder would render on different devices.
DevicePreviewData
A DevicePreview configuration snapshot that can be serialized to be persisted between sessions.
DevicePreviewSettingsData
Settings of device preview itself (tool bar position, background style).
DevicePreviewState
Represents the current state of the device preview.
DevicePreviewStorage
A storage for device preview user's preferences.
DevicePreviewStore
The store is a container for the current state of the device preview.
Devices
A list of common device specifications sorted by target platform.
DeviceScreenshot
A screenshot from a preview.
DeviceSection
All the simulated properties for the device.
DottedScaleXWidget
DownloadProgress
Progress of the file that is being downloaded from the originalUrl.
EasyLocalization
EasyLocalization example:
FetchedGalleryPhotosState
FileDevicePreviewStorage
A storage that saves device preview user preferences into a single file as json content.
Fluttertoast
Plugin to show a toast message on screen Only for android, ios and Web platforms
FocusDetector
Fires callbacks every time the widget appears or disappears from the screen.
FontSizeResolvers
FToast
Runs on dart side this has no interaction with the Native Side Works with all platforms just in two lines of code final fToast = FToast().init(context) fToast.showToast(child)
GenericDesktopMonitorFramePainter
GenericLaptopFramePainter
GenericPhoneFramePainter
GenericTabletFramePainter
HttpAuthRequest
Defines the parameters of a pending HTTP authentication request received by the webview through a HttpAuthRequestCallback.
InAppReview
Intl
The Intl class provides a common entry point for internationalization related tasks. An Intl instance can be created for a particular locale and used to create a date format via anIntl.date(). Static methods on this class are also used in message formatting.
IosDeviceInfo
Information derived from UIDevice.
IosUtsname
Information derived from utsname. See http://pubs.opengroup.org/onlinepubs/7908799/xsh/sysutsname.h.html for details.
JavaScriptAlertDialogRequest
Defines the parameters that support PlatformWebViewController.setOnJavaScriptAlertDialog.
JavaScriptConfirmDialogRequest
Defines the parameters that support PlatformWebViewController.setOnJavaScriptConfirmDialog.
JavaScriptConsoleMessage
Represents a console message written to the JavaScript console.
JavaScriptMessage
A message that was sent by JavaScript code running in a WebView.
JavaScriptTextInputDialogRequest
Defines the parameters that support PlatformWebViewController.setOnJavaScriptTextInputDialog.
KntAppBar
KntAppInfo
KntAppWrapper
KntBaseToolBar
KntBlackStatusBarPage
KntBottomNav
KntBottomNavScaffold
KntButton
KntCachedImage
KntChip
KntDashDivider
KntDefaultAppBar
KntDefaultExpandableAppBar
KntDefaultImage
KntDefaultIssuingWidget
KntDefaultToolBar
KntDivider
KntDraggablePanel
KntEditText
KntExpandableAppBar
KntExpandableSection
KntExpandableWidget
KntFullScreenInverseProgressBar
KntFullScreenProgressBar
KntGalleryPage
KntGalleryView
KntGeneralPicker<T>
KntImage
KntIssuingWidget
KntLocalImage
KntPhotoBrowserPage
KntProgressBar
KntRectangleProgress
KntRipple
KntSearchBar
KntSelectionPopup
KntSelectionPopupOption
KntSelectionPopupPresenter
KntSelectionPopupStyle
KntShimmer
KntSimpleButton
KntSimpleEditText
KntSimplePicker
KntStaggeredGallery
Staggered Gallery with default 2 styles
KntToolBar
KntUi
KntWebPage
KntWhiteStatusBarPage
LinuxDeviceInfo
Device information for a Linux system.
LoadedGalleryPhotosState
LoadGalleryPhotosEvent
MacOsDeviceInfo
Object encapsulating MACOS device information.
MicroMoney
Used primarily for currency formatting, this number-like class stores millionths of a currency unit, typically as an Int64.
MultiImageStreamCompleter
An ImageStreamCompleter with support for loading multiple images.
NamedLocale
A locale that has a display name.
Callbacks for accepting or rejecting navigation changes, and for tracking the progress of navigation requests.
Defines the parameters of the pending navigation callback.
NoDevicePreviewStorage
A storage that keep preferences only in memory : they are reset on each fresh start of the app.
NumberFormat
Provides the ability to format a number in a locale-specific way.
PackageInfo
Application metadata. Provides application bundle information on iOS and application package information on Android.
PackageInfoPlusLinuxPlugin
The Linux implementation of PackageInfoPlatform.
PackageInfoPlusWindowsPlugin
The Windows implementation of PackageInfoPlatform.
PagingGalleryBloc
Photo
PhotoView
A StatefulWidget that contains all the photo view rendering elements.
PhotoViewComputedScale
A class that work as a enum. It overloads the operator * saving the double as a multiplier.
PhotoViewController
The default implementation of PhotoViewControllerBase.
PhotoViewControllerBase<T extends PhotoViewControllerValue>
The interface in which controllers will be implemented.
PhotoViewControllerValue
The state value stored and streamed by PhotoViewController.
PhotoViewGallery
A StatefulWidget that shows multiple PhotoView widgets in a PageView
PhotoViewGalleryPageOptions
A helper class that wraps individual options of a page in PhotoViewGallery
PhotoViewGestureDetectorScope
An InheritedWidget responsible to give a axis aware scope to PhotoViewGestureRecognizer.
PhotoViewHeroAttributes
Data class that holds the attributes that are going to be passed to PhotoViewImageWrapper's Hero.
PhotoViewScaleStateController
A controller responsible only by scaleState.
PictureInfo
The deocded result of a vector graphics asset.
PictureProvider
Deprecated class, will be removed, does not do anything.
PlatformNavigationDelegateCreationParams
Object specifying creation parameters for creating a PlatformNavigationDelegate.
PlatformWebViewControllerCreationParams
Object specifying creation parameters for creating a PlatformWebViewController.
PlatformWebViewCookieManagerCreationParams
Object specifying creation parameters for creating a PlatformWebViewCookieManager.
PlatformWebViewPermissionRequest
Permissions request when web content requests access to protected resources.
PlatformWebViewWidgetCreationParams
Object specifying creation parameters for creating a WebViewWidgetDelegate.
PreferencesDevicePreviewStorage
Since share_preferences makes pub considering the package as not supported we should remove this functionnality from the web version to get the maximum score.
RebuildFactors
REdgeInsets
REdgeInsetsDirectional
RenderSliverStaggeredGrid
A sliver that places multiple box children in a two dimensional arrangement.
RenderSliverVariableSizeBoxAdaptor
A sliver with multiple variable size box children.
RenderSliverVariableSizeBoxChildManager
A delegate used by RenderSliverVariableSizeBoxAdaptor to manage its children.
RingPainter
RootBundleAssetLoader
default used is RootBundleAssetLoader which uses flutter's assetloader
RPadding
RSizedBox
ScaleYWidget
ScreenUtil
ScreenUtilInit
ScrollPositionChange
Defines the parameters of the scroll position change callback.
SettingsSection
All the settings for customizing the preview.
Share
Plugin for summoning a platform share sheet.
Shimmer
A widget renders shimmer effect over child widget tree.
SliverStaggeredGrid
A sliver that places multiple box children in a two dimensional arrangement.
SliverStaggeredGridDelegate
Creates staggered grid layouts.
SliverStaggeredGridDelegateWithFixedCrossAxisCount
Creates staggered grid layouts with a fixed number of cells in the cross axis.
SliverStaggeredGridDelegateWithMaxCrossAxisExtent
Creates staggered grid layouts with tiles that each have a maximum cross-axis extent.
SliverStaggeredGridGeometry
Describes the placement of a child in a RenderSliverStaggeredGrid.
SliverVariableSizeBoxAdaptorElement
An element that lazily builds children for a SliverVariableSizeBoxAdaptorWidget.
SliverVariableSizeBoxAdaptorParentData
Parent data structure used by RenderSliverVariableSizeBoxAdaptor.
SliverVariableSizeBoxAdaptorWidget
A base class for sliver that have multiple variable size box children.
SpinKitChasingDots
SpinKitCircle
SpinKitCubeGrid
SpinKitDancingSquare
SpinKitDoubleBounce
SpinKitDualRing
SpinKitFadingCircle
SpinKitFadingCube
SpinKitFadingFour
SpinKitFadingGrid
SpinKitFoldingCube
SpinKitHourGlass
SpinKitPianoWave
SpinKitPouringHourGlass
SpinKitPouringHourGlassRefined
SpinKitPulse
SpinKitPulsingGrid
SpinKitPumpCurve
SpinKitPumpingHeart
SpinKitRing
SpinKitRingCurve
SpinKitRipple
SpinKitRotatingCircle
SpinKitRotatingPlain
SpinKitSpinningCircle
SpinKitSpinningLines
SpinKitSquareCircle
SpinKitThreeBounce
SpinKitThreeInOut
SpinKitWanderingCubes
SpinKitWave
SpinkitWaveCustomPaint
SpinKitWaveSpinner
SpinningLinesPainter
StaggeredGridConfiguration
Specifies how a staggered grid is configured.
StaggeredGridView
A scrollable, 2D array of widgets with variable sizes.
StaggeredTile
Holds the dimensions of a StaggeredGridView's tile.
Svg
A utility class for decoding SVG data to a DrawableRoot or a PictureInfo.
SvgAssetLoader
A BytesLoader that decodes and parses an SVG asset in an isolate and creates a vector_graphics binary representation.
SvgBytesLoader
A BytesLoader that decodes and parses a UTF-8 encoded SVG string from a Uint8List in an isolate and creates a vector_graphics binary representation.
SvgCacheKey
A SvgTheme aware cache key.
SvgFileLoader
A BytesLoader that decodes SVG data from a file in an isolate and creates a vector_graphics binary representation.
SvgLoader<T>
A BytesLoader that parses a SVG data in an isolate and creates a vector_graphics binary representation.
SvgNetworkLoader
A BytesLoader that decodes and parses a UTF-8 encoded SVG string the network in an isolate and creates a vector_graphics binary representation.
SvgPicture
A widget that will parse SVG data for rendering on screen.
SvgStringLoader
A BytesLoader that parses an SVG string in an isolate and creates a vector_graphics binary representation.
SvgTheme
A theme used when decoding an SVG picture.
SystemSection
All the simulated system settings.
TabIcon
TextDirection
Represents directionality of text.
ToastStateFulState
State for _ToastStateFul
ToolPanelSection
A Sliver representing a section in the DevicePreview menu.
UrlChange
Details of the change to a web view's url.
VectorGraphicUtilities
Utility functionality for interaction with vector graphic assets.
VirtualKeyboard
Display a simulated on screen keyboard at the bottom of a child widget.
WebBrowserInfo
Information derived from navigator.
WebResourceError
Error returned in WebView.onWebResourceError when a web resource loading error has occurred.
WebViewConfiguration
Additional configuration options for LaunchMode.inAppWebView.
WebViewController
Controls a WebView provided by the host platform.
WebViewCookie
A cookie that can be set globally for all web views using WebViewCookieManagerPlatform.
WebViewCookieManager
Manages cookies pertaining to all WebViews.
WebViewCredential
Defines the response parameters of a pending HttpAuthRequest received by the webview.
WebViewPermissionRequest
Permissions request when web content requests access to protected resources.
WebViewPermissionResourceType
Types of resources that can require permissions.
WebViewPlatform
Interface for a platform implementation of a WebView.
WebViewWidget
Displays a native WebView as a Widget.
WindowsDeviceInfo
Object encapsulating WINDOWS device information.

Enums

BrowserName
List of supported browsers
CacheManagerLogLevel
Log levels of the cache manager. Debug shows failed downloads and verbose also shows successful downloads and cache retrievals.
DevicePreviewBackgroundThemeData
DevicePreviewToolBarPositionData
DevicePreviewToolBarThemeData
DeviceType
A device form factor.
JavaScriptLogLevel
Represents the severity of a JavaScript log message.
JavaScriptMode
Describes the state of JavaScript support in a given web view.
LaunchMode
The desired mode to launch a URL.
LoadRequestMethod
Defines the supported HTTP methods for loading a page in PlatformWebViewController.
A decision on how to handle a navigation request.
PhotoViewScaleState
A way to represent the step of the "doubletap gesture cycle" in which PhotoView is.
ScaleType
ShimmerDirection
An enum defines all supported directions of shimmer effect
ShowMode
SpinKitPianoWaveType
SpinKitWaveType
StorageType
Toast
Toast Length Only for Android Platform
ToastGravity
ToastGravity Used to define the position of the Toast on the screen
WebResourceErrorType
Possible error type categorizations used by WebResourceError.

Mixins

SU
TileContainerRenderObjectMixin<ChildType extends RenderObject, ParentDataType extends ParentData>
Generic mixin for render objects with a list of children.

Extensions

BorderRaduisExtension on BorderRadius
BoxConstraintsExtension on BoxConstraints
BuildContextEasyLocalizationExtension on BuildContext
BuildContext extension method for access to locale, supportedLocales, fallbackLocale, delegates and deleteSaveLocale()
DeviceInfoExtension on DeviceInfo
DevicePreviewStateHelperExtensions on DevicePreviewStore
A set of extension to triggers updates of the state.
EdgeInsetsExtension on EdgeInsets
KntUiExt on BuildContext
LocaleToStringHelper on Locale
Easy Localization locale helper
MapExtension on Map<K, dynamic>
PhotoViewScaleStateIZoomingExtension on PhotoViewScaleState
RaduisExtension on Radius
SizeExtension on num
StringToLocaleHelper on String
Easy Localization string locale helper
StringTranslateExtension on String
Strings extension method for access to tr() and plural() Example :
TextTranslateExtension on Text
Text widget extension method for access to tr() and plural() Example :

Constants

defaultAvailableLocales → const List<NamedLocale>
A set of many named locales.
defaultUriImage → const String
vg → const VectorGraphicUtilities
The VectorGraphicUtilities instance.

Properties

svg Svg
Instance for Svg's utility methods, which can produce a DrawableRoot or PictureInfo from String or Uint8List.
final
timeDilation double
Slows down animations by this factor to help in development.
no setter

Functions

basicLocaleListResolution(List<Locale>? preferredLocales, Iterable<Locale> supportedLocales) Locale
buildGenericDesktopMonitorDevice({required TargetPlatform platform, required String id, required String name, required Size screenSize, required Rect windowPosition, EdgeInsets safeAreas = EdgeInsets.zero, double pixelRatio = 2.0, EdgeInsets? rotatedSafeAreas, GenericDesktopMonitorFramePainter? framePainter}) DeviceInfo
Creates a generic desktop monitor device definition for the given name, target platform and screenSize. The windowPosition defines the position of a virtual window with a window frame adapted for the given platform.
buildGenericLaptopDevice({required TargetPlatform platform, required String id, required String name, required Size screenSize, required Rect windowPosition, EdgeInsets safeAreas = EdgeInsets.zero, double pixelRatio = 2.0, EdgeInsets? rotatedSafeAreas, GenericLaptopFramePainter? framePainter}) DeviceInfo
Creates a generic laptop device definition.
buildGenericPhoneDevice({required TargetPlatform platform, required String id, required String name, required Size screenSize, EdgeInsets safeAreas = EdgeInsets.zero, EdgeInsets rotatedSafeAreas = EdgeInsets.zero, double pixelRatio = 2.0, GenericPhoneFramePainter framePainter = const GenericPhoneFramePainter()}) DeviceInfo
Creates a generic phone device definition.
buildGenericTabletDevice({required TargetPlatform platform, required String id, required String name, required Size screenSize, EdgeInsets safeAreas = EdgeInsets.zero, EdgeInsets rotatedSafeAreas = EdgeInsets.zero, double pixelRatio = 2.0, GenericTabletFramePainter framePainter = const GenericTabletFramePainter()}) DeviceInfo
Creates a generic tablet device definition.
canLaunch(String urlString) Future<bool>
Checks whether the specified URL can be handled by some app installed on the device.
canLaunchUrl(Uri url) Future<bool>
Checks whether the specified URL can be handled by some app installed on the device.
closeInAppWebView() Future<void>
Closes the current in-app web view, if one was previously opened by launchUrl.
closeWebView() Future<void>
Closes the current WebView, if one was previously opened via a call to launch.
defaultScaleStateCycle(PhotoViewScaleState actual) PhotoViewScaleState
The default ScaleStateCycle
FToastBuilder() TransitionBuilder
Simple builder method to create a TransitionBuilder and for the use in MaterialApp builder method
launch(String urlString, {bool? forceSafariVC, bool forceWebView = false, bool enableJavaScript = false, bool enableDomStorage = false, bool universalLinksOnly = false, Map<String, String> headers = const <String, String>{}, Brightness? statusBarBrightness, String? webOnlyWindowName}) Future<bool>
Parses the specified URL string and delegates handling of it to the underlying platform.
launchUrl(Uri url, {LaunchMode mode = LaunchMode.platformDefault, WebViewConfiguration webViewConfiguration = const WebViewConfiguration(), String? webOnlyWindowName}) Future<bool>
Passes url to the underlying platform for handling.
localeFromString(String localeString) Locale
Convert string locale localeString to Locale
localeToString(Locale locale, {String separator = '_'}) String
Convert locale to Srting with custom separator
plural(String key, num value, {List<String>? args, BuildContext? context, Map<String, String>? namedArgs, String? name, NumberFormat? format}) String
function translate with pluralization key Localization key value Number value for pluralization BuildContext The location in the tree where this widget builds args List of localized strings. Replaces {} left to right namedArgs Map of localized strings. Replaces the name keys {key_name} according to its name name Name of number value. Replaces {$name} to value format Formats a numeric value using a NumberFormat class
supportsCloseForLaunchMode(LaunchMode mode) Future<bool>
Returns true if closeInAppWebView is supported for mode in the current platform implementation.
supportsLaunchMode(LaunchMode mode) Future<bool>
Returns true if mode is supported by the current platform implementation.
toBeginningOfSentenceCase(String? input, [String? locale]) String?
Convert a string to beginning of sentence case, in a way appropriate to the locale.
tr(String key, {BuildContext? context, List<String>? args, Map<String, String>? namedArgs, String? gender}) String
Main function for translate your language keys key Localization key BuildContext The location in the tree where this widget builds args List of localized strings. Replaces {} left to right namedArgs Map of localized strings. Replaces the name keys {key_name} according to its name gender Gender switcher. Changes the localized string based on gender string
trExists(String key) bool

Typedefs

AbsolutePathConverter = Future<String> Function(String)
FontSizeResolver = double Function(num fontSize, ScreenUtil instance)
ImageWidgetBuilder = Widget Function(BuildContext context, ImageProvider<Object> imageProvider)
Builder function to create an image widget. The function is called after the ImageProvider completes the image loading.
IndexedStaggeredTileBuilder = StaggeredTile? Function(int index)
Signature for a function that creates StaggeredTile for a given index.
KntAppBuilder = Widget Function(BuildContext context, Locale?, PreviewDeviceAppBuilder? )
LoadingBuilder = Widget Function(BuildContext context, ImageChunkEvent? event)
A type definition for a callback to show a widget while the image is loading, a ImageChunkEvent is passed to inform progress
LoadingErrorWidgetBuilder = Widget Function(BuildContext context, String url, Object error)
Builder function to create an error widget. This builder is called when the image failed loading, for example due to a 404 NotFound exception.
Signature for callbacks that report a pending navigation request.
PageEventCallback = void Function(String url)
Signature for callbacks that report page events triggered by the native web view.
PhotoViewGalleryBuilder = PhotoViewGalleryPageOptions Function(BuildContext context, int index)
A type definition for a Function that defines a page in PhotoViewGallery.build
PhotoViewGalleryPageChangedCallback = void Function(int index)
A type definition for a Function that receives a index after a page change in PhotoViewGallery
PhotoViewImageScaleEndCallback = dynamic Function(BuildContext context, ScaleEndDetails details, PhotoViewControllerValue controllerValue)
A type definition for a callback when a user finished scale
PhotoViewImageTapDownCallback = dynamic Function(BuildContext context, TapDownDetails details, PhotoViewControllerValue controllerValue)
A type definition for a callback when the user taps down the photoview region
PhotoViewImageTapUpCallback = dynamic Function(BuildContext context, TapUpDetails details, PhotoViewControllerValue controllerValue)
A type definition for a callback when the user taps up the photoview region
PlaceholderWidgetBuilder = Widget Function(BuildContext context, String url)
Builder function to create a placeholder widget. The function is called once while the ImageProvider is loading the image.
PositionedToastBuilder = Widget Function(BuildContext context, Widget child)
Signature for a function to buildCustom Toast
PreviewDeviceAppBuilder = Widget Function(BuildContext, Widget?)
ProgressCallback = void Function(int progress)
Signature for callbacks that report loading progress of a page.
ProgressIndicatorBuilder = Widget Function(BuildContext context, String url, DownloadProgress progress)
Builder function to create a progress indicator widget. The function is called every time a chuck of the image is downloaded from the web, but at least once during image loading.
RebuildFactor = bool Function(MediaQueryData old, MediaQueryData data)
ScaleStateCycle = PhotoViewScaleState Function(PhotoViewScaleState actual)
A type definition for a Function that receives the actual PhotoViewScaleState and returns the next one It is used internally to walk in the "doubletap gesture cycle". It is passed to PhotoView.scaleStateCycle
ScaleStateListener = void Function(double prevScale, double nextScale)
ScreenUtilInitBuilder = Widget Function(BuildContext context, Widget? child)
WebResourceErrorCallback = void Function(WebResourceError error)
Signature for callbacks that report a resource loading error.