createUser method
Implementation
Future createUser({
required String userName,
required String password,
required String name,
String? mobile,
String? mobileVerification
}) async {
var url = '/create-user';
var params = {
'userName': userName,
'password': password,
'name': name,
};
if (mobile != null) {
params['mobile'] = mobile;
}
if (mobileVerification != null) {
params['mobileVerification'] = mobileVerification;
}
var resp = await _invoke(url, params);
if (resp['result'] != 'OK') throw resp['result'];
}