fit method

FittedBox fit({
  1. Key? key,
  2. required BoxFit fit,
  3. AlignmentGeometry alignment = Alignment.topLeft,
  4. Clip clipBehavior = Clip.none,
})

设置内容限定模式 >>>

Implementation

FittedBox fit(
    {Key? key,
    required BoxFit fit,
    AlignmentGeometry alignment = Alignment.topLeft,
    Clip clipBehavior = Clip.none}) {
  return FittedBox(
    key: key,
    fit: fit,
    alignment: alignment,
    clipBehavior: clipBehavior,
    child: this,
  );
}