build method

  1. @override
Widget build(
  1. BuildContext context, {
  2. EdgeInsets margin = const EdgeInsets.all(0),
  3. Axis orientation = Axis.horizontal,
  4. bool compact = false,
  5. bool floating = false,
})
override

Implementation

@override
Widget build(
  BuildContext context, {
  EdgeInsets margin = const EdgeInsets.all(0),
  Axis orientation = Axis.horizontal,
  bool compact = false,
  bool floating = false,
}) {
  if (toolValue == null) {
    return _buildContainer(
      context,
      null,
      margin: margin,
      orientation: orientation,
      compact: compact,
      floating: floating,
    );
  } else {
    return ValueListenableBuilder<T>(
      valueListenable: toolValue!,
      builder: (context, value, _) {
        return _buildContainer(
          context,
          value,
          margin: margin,
          orientation: orientation,
          compact: compact,
          floating: floating,
        );
      },
    );
  }
}