Delta class

Constructors

Delta()
factory

Properties

area DeltaArea
getter/setter pair
blockedWords List<String>?
We define a list of bad words (badWords) that you want to censor.
getter/setter pair
bottomBarHeight double
The offset from the bottom, in dp
no setter
country DeltaCountry
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
height double
The vertical extent of this size. dp
no setter
length DeltaLength
Converting between all these units of length involves a large number of possible conversions. Here are the conversions between all the mentioned units:
getter/setter pair
orientation Orientation
Get screen orientation
no setter
pixelRatio double
The size of the media in logical pixels (e.g, the size of the screen).
no setter
platform TargetPlatform
The platform the material widgets should adapt to target. Defaults to the current platform, as exposed by defaultTargetPlatform. This should be used in order to style UI elements according to platform conventions. Widgets from the Delta library should use this getter (via Delta.data) to determine the current platform for the purpose of emulating the platform behavior (e.g. scrolling or haptic effects). Widgets and render objects at lower layers that try to emulate the underlying platform can depend on defaultTargetPlatform directly, or may require that the target platform be provided as an argument. The dart:io.Platform object should only be used directly when it's critical to actually know the current platform, without any overrides possible (for example, when a system API is about to be called). In a test environment, the platform returned is TargetPlatform.android regardless of the host platform. (Android was chosen because the tests were originally written assuming Android-like behavior, and we added platform adaptations for other platforms later). Tests can check behavior for other platforms by setting the platform of the Theme explicitly to another TargetPlatform value, or by setting debugDefaultTargetPlatformOverride. Determines the defaults for typography and materialTapTargetSize.
no setter
primaryColor Color
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleHeight double
The ratio of actual height to UI design
no setter
scaleText double
no setter
scaleWidth double
The ratio of actual width to UI design
no setter
statusBarHeight double
The offset from the top, in dp
no setter
textScaleFactor double
The number of font pixels for each logical pixel.
no setter
textTheme TextTheme
Text with a color that contrasts with the card and canvas colors.
no setter
theme ThemeData
********************************************** D ************************************************* ********************************************** E ************************************************ ********************************************** L *********************************************** ********************************************** T ********************************************** ********************************************** A *********************************************
no setter
width double
The horizontal extent of this size.
no setter

Methods

adaptiveHeight(num height) double
Highly adaptable to the device according to UI Design It is recommended to use this method to achieve a high degree of adaptation when it is found that one screen in the UI design does not match the current style effect, or if there is a difference in shape.
adaptiveWidth(num width) double
Adapted to the device width of the UI Design. Height can also be adapted according to this to ensure no deformation , if you want a square
flutterUnitToPixels(num flutterUnit) double
To convert a Flutter unit (e.g., double) to pixels (px), you can use the MediaQuery class to access the device's pixel ratio and then multiply the value you want to convert by this ratio.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pixelsToFlutterUnits(num pixels) double
double pixels is the value you want to convert from pixels to Flutter units. MediaQuery.of(context).devicePixelRatio retrieves the device's pixel ratio, which represents the number of physical pixels on the screen for each logical pixel in Flutter. pixels / pixelRatio performs the conversion by dividing the input pixels by the pixel ratio.
radius(num r) double
Adapt according to the smaller of width or height
setSp(num fontSize) double
Font size adaptation method
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

data Delta
final

Static Methods

ensureScreenSize([FlutterView? window, Duration duration = const Duration(milliseconds: 10)]) Future<void>
Manually wait for window size to be initialized
init(BuildContext context, {Size designSize = defaultSize, bool splitScreenMode = false, ThemeData? defaultTheme, List<String>? censorWords, bool minTextAdapt = false, bool scaleByHeight = false}) Future<void>
Initializing the library.
registerToBuild(BuildContext context, [bool withDescendants = false]) → void
Experimental

Constants

defaultSize → const Size