Skip to content

Commit

Permalink
Add email function
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-mayank committed Sep 11, 2024
1 parent 9ee1ae6 commit 2443d98
Show file tree
Hide file tree
Showing 14 changed files with 133 additions and 390 deletions.
14 changes: 8 additions & 6 deletions data/.flutter-plugins
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# This is a generated file; do not edit or check into version control.
cloud_firestore=/home/mayank/.pub-cache/hosted/pub.dev/cloud_firestore-5.2.0/
cloud_firestore_web=/home/mayank/.pub-cache/hosted/pub.dev/cloud_firestore_web-4.1.0/
cloud_functions=/home/mayank/.pub-cache/hosted/pub.dev/cloud_functions-5.1.1/
cloud_functions_web=/home/mayank/.pub-cache/hosted/pub.dev/cloud_functions_web-4.10.0/
device_info_plus=/home/mayank/.pub-cache/hosted/pub.dev/device_info_plus-10.1.1/
firebase_auth=/home/mayank/.pub-cache/hosted/pub.dev/firebase_auth-5.1.3/
firebase_auth_web=/home/mayank/.pub-cache/hosted/pub.dev/firebase_auth_web-5.12.5/
firebase_core=/home/mayank/.pub-cache/hosted/pub.dev/firebase_core-3.3.0/
firebase_core_web=/home/mayank/.pub-cache/hosted/pub.dev/firebase_core_web-2.17.4/
firebase_auth_web=/home/mayank/.pub-cache/hosted/pub.dev/firebase_auth_web-5.13.0/
firebase_core=/home/mayank/.pub-cache/hosted/pub.dev/firebase_core-3.4.1/
firebase_core_web=/home/mayank/.pub-cache/hosted/pub.dev/firebase_core_web-2.18.0/
firebase_messaging=/home/mayank/.pub-cache/hosted/pub.dev/firebase_messaging-15.0.4/
firebase_messaging_web=/home/mayank/.pub-cache/hosted/pub.dev/firebase_messaging_web-3.8.12/
firebase_messaging_web=/home/mayank/.pub-cache/hosted/pub.dev/firebase_messaging_web-3.9.0/
firebase_storage=/home/mayank/.pub-cache/hosted/pub.dev/firebase_storage-12.1.2/
firebase_storage_web=/home/mayank/.pub-cache/hosted/pub.dev/firebase_storage_web-3.9.12/
firebase_storage_web=/home/mayank/.pub-cache/hosted/pub.dev/firebase_storage_web-3.10.0/
flutter_timezone=/home/mayank/.pub-cache/hosted/pub.dev/flutter_timezone-2.1.0/
package_info_plus=/home/mayank/.pub-cache/hosted/pub.dev/package_info_plus-8.0.1/
package_info_plus=/home/mayank/.pub-cache/hosted/pub.dev/package_info_plus-8.0.2/
path_provider_linux=/home/mayank/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/
path_provider_windows=/home/mayank/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/
shared_preferences=/home/mayank/.pub-cache/hosted/pub.dev/shared_preferences-2.3.1/
Expand Down
2 changes: 1 addition & 1 deletion data/.flutter-plugins-dependencies

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions data/lib/api/support/support_models.dart
Original file line number Diff line number Diff line change
@@ -1,31 +1,7 @@
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

part 'support_models.freezed.dart';

part 'support_models.g.dart';

@freezed
class AddSupportCaseRequest with _$AddSupportCaseRequest {
const factory AddSupportCaseRequest({
required String id,
required String title,
String? description,
@Default([]) List<String> attachmentUrls,
required String userId,
required DateTime createdAt,
}) = _AddSupportCaseRequest;

factory AddSupportCaseRequest.fromJson(Map<String, dynamic> json) =>
_$AddSupportCaseRequestFromJson(json);

factory AddSupportCaseRequest.fromFireStore(
DocumentSnapshot<Map<String, dynamic>> snapshot,
SnapshotOptions? options,
) =>
AddSupportCaseRequest.fromJson(snapshot.data()!);
}

enum AttachmentUploadStatus {
uploading,
uploaded;
Expand Down
257 changes: 0 additions & 257 deletions data/lib/api/support/support_models.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,263 +14,6 @@ T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

AddSupportCaseRequest _$AddSupportCaseRequestFromJson(
Map<String, dynamic> json) {
return _AddSupportCaseRequest.fromJson(json);
}

/// @nodoc
mixin _$AddSupportCaseRequest {
String get id => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError;
String? get description => throw _privateConstructorUsedError;
List<String> get attachmentUrls => throw _privateConstructorUsedError;
String get userId => throw _privateConstructorUsedError;
DateTime get createdAt => throw _privateConstructorUsedError;

Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$AddSupportCaseRequestCopyWith<AddSupportCaseRequest> get copyWith =>
throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $AddSupportCaseRequestCopyWith<$Res> {
factory $AddSupportCaseRequestCopyWith(AddSupportCaseRequest value,
$Res Function(AddSupportCaseRequest) then) =
_$AddSupportCaseRequestCopyWithImpl<$Res, AddSupportCaseRequest>;
@useResult
$Res call(
{String id,
String title,
String? description,
List<String> attachmentUrls,
String userId,
DateTime createdAt});
}

/// @nodoc
class _$AddSupportCaseRequestCopyWithImpl<$Res,
$Val extends AddSupportCaseRequest>
implements $AddSupportCaseRequestCopyWith<$Res> {
_$AddSupportCaseRequestCopyWithImpl(this._value, this._then);

// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;

@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? title = null,
Object? description = freezed,
Object? attachmentUrls = null,
Object? userId = null,
Object? createdAt = null,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
description: freezed == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
attachmentUrls: null == attachmentUrls
? _value.attachmentUrls
: attachmentUrls // ignore: cast_nullable_to_non_nullable
as List<String>,
userId: null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as String,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
) as $Val);
}
}

