buildCircularProgressIndicator method

  1. @protected
Widget buildCircularProgressIndicator(
  1. BuildParameters params
)

Implementation

@protected
Widget buildCircularProgressIndicator(BuildParameters params) {
  final props = params.props;
  final doWorkFunc = events.getFunction(params.context,
      params.actions["doWork"], params.state, params.parentContext);

  if (doWorkFunc != null) {
    Future.delayed(const Duration(milliseconds: 500), doWorkFunc);
  }

  var value = tryParseDouble(props["value"]);
  if (value != null) {
    final maxValue = tryParseDouble(props["maxValue"]);
    if (maxValue != null) {
      value = value / maxValue;
    }
  }

  return CircularProgressIndicator(
    key: properties.getKey(params.id),
    strokeWidth: parseDouble(props["strokeWidth"], defaultValue: 4.0),
    strokeAlign: parseDouble(props["strokeAlign"]),
    color: tryParseColor(props["color"]),
    backgroundColor: tryParseColor(props["backgroundColor"]),
    padding: params.buildProp("padding"),
    constraints: params.buildProp("constraints"),
    value: value,
  );
}