createAsync1<TParam> method

RxCommand<TParam, Unit> createAsync1 <TParam>(AsyncAction1<TParam> action, [ Observable<bool> canExecute ])

Creates a RxCommand for an asynchronous handler function with one parameter and no return type action: handler function canExecute : observable that can bve used to enable/diable the command based on some other state change if omitted the command can be executed always except it's already executing

Implementation

static RxCommand<TParam, Unit> createAsync1<TParam>(AsyncAction1<TParam> action,[Observable<bool> canExecute])
{
    return new RxCommandAsync<TParam,Unit>((x) async {action(x); return Unit.Default;} ,canExecute);
}