Skip to content

Commit 21478dd

Browse files
Remove unnecessary codes from core module
1 parent 4f83bd9 commit 21478dd

File tree

14 files changed

+34
-122
lines changed

14 files changed

+34
-122
lines changed

lib/core/constanst/general.dart

Lines changed: 0 additions & 37 deletions
This file was deleted.

lib/core/constanst/numbers/font_size.dart

Lines changed: 0 additions & 12 deletions
This file was deleted.

lib/core/styles/colors.dart

Lines changed: 0 additions & 17 deletions
This file was deleted.

lib/core/utils/Wrapper.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'package:equatable/equatable.dart';
2-
import 'package:dio/dio.dart';
32

43
import '../../feature/auth/data/model/error_response.dart';
54
import '../resources/DataState.dart';
@@ -17,17 +16,6 @@ class APIFailure extends Failure {
1716
APIFailure(super.error);
1817
}
1918

20-
/// This abstraction contains either a success data of generic type `S` or a
21-
/// failure error of type `Failure` as its result.
22-
///
23-
/// `data` property must only be retrieved when `DataResult` was constructed by
24-
/// using `DataResult.success(value)`. It can be validated by calling
25-
/// `isSuccess` first. Alternatively, `dataOrElse` can be used instead since it
26-
/// ensures a valid value is returned in case the result is a failure.
27-
///
28-
/// `error` must only be retrieved when `DataResult` was constructed by using
29-
/// `DataResult.failure(error)`. It can be validated by calling `isFailure`
30-
/// first.
3119
abstract class DataResult<S> extends Equatable {
3220
static DataResult<S> failure<S>(Failure failure) => _FailureResult(failure);
3321
static DataResult<S> success<S>(S data) => _SuccessResult(data);

lib/core/utils/colors.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import 'dart:ui';
2+
3+
// const primaryBlueColor = Color(0xFF40A8F4);
4+
// const faintPinkColor = Color(0xffEA7F8B);
5+
// const darkBlue = Color(0xff2D3B51);
6+
// const grey = Color(0xFFa19f9d);
7+
// const lightGrey = Color(0xdddedddc);
8+
// const double FONT_NORMAL = 16;
9+
// const double FONT_SMALL = 14;
10+
// const double FONT_XSMALL = 13;
11+
// const double FONT_XXSMALL = 12;
12+
const scaffoldBackgroundColor = Color(0xffFFffFF);
13+
const successTextColor = Color(0xFF00CA91);
14+
const cardBackgroundColor = Color(0xffFCFCFC);
15+
const dangerTextColor = Color(0xFFD50303);

lib/core/utils/constanst.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import 'package:flutter/material.dart';
2+
3+
class Constants {
4+
// string
5+
static RouteObserver<PageRoute> routeObserver = RouteObserver<PageRoute>();
6+
static const String kBaseUrl = 'xxxx';
7+
8+
}
File renamed without changes.

lib/core/utils/toasts.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import 'package:flutter/material.dart';
22
import 'package:fluttertoast/fluttertoast.dart';
33

4-
import '../constanst/numbers/spacings.dart';
5-
import '../styles/colors.dart';
4+
import 'spaces.dart';
5+
import 'colors.dart';
66
class Toast extends StatelessWidget {
77
final String message;
88
final Color bgColor;

lib/core/widgets/constant_texts.dart

Lines changed: 0 additions & 33 deletions
This file was deleted.

lib/core/widgets/simple_widgets.dart renamed to lib/core/widgets/label_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'package:flutter/material.dart';
22

3-
import '../../../../core/constanst/numbers/spacings.dart';
3+
import '../utils/spaces.dart';
44

55
class InputLabel extends StatelessWidget {
66
final String title;

0 commit comments

Comments
 (0)