- When there is protocal error(Not server error or internal script error) from Backend, it throws an error.
() async {
try {
/// Request without route. Resulting an exception.
await wc.getHttp({});
} catch (e) {
/// Got exception.
print('Caught error:');
print(e);
}
}();
- Example 1
() async {
try {
await wc.register(
{'user_email': 'email2@gmail.com', 'user_pass': 'qso8,df'});
} catch (e) {
print('Caught error: $e');
}
}();
- Example 2
() async {
try {
final WordpressController wc = Get.find();
var re = await wc.register({
'user_email': 'cherry@test.com',
'user_pass': 'pw,--3Uuo',
'nickname': 'ShouldBeDisplayName',
'anyvalue': 'canBePut'
});
print('re: $re');
} catch (e) {
print('Got error:');
print(e);
}
}();
- Registration into firebase
(() async {
Map<String, String> data = {
'email': 'kakaotalk12345@kakao.com',
'password': 'Settings.secretKey+1234',
'displayName': 'name123',
'photoUrl': '',
};
print('----> kakaotalk login success: $data');
try {
await auth.loginOrRegisterIntoFirebase(data);
} catch (e) {
print('Going to handle it');
AppService.alertError(e);
}
})();
- How to do the integration test.
- Run the app in debug mode with
App Instrument
launch option.- And wait for the app download resources, video, audios, photos. ( It will take some minutes but it's only one time process. No need to wait on second run.)
Reset test
on English test screen.- Run
export VM_SERVICE_URL="http://127.0.0.1:8181/"; dart test_driver/app_test.dart
to test. You can run this after updating the source code.
- Run the app in debug mode with
- For Firebase, we use 'sonub' project.
- For Facebook, we use 'sonub' project