vmBuild method

  1. @override
Widget vmBuild(
  1. BuildContext context,
  2. CropVM vm,
  3. Widget? child,
  4. Widget? state,
)

VM 相关

Implementation

@override
Widget vmBuild(context, CropVM vm, Widget? child, Widget? state) {
  return MyScaffold.center(
    title: "裁剪",
    nextWidget: (_) => TitleAction.stress(
      onTap: (_) => vm.crop(),
      txt: "裁剪",
    ),
    body: (_) => Crop(
      child: Image.file(File(filePath)),
      controller: vm.controller,
      // shape: CropShape.oval,
      shape: BoxShape.circle,
    ),
  );
}