ExtensionContext extension

on

Properties

devicePixelRatio double
similar to MediaQuery.of(this).devicePixelRatio
no setter
getRenderBox RenderBox?
no setter
getWidgetBounds Rect
get Widget Bounds (width, height, left, top, right, bottom and so on).Widgets must be rendered completely. 获取widget Rect
no setter
height double
The same of MediaQuery.of(context).size.height Note: updates when you rezise your screen (like on a browser or desktop window)
no setter
iconColor Color?
give access to Theme.of(context).iconTheme.color
no setter
isDarkMode bool
Check if dark mode theme is enable
no setter
isLandscape bool
check if device is on landscape mode
no setter
isLargeTablet bool
True if the shortestSide is largest than 720p
no setter
isPhone bool
True if the shortestSide is smaller than 600p
no setter
isPortrait bool
check if device is on portrait mode
no setter
isSmallTablet bool
True if the shortestSide is largest than 600p
no setter
isTablet bool
True if the current device is Tablet
no setter
mediaQuery MediaQueryData
similar to MediaQuery.of(context).padding
no setter
mediaQueryPadding EdgeInsets
similar to MediaQuery.of(context).padding
no setter
mediaQueryShortestSide double
get the shortestSide from screen
no setter
mediaQuerySize Size
The same of MediaQuery.of(context).size
no setter
mediaQueryViewInsets EdgeInsets
similar to MediaQuery.of(context).viewInsets
no setter
mediaQueryViewPadding EdgeInsets
similar to MediaQuery.of(context).viewPadding
no setter
orientation Orientation
similar to MediaQuery.of(context).orientation
no setter
showNavBar bool
True if width be larger than 800
no setter
textScaleFactor double
similar to MediaQuery.of(this).textScaleFactor
no setter
textTheme TextTheme
similar to MediaQuery.of(context).padding
no setter
theme ThemeData
similar to MediaQuery.of(context).padding
no setter
width double
The same of MediaQuery.of(context).size.width Note: updates when you rezise your screen (like on a browser or desktop window)
no setter

Methods

getWidgetGlobalToLocal({Offset point = Offset.zero, RenderObject? ancestor}) Offset
Get the coordinates of the widget on the screen.Widgets must be rendered completely. 获取widget在屏幕上的坐标,widget必须渲染完成
getWidgetLocalToGlobal({Offset point = Offset.zero, RenderObject? ancestor}) Offset
Get the coordinates of the widget on the screen.Widgets must be rendered completely. 获取widget在屏幕上的坐标,widget必须渲染完成
getWidgetRectGlobalToLocal({Offset point = Offset.zero, RenderObject? ancestor}) Rect?
Get the Rect of the widget on the screen.Widgets must be rendered completely. 获取widget在屏幕上的Rect,widget必须渲染完成
getWidgetRectLocalToGlobal({Offset point = Offset.zero, RenderObject? ancestor}) Rect?
Get the Rect of the widget on the screen.Widgets must be rendered completely. 获取widget在屏幕上的Rect,widget必须渲染完成
heightTransformer({double dividedBy = 1, double reducedBy = 0.0}) double
Gives you the power to get a portion of the height. Useful for responsive applications.
ratio({double dividedBy = 1, double reducedByW = 0.0, double reducedByH = 0.0}) double
Divide the height proportionally by the given value
widthTransformer({double dividedBy = 1, double reducedBy = 0.0}) double
Gives you the power to get a portion of the width. Useful for responsive applications.