feat : home page
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
library;
|
||||
|
||||
|
||||
//other packages
|
||||
export 'package:flutter_localizations/flutter_localizations.dart';
|
||||
export 'package:flutter_map/flutter_map.dart';
|
||||
@@ -44,3 +43,5 @@ export 'injection/di.dart';
|
||||
export 'utils/logger_utils.dart';
|
||||
export 'utils/safe_call_utils.dart';
|
||||
export 'utils/date_time_utils.dart';
|
||||
export 'utils/num_utils.dart';
|
||||
export 'utils/map_utils.dart';
|
||||
|
||||
@@ -48,6 +48,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/cube.svg
|
||||
SvgGenImage get cube => const SvgGenImage('assets/icons/cube.svg');
|
||||
|
||||
/// File path: assets/icons/cube_bottom_rotation.svg
|
||||
SvgGenImage get cubeBottomRotation => const SvgGenImage('assets/icons/cube_bottom_rotation.svg');
|
||||
|
||||
/// File path: assets/icons/cube_rotate.svg
|
||||
SvgGenImage get cubeRotate => const SvgGenImage('assets/icons/cube_rotate.svg');
|
||||
|
||||
@@ -57,6 +60,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/cube_search.svg
|
||||
SvgGenImage get cubeSearch => const SvgGenImage('assets/icons/cube_search.svg');
|
||||
|
||||
/// File path: assets/icons/cube_top_rotation.svg
|
||||
SvgGenImage get cubeTopRotation => const SvgGenImage('assets/icons/cube_top_rotation.svg');
|
||||
|
||||
/// File path: assets/icons/diagram.svg
|
||||
SvgGenImage get diagram => const SvgGenImage('assets/icons/diagram.svg');
|
||||
|
||||
@@ -187,9 +193,11 @@ class $AssetsIconsGen {
|
||||
chicken,
|
||||
convertCube,
|
||||
cube,
|
||||
cubeBottomRotation,
|
||||
cubeRotate,
|
||||
cubeScan,
|
||||
cubeSearch,
|
||||
cubeTopRotation,
|
||||
diagram,
|
||||
download,
|
||||
edit,
|
||||
@@ -297,6 +305,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/cube.svg.vec
|
||||
SvgGenImage get cubeSvg => const SvgGenImage.vec('assets/vec/cube.svg.vec');
|
||||
|
||||
/// File path: assets/vec/cube_bottom_rotation.svg.vec
|
||||
SvgGenImage get cubeBottomRotationSvg => const SvgGenImage.vec('assets/vec/cube_bottom_rotation.svg.vec');
|
||||
|
||||
/// File path: assets/vec/cube_rotate.svg.vec
|
||||
SvgGenImage get cubeRotateSvg => const SvgGenImage.vec('assets/vec/cube_rotate.svg.vec');
|
||||
|
||||
@@ -306,6 +317,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/cube_search.svg.vec
|
||||
SvgGenImage get cubeSearchSvg => const SvgGenImage.vec('assets/vec/cube_search.svg.vec');
|
||||
|
||||
/// File path: assets/vec/cube_top_rotation.svg.vec
|
||||
SvgGenImage get cubeTopRotationSvg => const SvgGenImage.vec('assets/vec/cube_top_rotation.svg.vec');
|
||||
|
||||
/// File path: assets/vec/diagram.svg.vec
|
||||
SvgGenImage get diagramSvg => const SvgGenImage.vec('assets/vec/diagram.svg.vec');
|
||||
|
||||
@@ -436,9 +450,11 @@ class $AssetsVecGen {
|
||||
chickenSvg,
|
||||
convertCubeSvg,
|
||||
cubeSvg,
|
||||
cubeBottomRotationSvg,
|
||||
cubeRotateSvg,
|
||||
cubeScanSvg,
|
||||
cubeSearchSvg,
|
||||
cubeTopRotationSvg,
|
||||
diagramSvg,
|
||||
downloadSvg,
|
||||
editSvg,
|
||||
|
||||
44
packages/core/lib/utils/map_utils.dart
Normal file
44
packages/core/lib/utils/map_utils.dart
Normal file
@@ -0,0 +1,44 @@
|
||||
import 'package:rasadyar_core/presentation/utils/data_time_utils.dart';
|
||||
|
||||
Map<String, dynamic> buildQueryParams({
|
||||
Map<String, dynamic>? queryParams,
|
||||
String? search,
|
||||
String? value,
|
||||
int? page,
|
||||
int? pageSize,
|
||||
DateTime? fromDate,
|
||||
DateTime? toDate,
|
||||
|
||||
}) {
|
||||
final params = <String, dynamic>{};
|
||||
|
||||
if (queryParams != null) {
|
||||
params.addAll(queryParams);
|
||||
}
|
||||
|
||||
if (fromDate != null) {
|
||||
params['date1'] = fromDate.formattedDashedGregorian;
|
||||
}
|
||||
|
||||
if (toDate != null) {
|
||||
params['date2'] = toDate.formattedDashedGregorian;
|
||||
}
|
||||
|
||||
if (search != null && search.isNotEmpty) {
|
||||
params['search'] = search;
|
||||
}
|
||||
|
||||
if (value != null && value.isNotEmpty) {
|
||||
params['value'] = value;
|
||||
}
|
||||
|
||||
if (page != null) {
|
||||
params['page'] = page;
|
||||
}
|
||||
|
||||
if (pageSize != null) {
|
||||
params['page_size'] = pageSize;
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
8
packages/core/lib/utils/num_utils.dart
Normal file
8
packages/core/lib/utils/num_utils.dart
Normal file
@@ -0,0 +1,8 @@
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
extension XNumExtension on num? {
|
||||
String get toFormatted {
|
||||
final formatter = NumberFormat('#,###', 'fa_IR');
|
||||
return this == null ? '':formatter.format(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user