setupLifeBar method

void setupLifeBar({
  1. Vector2? size,
  2. Color? backgroundColor,
  3. Color? borderColor,
  4. double borderWidth = 2,
  5. List<Color>? colors,
  6. BorderRadius? borderRadius,
  7. BarLifeDrawPosition barLifeDrawPosition = BarLifeDrawPosition.top,
  8. Vector2? offset,
  9. Vector2? textOffset,
  10. TextStyle? textStyle,
  11. bool showLifeText = true,
  12. BarLifeTextBuilder? barLifetextBuilder,
})

Implementation

void setupLifeBar({
  Vector2? size,
  Color? backgroundColor,
  Color? borderColor,
  double borderWidth = 2,
  List<Color>? colors,
  BorderRadius? borderRadius,
  BarLifeDrawPosition barLifeDrawPosition = BarLifeDrawPosition.top,
  Vector2? offset,
  Vector2? textOffset,
  TextStyle? textStyle,
  bool showLifeText = true,
  BarLifeTextBuilder? barLifetextBuilder,
}) {
  _barLifeSize = size;
  _backgroundColor = backgroundColor ?? _backgroundColor;
  _borderColor = borderColor ?? _borderColor;
  _borderWidth = borderWidth;
  _colors = colors;
  _borderRadius = borderRadius ?? _borderRadius;
  _barLifeDrawPosition = barLifeDrawPosition;
  _barOffset = offset;
  _textStyle = textStyle;
  _showLifeText = showLifeText;
  _textOffset = textOffset;
  _barLifetextBuilder = barLifetextBuilder;
}