You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pic Quest is a web task platform where users complete tasks by submitting images. It features a beautiful UI, easy navigation, and allows users to earn prizes. Task statuses include failed, pending, and passed. Users can view their balance, withdraw funds, and manage bank details. The platform is powered by a backend API available at devfemibadmus/picquest
Features
File Upload: Submit tasks and documents with file size limits.
Tasks Status: View pending, failed, and passed tasks.
Balance: Check earned balance, transaction history, and supported banks.
Profile: Signup, Signin, and account verification.
SOME MODELS
Tasks submission below, check more in lib/models.dart
Future<String> submitTasks(int taskId, html.File selectedImage) async {
String token = html.window.localStorage['token'] ??'';
try {
var uri =Uri.parse('$baseUrl/api/v1/submit/');
var request = http.MultipartRequest('POST', uri);
request.fields['token'] = token;
request.fields['taskId'] = taskId.toString();
var reader = html.FileReader();
reader.readAsArrayBuffer(selectedImage);
await reader.onLoad.first;
var fileBytes = reader.result asList<int>;
var multipartFile = http.MultipartFile.fromBytes(
'photo',
fileBytes,
filename: selectedImage.name,
);
request.files.add(multipartFile);
var response =await request.send();
var responseBody =await response.stream.bytesToString();
final data =jsonDecode(responseBody);
return data['message'];
} catch (e) {
// print('Error: $e');
}
return'Something went wrong';
}