build method
Implementation
@override
Widget build(
final BuildContext context,
final TreeState state,
final WidgetState nodeState,
) {
return Lottie.network(
/// if the image is null, it will return a default image
image.value != null
? image.value!
: 'https://assets10.lottiefiles.com/packages/lf20_ptplezpy.json',
width: width.get(
forPlay: state.forPlay,
deviceType: state.deviceType,
deviceInfo: state.deviceInfo,
context: context,
isWidth: true,
),
height: height.get(
forPlay: state.forPlay,
deviceType: state.deviceType,
deviceInfo: state.deviceInfo,
context: context,
isWidth: false,
),
fit: BoxFit.contain,
errorBuilder: (context, exception, stackTrace) {
return Container(
color: Colors.transparent,
child: const Placeholder(),
);
},
);
}