weight method

Modifier weight(
  1. int fraction
)

Wrap the widget into an Expanded Widget fraction the optional parameter,default=1

Implementation

Modifier weight(int fraction) {
  return Modifier._([..._modifiers, (widget) {
    return Expanded(
      flex: fraction,
      child: widget,
    );
  }]);
}