Skip to content

Commit

Permalink
Add description in modules readMe (#101)
Browse files Browse the repository at this point in the history
* add description in modules

* remove unused permission
  • Loading branch information
cp-sidhdhi-p authored Sep 18, 2024
1 parent 45e5639 commit 28cc0a6
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 262 deletions.
43 changes: 9 additions & 34 deletions data/README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,14 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.
# data

For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
The `data` module serves as the data layer for the Khelo app. It handles all data-related operations, including fetching, storing, and managing data across the application. This module is designed to interact with various data sources, such as local databases and remote servers.

For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->
## Key Features

TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
- **Data Management:** Handles data operations such as CRUD (Create, Read, Update, Delete).
- **Data Sources:** Interfaces with local and remote data sources.
- **Error Handling:** Includes error handling and data validation.

## Features
### API

TODO: List what your package can do. Maybe include images, gifs, or videos.

## Getting started

TODO: List prerequisites and provide or point to information on how to
start using the package.

## Usage

TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.

```dart
const like = 'sample';
```

## Additional information

TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
- **Service:** Manages data operations and provides methods for data retrieval and updates.
- **Api:** Defines data structures used within the app.
2 changes: 0 additions & 2 deletions data/lib/api/user/user_models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import 'dart:convert';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

import '../../converter/timestamp_json_converter.dart';

part 'user_models.freezed.dart';

part 'user_models.g.dart';
Expand Down
79 changes: 2 additions & 77 deletions data/lib/api/user/user_models.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ mixin _$UserModel {
UserGender? get gender => throw _privateConstructorUsedError;
DateTime? get created_at => throw _privateConstructorUsedError;
DateTime? get updated_at => throw _privateConstructorUsedError;
@TimeStampJsonConverter()
DateTime? get created_time => throw _privateConstructorUsedError;
@TimeStampJsonConverter()
DateTime? get updated_time => throw _privateConstructorUsedError;
PlayerRole? get player_role => throw _privateConstructorUsedError;
BattingStyle? get batting_style => throw _privateConstructorUsedError;
BowlingStyle? get bowling_style => throw _privateConstructorUsedError;
Expand Down Expand Up @@ -64,8 +60,6 @@ abstract class $UserModelCopyWith<$Res> {
UserGender? gender,
DateTime? created_at,
DateTime? updated_at,
@TimeStampJsonConverter() DateTime? created_time,
@TimeStampJsonConverter() DateTime? updated_time,
PlayerRole? player_role,
BattingStyle? batting_style,
BowlingStyle? bowling_style,
Expand Down Expand Up @@ -97,8 +91,6 @@ class _$UserModelCopyWithImpl<$Res, $Val extends UserModel>
Object? gender = freezed,
Object? created_at = freezed,
Object? updated_at = freezed,
Object? created_time = freezed,
Object? updated_time = freezed,
Object? player_role = freezed,
Object? batting_style = freezed,
Object? bowling_style = freezed,
Expand Down Expand Up @@ -150,14 +142,6 @@ class _$UserModelCopyWithImpl<$Res, $Val extends UserModel>
? _value.updated_at
: updated_at // ignore: cast_nullable_to_non_nullable
as DateTime?,
created_time: freezed == created_time
? _value.created_time
: created_time // ignore: cast_nullable_to_non_nullable
as DateTime?,
updated_time: freezed == updated_time
? _value.updated_time
: updated_time // ignore: cast_nullable_to_non_nullable
as DateTime?,
player_role: freezed == player_role
? _value.player_role
: player_role // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -202,8 +186,6 @@ abstract class _$$UserModelImplCopyWith<$Res>
UserGender? gender,
DateTime? created_at,
DateTime? updated_at,
@TimeStampJsonConverter() DateTime? created_time,
@TimeStampJsonConverter() DateTime? updated_time,
PlayerRole? player_role,
BattingStyle? batting_style,
BowlingStyle? bowling_style,
Expand Down Expand Up @@ -233,8 +215,6 @@ class __$$UserModelImplCopyWithImpl<$Res>
Object? gender = freezed,
Object? created_at = freezed,
Object? updated_at = freezed,
Object? created_time = freezed,
Object? updated_time = freezed,
Object? player_role = freezed,
Object? batting_style = freezed,
Object? bowling_style = freezed,
Expand Down Expand Up @@ -286,14 +266,6 @@ class __$$UserModelImplCopyWithImpl<$Res>
? _value.updated_at
: updated_at // ignore: cast_nullable_to_non_nullable
as DateTime?,
created_time: freezed == created_time
? _value.created_time
: created_time // ignore: cast_nullable_to_non_nullable
as DateTime?,
updated_time: freezed == updated_time
? _value.updated_time
: updated_time // ignore: cast_nullable_to_non_nullable
as DateTime?,
player_role: freezed == player_role
? _value.player_role
: player_role // ignore: cast_nullable_to_non_nullable
Expand Down Expand Up @@ -333,8 +305,6 @@ class _$UserModelImpl extends _UserModel {
this.gender,
this.created_at,
this.updated_at,
@TimeStampJsonConverter() this.created_time,
@TimeStampJsonConverter() this.updated_time,
this.player_role,
this.batting_style,
this.bowling_style,
Expand Down Expand Up @@ -368,12 +338,6 @@ class _$UserModelImpl extends _UserModel {
@override
final DateTime? updated_at;
@override
@TimeStampJsonConverter()
final DateTime? created_time;
@override
@TimeStampJsonConverter()
final DateTime? updated_time;
@override
final PlayerRole? player_role;
@override
final BattingStyle? batting_style;
Expand All @@ -388,7 +352,7 @@ class _$UserModelImpl extends _UserModel {

@override
String toString() {
return 'UserModel(id: $id, name: $name, name_lowercase: $name_lowercase, location: $location, phone: $phone, dob: $dob, email: $email, profile_img_url: $profile_img_url, gender: $gender, created_at: $created_at, updated_at: $updated_at, created_time: $created_time, updated_time: $updated_time, player_role: $player_role, batting_style: $batting_style, bowling_style: $bowling_style, isActive: $isActive, notifications: $notifications)';
return 'UserModel(id: $id, name: $name, name_lowercase: $name_lowercase, location: $location, phone: $phone, dob: $dob, email: $email, profile_img_url: $profile_img_url, gender: $gender, created_at: $created_at, updated_at: $updated_at, player_role: $player_role, batting_style: $batting_style, bowling_style: $bowling_style, isActive: $isActive, notifications: $notifications)';
}

@override
Expand All @@ -412,10 +376,6 @@ class _$UserModelImpl extends _UserModel {
other.created_at == created_at) &&
(identical(other.updated_at, updated_at) ||
other.updated_at == updated_at) &&
(identical(other.created_time, created_time) ||
other.created_time == created_time) &&
(identical(other.updated_time, updated_time) ||
other.updated_time == updated_time) &&
(identical(other.player_role, player_role) ||
other.player_role == player_role) &&
(identical(other.batting_style, batting_style) ||
Expand Down Expand Up @@ -443,8 +403,6 @@ class _$UserModelImpl extends _UserModel {
gender,
created_at,
updated_at,
created_time,
updated_time,
player_role,
batting_style,
bowling_style,
Expand Down Expand Up @@ -478,8 +436,6 @@ abstract class _UserModel extends UserModel {
final UserGender? gender,
final DateTime? created_at,
final DateTime? updated_at,
@TimeStampJsonConverter() final DateTime? created_time,
@TimeStampJsonConverter() final DateTime? updated_time,
final PlayerRole? player_role,
final BattingStyle? batting_style,
final BowlingStyle? bowling_style,
Expand Down Expand Up @@ -513,12 +469,6 @@ abstract class _UserModel extends UserModel {
@override
DateTime? get updated_at;
@override
@TimeStampJsonConverter()
DateTime? get created_time;
@override
@TimeStampJsonConverter()
DateTime? get updated_time;
@override
PlayerRole? get player_role;
@override
BattingStyle? get batting_style;
Expand Down Expand Up @@ -549,8 +499,6 @@ mixin _$ApiSession {
int get app_version => throw _privateConstructorUsedError;
String get os_version => throw _privateConstructorUsedError;
DateTime? get created_at => throw _privateConstructorUsedError;
@TimeStampJsonConverter()
DateTime? get created_time => throw _privateConstructorUsedError;
bool get is_active => throw _privateConstructorUsedError;

Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
Expand All @@ -575,7 +523,6 @@ abstract class $ApiSessionCopyWith<$Res> {
int app_version,
String os_version,
DateTime? created_at,
@TimeStampJsonConverter() DateTime? created_time,
bool is_active});
}

Expand All @@ -601,7 +548,6 @@ class _$ApiSessionCopyWithImpl<$Res, $Val extends ApiSession>
Object? app_version = null,
Object? os_version = null,
Object? created_at = freezed,
Object? created_time = freezed,
Object? is_active = null,
}) {
return _then(_value.copyWith(
Expand Down Expand Up @@ -641,10 +587,6 @@ class _$ApiSessionCopyWithImpl<$Res, $Val extends ApiSession>
? _value.created_at
: created_at // ignore: cast_nullable_to_non_nullable
as DateTime?,
created_time: freezed == created_time
? _value.created_time
: created_time // ignore: cast_nullable_to_non_nullable
as DateTime?,
is_active: null == is_active
? _value.is_active
: is_active // ignore: cast_nullable_to_non_nullable
Expand All @@ -671,7 +613,6 @@ abstract class _$$ApiSessionImplCopyWith<$Res>
int app_version,
String os_version,
DateTime? created_at,
@TimeStampJsonConverter() DateTime? created_time,
bool is_active});
}

Expand All @@ -695,7 +636,6 @@ class __$$ApiSessionImplCopyWithImpl<$Res>
Object? app_version = null,
Object? os_version = null,
Object? created_at = freezed,
Object? created_time = freezed,
Object? is_active = null,
}) {
return _then(_$ApiSessionImpl(
Expand Down Expand Up @@ -735,10 +675,6 @@ class __$$ApiSessionImplCopyWithImpl<$Res>
? _value.created_at
: created_at // ignore: cast_nullable_to_non_nullable
as DateTime?,
created_time: freezed == created_time
? _value.created_time
: created_time // ignore: cast_nullable_to_non_nullable
as DateTime?,
is_active: null == is_active
? _value.is_active
: is_active // ignore: cast_nullable_to_non_nullable
Expand All @@ -760,7 +696,6 @@ class _$ApiSessionImpl extends _ApiSession {
required this.app_version,
required this.os_version,
this.created_at,
@TimeStampJsonConverter() this.created_time,
this.is_active = true})
: super._();

Expand All @@ -786,15 +721,12 @@ class _$ApiSessionImpl extends _ApiSession {
@override
final DateTime? created_at;
@override
@TimeStampJsonConverter()
final DateTime? created_time;
@override
@JsonKey()
final bool is_active;

@override
String toString() {
return 'ApiSession(id: $id, user_id: $user_id, device_type: $device_type, device_id: $device_id, device_name: $device_name, device_fcm_token: $device_fcm_token, app_version: $app_version, os_version: $os_version, created_at: $created_at, created_time: $created_time, is_active: $is_active)';
return 'ApiSession(id: $id, user_id: $user_id, device_type: $device_type, device_id: $device_id, device_name: $device_name, device_fcm_token: $device_fcm_token, app_version: $app_version, os_version: $os_version, created_at: $created_at, is_active: $is_active)';
}

@override
Expand All @@ -818,8 +750,6 @@ class _$ApiSessionImpl extends _ApiSession {
other.os_version == os_version) &&
(identical(other.created_at, created_at) ||
other.created_at == created_at) &&
(identical(other.created_time, created_time) ||
other.created_time == created_time) &&
(identical(other.is_active, is_active) ||
other.is_active == is_active));
}
Expand All @@ -837,7 +767,6 @@ class _$ApiSessionImpl extends _ApiSession {
app_version,
os_version,
created_at,
created_time,
is_active);

@JsonKey(ignore: true)
Expand Down Expand Up @@ -865,7 +794,6 @@ abstract class _ApiSession extends ApiSession {
required final int app_version,
required final String os_version,
final DateTime? created_at,
@TimeStampJsonConverter() final DateTime? created_time,
final bool is_active}) = _$ApiSessionImpl;
const _ApiSession._() : super._();

Expand All @@ -891,9 +819,6 @@ abstract class _ApiSession extends ApiSession {
@override
DateTime? get created_at;
@override
@TimeStampJsonConverter()
DateTime? get created_time;
@override
bool get is_active;
@override
@JsonKey(ignore: true)
Expand Down
24 changes: 0 additions & 24 deletions data/lib/api/user/user_models.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 28cc0a6

Please sign in to comment.