CachedImage class

이미지를 캐시해서 보기

사진을 화면에 가득 채워 나타내려면, width: double.infinity, height: null 로 입력하면 된다. 참고, x_flutter 의 것은 외부에서 사용 불가. 대신, widgets 패키지의 것을 사용.

Example

CachedImage(
  post.authorProfilePhotoUrl,
  borderRadius: 52,
  width: 52,
 height: 52,
  errorIcon: Icon(Icons.account_circle_rounded, size: 52),
),
Inheritance

Constructors

CachedImage(String url, {double width = double.infinity, double? height, Function? onLoadComplete, BoxFit fit = BoxFit.cover, double borderRadius = 0, Widget? errorIcon, double errorIconSize = 24, EdgeInsets placeholderPadding = const EdgeInsets.all(32.0), String? heroTag, Key? key})
const

Properties

borderRadius double
final
errorIcon Widget?
final
errorIconSize double
final
fit BoxFit
final
hashCode int
The hash code for this object.
no setterinherited
height double?
final
heroTag String?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onLoadComplete Function?
final
placeholderPadding EdgeInsets
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
final
width double
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
heroWrapper(Widget image) → dynamic
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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