Skip to content

Commit 32a4eab

Browse files
Add Models
1 parent 73abe61 commit 32a4eab

File tree

8 files changed

+108
-0
lines changed

8 files changed

+108
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import 'package:json_annotation/json_annotation.dart';
2+
part 'data.g.dart';
3+
4+
@JsonSerializable()
5+
class Data {
6+
String? request_id;
7+
Data({this.request_id});
8+
9+
factory Data.fromJson(Map<String, dynamic> json) => _$DataFromJson(json);
10+
11+
Map<String, dynamic> toJson() => _$DataToJson(this);
12+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import 'package:json_annotation/json_annotation.dart';
2+
3+
import 'error_response_details.dart';
4+
part 'error_response.g.dart';
5+
6+
@JsonSerializable()
7+
class ErrorResponse {
8+
ErrorResponseDetails? error;
9+
ErrorResponse({this.error});
10+
11+
factory ErrorResponse.fromJson(Map<String, dynamic> json) => _$ErrorResponseFromJson(json);
12+
13+
Map<String, dynamic> toJson() => _$ErrorResponseToJson(this);
14+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import 'package:json_annotation/json_annotation.dart';
2+
part 'error_response_details.g.dart';
3+
4+
@JsonSerializable()
5+
class ErrorResponseDetails {
6+
String? detail;
7+
String? version;
8+
String? code;
9+
10+
ErrorResponseDetails({this.version, this.code, this.detail});
11+
12+
factory ErrorResponseDetails.fromJson(Map<String, dynamic> json) => _$ErrorResponseDetailsFromJson(json);
13+
14+
Map<String, dynamic> toJson() => _$ErrorResponseDetailsToJson(this);
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import 'package:json_annotation/json_annotation.dart';
2+
part 'login_request.g.dart';
3+
4+
@JsonSerializable()
5+
class LoginRequest {
6+
String? phone_number;
7+
String? national_code;
8+
String? captcha;
9+
10+
LoginRequest({this.phone_number, this.national_code, this.captcha});
11+
12+
factory LoginRequest.fromJson(Map<String, dynamic> json) => _$LoginRequestFromJson(json);
13+
14+
Map<String, dynamic> toJson() => _$LoginRequestToJson(this);
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import 'package:json_annotation/json_annotation.dart';
2+
import 'data.dart';
3+
part 'login_response.g.dart';
4+
5+
@JsonSerializable()
6+
class LoginResponse {
7+
Data? data;
8+
9+
LoginResponse(this.data);
10+
factory LoginResponse.fromJson(Map<String, dynamic> json) => _$LoginResponseFromJson(json);
11+
Map<String, dynamic> toJson() => _$LoginResponseToJson(this);
12+
13+
}
14+
15+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import 'package:json_annotation/json_annotation.dart';
2+
3+
part 'submit_code_request.g.dart';
4+
5+
@JsonSerializable()
6+
class SubmitCodeRequest {
7+
String request_id;
8+
String otp;
9+
10+
SubmitCodeRequest({required this.request_id, required this.otp});
11+
12+
factory SubmitCodeRequest.fromJson(Map<String, dynamic> json) =>
13+
_$SubmitCodeRequestFromJson(json);
14+
15+
Map<String, dynamic> toJson() => _$SubmitCodeRequestToJson(this);
16+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import 'package:json_annotation/json_annotation.dart';
2+
part 'submit_code_response.g.dart';
3+
4+
@JsonSerializable()
5+
class SubmitCodeResponse {
6+
String access;
7+
8+
SubmitCodeResponse(this.access);
9+
factory SubmitCodeResponse.fromJson(Map<String, dynamic> json) => _$SubmitCodeResponseFromJson(json);
10+
Map<String, dynamic> toJson() => _$SubmitCodeResponseToJson(this);
11+
12+
}
13+

linux/flutter/generated_plugin_registrant.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66

77
#include "generated_plugin_registrant.h"
88

9+
#include <flutter_localization/flutter_localization_plugin.h>
10+
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
911

1012
void fl_register_plugins(FlPluginRegistry* registry) {
13+
g_autoptr(FlPluginRegistrar) flutter_localization_registrar =
14+
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterLocalizationPlugin");
15+
flutter_localization_plugin_register_with_registrar(flutter_localization_registrar);
16+
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
17+
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
18+
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
1119
}

0 commit comments

Comments
 (0)