saveAction function

Widget saveAction({
  1. dynamic action()?,
})

save 按钮

Implementation

Widget saveAction({Function()? action}) {
  return Container(
    margin: const EdgeInsets.only(right: 8),
    child: IconButton(
      onPressed: action,
      icon: Opacity(
        opacity: action == null ? 0.5 : 1.0,
        child: Image.asset(
          'icon_save'.imagePng,
          width: 21,
        ),
      ),
    ),
  );
}