fromView method

Implementation

@mustCallSuper
ViewController fromView(YMRView view) {
  /// ROOT PROPERTIES
  _initCallback(view);
  _initClick(view);

  /// OTHER PROPERTIES
  _initBackdrop(view);
  _initBorder(view);
  _initBorderRadius(view);
  _initIndicator(view);
  _initMargin(view);
  _initOpacity(view);
  _initPadding(view);

  ///
  ///
  ///
  ///
  ///
  hoverColor = view.hoverColor;
  pressedColor = view.pressedColor;
  rippleColor = view.rippleColor;

  /// VIEW CONDITIONAL PROPERTIES
  absorbMode = view.absorbMode ?? false;
  activated = view.activated ?? false;
  enabled = view.enabled ?? true;
  expandable = view.expandable ?? false;
  scrollable = view.scrollable ?? false;
  visible = view.visibility ?? true;
  wrapper = view.wrapper ?? false;

  /// ANIMATION PROPERTIES
  animation = view.animation ?? 0;
  animationType = view.animationType ?? Curves.linear;

  /// VIEW SIZE PROPERTIES
  flex = view.flex ?? 0;
  _dimensionRatio = view.dimensionRatio;
  elevation = view.elevation ?? 0;
  _width = view.width;
  widthState = view.widthState;
  _widthMax = view.widthMax;
  _widthMin = view.widthMin;
  _height = view.height;
  heightState = view.heightState;
  _heightMax = view.heightMax;
  _heightMin = view.heightMin;

  /// VIEW SHADOW PROPERTIES
  shadowColor = view.shadowColor;
  shadow = view.shadow ?? 0;
  _shadowStart = view.shadowStart;
  _shadowEnd = view.shadowEnd;
  _shadowTop = view.shadowTop;
  _shadowBottom = view.shadowBottom;
  shadowHorizontal = view.shadowHorizontal;
  shadowVertical = view.shadowVertical;
  shadowBlurRadius = view.shadowBlurRadius ?? 5;
  shadowBlurStyle = view.shadowBlurStyle ?? BlurStyle.normal;
  shadowSpreadRadius = view.shadowSpreadRadius ?? 0;
  shadowType = view.shadowType ?? ViewShadowType.none;

  /// VIEW DECORATION PROPERTIES
  _background = view.background;
  foreground = view.foreground;
  backgroundBlendMode = view.backgroundBlendMode;
  foregroundBlendMode = view.foregroundBlendMode;
  _backgroundGradient = view.backgroundGradient;
  foregroundGradient = view.foregroundGradient;
  _backgroundImage = view.backgroundImage;
  foregroundImage = view.foregroundImage;
  clipBehavior = view.clipBehavior ?? Clip.antiAlias;
  gravity = view.gravity;
  orientation = view.orientation ?? Axis.vertical;
  _position = view.position;
  positionType = view.positionType ?? ViewPositionType.center;
  scrollController = view.scrollController;
  scrollingType = view.scrollingType ?? ViewScrollingType.none;
  shape = view.shape ?? ViewShape.rectangular;
  transform = view.transform;
  transformGravity = view.transformGravity;
  transform = view.transform;
  child = view.child;

  /// Properties
  roots = view.initRootProperties();

  /// Value States
  backgroundState = view.backgroundState;
  backgroundImageState = view.backgroundImageState;
  backgroundGradientState = view.backgroundGradientState;

  return this;
}