Use enums instead of constants

This commit is contained in:
Ashita Prasad
2023-08-29 04:42:00 +05:30
parent 66a0ef4a04
commit 5ab2867233
2 changed files with 3 additions and 2 deletions

View File

@ -226,6 +226,7 @@ const kMethodsWithBody = [
HTTPVerb.patch,
HTTPVerb.delete,
];
const kDefaultHttpMethod = HTTPVerb.get;
const kDefaultContentType = ContentType.json;

View File

@ -8,14 +8,14 @@ import 'response_model.dart';
class RequestModel {
const RequestModel({
required this.id,
this.method = kDefaultHttpMethod,
this.method = HTTPVerb.get,
this.url = "",
this.name = "",
this.description = "",
this.requestTabIndex = 0,
this.requestHeaders,
this.requestParams,
this.requestBodyContentType = kDefaultContentType,
this.requestBodyContentType = ContentType.json,
this.requestBody,
this.responseStatus,
this.message,