getDummyUser method
Returns a stub user response for development, without hitting the network.
Simulates a 2-second network delay and returns a hardcoded UserModel payload. Replace with getUser once the real API endpoint is ready.
Implementation
Future<Response<dynamic>> getDummyUser() async {
await Future<void>.delayed(const Duration(seconds: 2));
final Map<String, dynamic> fakeJson = <String, dynamic>{
"id": 1,
"first_name": "Igee",
"last_name": "Theron",
"email": "igee@myfuelorders.co.za",
"notifications_enabled": true,
"profile_image_url": null,
"email_verified_at": null,
"created_at": null,
"updated_at": null,
};
return Response<dynamic>(
data: fakeJson,
statusCode: 200,
requestOptions: RequestOptions(path: '/me'),
);
}