TF-1098 Apply lints for all module
This commit is contained in:
@@ -2,23 +2,23 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
abstract class RemoteException extends Equatable implements Exception {
|
||||
static final connectError = 'Connect error';
|
||||
static const connectError = 'Connect error';
|
||||
|
||||
final String? message;
|
||||
final int? code;
|
||||
|
||||
RemoteException({this.code, this.message});
|
||||
const RemoteException({this.code, this.message});
|
||||
}
|
||||
|
||||
class UnknownError extends RemoteException {
|
||||
UnknownError({int? code, String? message}) : super(code: code, message: message);
|
||||
const UnknownError({int? code, String? message}) : super(code: code, message: message);
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
class ConnectError extends RemoteException {
|
||||
ConnectError() : super(message: RemoteException.connectError);
|
||||
const ConnectError() : super(message: RemoteException.connectError);
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
|
||||
@@ -3,17 +3,17 @@ extension DateTimeExtension on DateTime {
|
||||
|
||||
bool isToday() {
|
||||
final now = DateTime.now();
|
||||
return now.day == this.day && now.month == this.month && now.year == this.year;
|
||||
return now.day == day && now.month == month && now.year == year;
|
||||
}
|
||||
|
||||
bool isYesterday() {
|
||||
final yesterday = DateTime.now().subtract(Duration(days: 1));
|
||||
return yesterday.day == this.day && yesterday.month == this.month && yesterday.year == this.year;
|
||||
final yesterday = DateTime.now().subtract(const Duration(days: 1));
|
||||
return yesterday.day == day && yesterday.month == month && yesterday.year == year;
|
||||
}
|
||||
|
||||
bool isThisYear() {
|
||||
final now = DateTime.now();
|
||||
return now.year == this.year;
|
||||
return now.year == year;
|
||||
}
|
||||
|
||||
int daysBetween(DateTime from) {
|
||||
|
||||
Reference in New Issue
Block a user