build method

  1. @override
Widget build(
  1. BuildContext context,
  2. AppState appState,
  3. PageState pageState,
  4. AppStylesState stylesState,
  5. dynamic nodeState,
)
override

Implementation

@override
Widget build(
  final BuildContext context,
  final AppState appState,
  final PageState pageState,
  final AppStylesState stylesState,
  final WidgetState nodeState,
) {
  final color = fill.type == FFillType.none
      ? null
      : fill.getColor(
          context,
          nodeState.loop,
        );
  final img = image.get(
    context: context,
    loop: nodeState.loop,
  );
  var result = img.isNotEmpty
      ? img
      : 'https://api.buildwiththeta.com/storage/v1/object/public/theta-assets/logos/Theta_extended_negative.svg';
  return SvgPicture.network(
    result,
    width: width.get(
      context: context,
      isWidth: true,
    ),
    height: height.get(
      context: context,
      isWidth: false,
    ),
    // ignore: deprecated_member_use
    color: color,
    fit: BoxFit.contain,
  );
}