/// @nodoc
abstract class _$$AddSupportCaseRequestImplCopyWith<$Res>
implements $AddSupportCaseRequestCopyWith<$Res> {
factory _$$AddSupportCaseRequestImplCopyWith(
_$AddSupportCaseRequestImpl value,
$Res Function(_$AddSupportCaseRequestImpl) then) =
__$$AddSupportCaseRequestImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String id,
String title,
String? description,
List<String> attachmentUrls,
String userId,
DateTime createdAt});
}

/// @nodoc
class __$$AddSupportCaseRequestImplCopyWithImpl<$Res>
extends _$AddSupportCaseRequestCopyWithImpl<$Res,
_$AddSupportCaseRequestImpl>
implements _$$AddSupportCaseRequestImplCopyWith<$Res> {
__$$AddSupportCaseRequestImplCopyWithImpl(_$AddSupportCaseRequestImpl _value,
$Res Function(_$AddSupportCaseRequestImpl) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? title = null,
Object? description = freezed,
Object? attachmentUrls = null,
Object? userId = null,
Object? createdAt = null,
}) {
return _then(_$AddSupportCaseRequestImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
description: freezed == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String?,
attachmentUrls: null == attachmentUrls
? _value._attachmentUrls
: attachmentUrls // ignore: cast_nullable_to_non_nullable
as List<String>,
userId: null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as String,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
));
}
}

/// @nodoc
@JsonSerializable()
class _$AddSupportCaseRequestImpl implements _AddSupportCaseRequest {
const _$AddSupportCaseRequestImpl(
{required this.id,
required this.title,
this.description,
final List<String> attachmentUrls = const [],
required this.userId,
required this.createdAt})
: _attachmentUrls = attachmentUrls;

factory _$AddSupportCaseRequestImpl.fromJson(Map<String, dynamic> json) =>
_$$AddSupportCaseRequestImplFromJson(json);

@override
final String id;
@override
final String title;
@override
final String? description;
final List<String> _attachmentUrls;
@override
@JsonKey()
List<String> get attachmentUrls {
if (_attachmentUrls is EqualUnmodifiableListView) return _attachmentUrls;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_attachmentUrls);
}

@override
final String userId;
@override
final DateTime createdAt;

@override
String toString() {
return 'AddSupportCaseRequest(id: $id, title: $title, description: $description, attachmentUrls: $attachmentUrls, userId: $userId, createdAt: $createdAt)';
}

@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$AddSupportCaseRequestImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.description, description) ||
other.description == description) &&
const DeepCollectionEquality()
.equals(other._attachmentUrls, _attachmentUrls) &&
(identical(other.userId, userId) || other.userId == userId) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt));
}

@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, id, title, description,
const DeepCollectionEquality().hash(_attachmentUrls), userId, createdAt);

@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$AddSupportCaseRequestImplCopyWith<_$AddSupportCaseRequestImpl>
get copyWith => __$$AddSupportCaseRequestImplCopyWithImpl<
_$AddSupportCaseRequestImpl>(this, _$identity);

@override
Map<String, dynamic> toJson() {
return _$$AddSupportCaseRequestImplToJson(
this,
);
}
}

abstract class _AddSupportCaseRequest implements AddSupportCaseRequest {
const factory _AddSupportCaseRequest(
{required final String id,
required final String title,
final String? description,
final List<String> attachmentUrls,
required final String userId,
required final DateTime createdAt}) = _$AddSupportCaseRequestImpl;

factory _AddSupportCaseRequest.fromJson(Map<String, dynamic> json) =
_$AddSupportCaseRequestImpl.fromJson;

@override
String get id;
@override
String get title;
@override
String? get description;
@override
List<String> get attachmentUrls;
@override
String get userId;
@override
DateTime get createdAt;
@override
@JsonKey(ignore: true)
_$$AddSupportCaseRequestImplCopyWith<_$AddSupportCaseRequestImpl>
get copyWith => throw _privateConstructorUsedError;
}

/// @nodoc
mixin _$Attachment {
String get path => throw _privateConstructorUsedError;
Expand Down
32 changes: 0 additions & 32 deletions data/lib/api/support/support_models.g.dart

This file was deleted.

Loading

0 comments on commit 2443d98

Please sign in to comment.