Skip to content

Commit

Permalink
Add final class to home module
Browse files Browse the repository at this point in the history
  • Loading branch information
Eldar2021 committed Mar 12, 2024
1 parent 2cc13ad commit d620f3c
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 7 deletions.
4 changes: 3 additions & 1 deletion app/lib/modules/home/data/model/home_model_response.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import 'package:flutter/material.dart';
import 'package:json_annotation/json_annotation.dart';

part 'home_model_response.g.dart';

@JsonSerializable()
class HomeModelResponse {
@immutable
final class HomeModelResponse {
const HomeModelResponse({
required this.allDoneHatims,
required this.allDonePages,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:my_quran/modules/modules.dart';

class HomeRepositoryImpl implements HomeRepository {
@immutable
final class HomeRepositoryImpl implements HomeRepository {
const HomeRepositoryImpl(
this.localDataSource,
this.remoteDataSource,
Expand Down
4 changes: 3 additions & 1 deletion app/lib/modules/home/data/source/home_local_data_source.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:mq_storage/mq_storage.dart';
import 'package:my_quran/modules/modules.dart';

class HomeLocalDataSource {
@immutable
final class HomeLocalDataSource {
const HomeLocalDataSource(this.storage);

final PreferencesStorage storage;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import 'package:flutter/material.dart';
import 'package:my_quran/config/config.dart';
import 'package:my_quran/core/core.dart';
import 'package:my_quran/modules/modules.dart';

class HomeRemoteDataSource {
@immutable
final class HomeRemoteDataSource {
const HomeRemoteDataSource(this.remoteClient);

final RemoteClient remoteClient;
Expand Down
5 changes: 4 additions & 1 deletion app/lib/modules/home/domain/entity/home_entity.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
class HomeEntity {
import 'package:flutter/material.dart';

@immutable
final class HomeEntity {
const HomeEntity({
required this.allDoneHatims,
required this.allDonePages,
Expand Down
4 changes: 3 additions & 1 deletion app/lib/modules/home/domain/usecase/get_data_usecase.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:my_quran/modules/modules.dart';

class GetHomeDataUseCase {
@immutable
final class GetHomeDataUseCase {
const GetHomeDataUseCase(this.repository);

final HomeRepository repository;
Expand Down
1 change: 1 addition & 0 deletions app/lib/modules/home/presentation/cubit/home_cubit.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:my_quran/core/core.dart';
import 'package:my_quran/modules/modules.dart';
Expand Down
3 changes: 2 additions & 1 deletion app/lib/modules/home/presentation/cubit/home_state.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
part of 'home_cubit.dart';

class HomeState extends Equatable {
@immutable
final class HomeState extends Equatable {
const HomeState({
this.status = FetchStatus.loading,
this.homeModel,
Expand Down

0 comments on commit d620f3c

Please sign in to comment.