tryPerform method

Future<T?> tryPerform()

Implementation

Future<T?> tryPerform() async {
  final canPerformAction = await canPerform();
  if (canPerformAction) {
    return await perform();
  }
  return null;
}