developed

This commit is contained in:
komekh 2024-08-27 17:53:46 +05:00
parent 4c3c279426
commit 776dc6ae33
46 changed files with 224 additions and 46 deletions

View File

@ -1,8 +1,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:label="cargo"
android:label="Cargo 66"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/launcher_icon">
<activity
android:name=".MainActivity"
android:exported="true"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -46,5 +46,6 @@
"order_sent": "Ugradylan senesi",
"Reserved": "Rezerw",
"Received": "Kabul edildi",
"Delivered": "Gowşuryldy"
"Delivered": "Gowşuryldy",
"image_preview": "Image Preview"
}

View File

@ -44,7 +44,8 @@
"order_from_card": "Nireden",
"order_to_card": "Nirä",
"order_sent": "Ugradylan senesi",
"Reserved":"Rezerw",
"Received":"Kabul edildi",
"Delivered":"Gowşuryldy"
"Reserved": "Rezerw",
"Received": "Kabul edildi",
"Delivered": "Gowşuryldy",
"image_preview": "Image Preview"
}

BIN
assets/logo/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -539,7 +539,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
@ -596,7 +596,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 704 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 862 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 862 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Cargo</string>
<string>Cargo 66</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>

View File

@ -1,4 +1,5 @@
// const String baseUrl = 'https://192.168.99.64:5001/api';
const String baseUrl = 'https://cargo.tpsadvertising.com/api';
const String imageUrl = 'https://cargo.tpsadvertising.com';
const String defaultApiKey = '';
const String defaultSources = '';

View File

@ -5,6 +5,7 @@ sealed class AppAssets {
static const String trucks = 'assets/svg/trucks.svg';
///png
static const String logoPng = 'assets/logo/logo.png';
static const String boxesPng = 'assets/images/boxes.png';
static const String trucksPng = 'assets/images/trucks.png';
static const String header = 'assets/images/header.png';

View File

@ -23,13 +23,13 @@ class UserModel extends User {
factory UserModel.fromJson(Map<String, dynamic> json) => UserModel(
oid: json['Oid'],
fullName: json['FullName'],
fullName: json['Fulname'],
phone: json['PhoneNo'],
);
Map<String, dynamic> toJson() => {
'Oid': oid,
'FullName': fullName,
'FulName': fullName,
'PhoneNo': phone,
};
}

View File

@ -0,0 +1,33 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
class FullScreenImageScreen extends StatelessWidget {
final String imageUrl;
const FullScreenImageScreen({super.key, required this.imageUrl});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.black,
title: Text('image_preview'.tr()),
),
backgroundColor: Colors.black,
body: Center(
child: InteractiveViewer(
panEnabled: true, // Allows panning (moving the image)
minScale: 0.5,
maxScale: 3.0, // Maximum zoom level
child: Image.network(
imageUrl,
fit: BoxFit.contain,
errorBuilder: (context, error, stackTrace) {
return const Icon(Icons.broken_image, size: 200, color: Colors.white);
},
),
),
),
);
}
}

View File

@ -62,9 +62,13 @@ class _LoginScreenState extends State<LoginScreen> {
padding: const EdgeInsets.only(top: 60, bottom: 20),
child: Column(
children: [
SvgPicture.asset(
AppAssets.logo,
height: AppDimensions.normalize(30),
// SvgPicture.asset(
// AppAssets.logo,
// height: AppDimensions.normalize(30),
// ),
Image.asset(
AppAssets.logoPng,
height: AppDimensions.normalize(50),
),
Space.yf(0.80),
Text(

View File

@ -7,7 +7,7 @@ import '../../application/order_detail_bloc/order_detail_bloc.dart';
import '../../configs/configs.dart';
import '../../core/core.dart';
import '../../domain/entities/order/order.dart';
import '../widgets/map/clustering.dart';
import '../widgets/clustering.dart';
import '../widgets/widgets.dart';
class OrderDetailsScreen extends StatefulWidget {
@ -22,10 +22,12 @@ class OrderDetailsScreen extends StatefulWidget {
class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
bool _isFullScreen = false; // Track fullscreen mode
bool _showLocation = true;
final List<String> _images = [];
@override
void initState() {
context.read<OrderDetailBloc>().add(GetRoutes(widget.order.cargoId));
_setImages();
_checkLocationStatus();
super.initState();
}
@ -37,6 +39,18 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
});
}
void _setImages() {
if (widget.order.image1.isNotEmpty) {
_images.add(widget.order.image1);
}
if (widget.order.image2.isNotEmpty) {
_images.add(widget.order.image2);
}
if (widget.order.image3.isNotEmpty) {
_images.add(widget.order.image3);
}
}
void _toggleFullScreen() {
setState(() {
_isFullScreen = !_isFullScreen;
@ -125,6 +139,15 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
/// location card
LocationCard(cargoId: widget.order.cargoId),
/// gap
Space.y!,
///images widget
ImagesWidget(imageStrings: _images),
/// gap
Space.yf(2),
],
),
),

View File

@ -6,3 +6,4 @@ export 'profile.dart';
export 'root.dart';
export 'splash.dart';
export 'splash2.dart';
export 'image_full.dart';

View File

@ -46,9 +46,13 @@ class SplashScreen extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
AppAssets.logo,
height: AppDimensions.normalize(30),
// SvgPicture.asset(
// AppAssets.logo,
// height: AppDimensions.normalize(30),
// ),
Image.asset(
AppAssets.logoPng,
height: AppDimensions.normalize(50),
),
Space.yf(0.80),
Text(

View File

@ -4,7 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong2/latlong.dart';
import '../../../application/order_detail_bloc/order_detail_bloc.dart';
import '../../application/order_detail_bloc/order_detail_bloc.dart';
class ClusteringPage extends StatefulWidget {
final VoidCallback onFullScreenToggle;

View File

@ -0,0 +1,52 @@
import 'package:flutter/material.dart';
import '../../configs/app_dimensions.dart';
import '../../core/constants/api.dart';
import '../screens/image_full.dart';
class ImagesWidget extends StatelessWidget {
final List<String> imageStrings;
const ImagesWidget({super.key, required this.imageStrings});
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: imageStrings.map((imageString) {
return GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => FullScreenImageScreen(imageUrl: '$imageUrl/$imageString'),
),
);
},
child: Container(
margin: const EdgeInsets.symmetric(horizontal: 4.0, vertical: 8),
padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: Colors.grey,
width: 2,
), // Adding a border
),
child: Image.network(
'$imageUrl/$imageString',
width: AppDimensions.normalize(60),
height: AppDimensions.normalize(60),
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
return const Icon(Icons.broken_image, size: 100);
},
),
),
);
}).toList(),
),
);
}
}

View File

@ -11,3 +11,4 @@ export 'order_header.dart';
export 'retry_widget.dart';
export 'successful_auth_dialog.dart';
export 'vertical_line.dart';
export 'images.dart';

View File

@ -1,6 +1,14 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
url: "https://pub.dev"
source: hosted
version: "3.6.1"
args:
dependency: transitive
description:
@ -41,6 +49,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.0"
checked_yaml:
dependency: transitive
description:
name: checked_yaml
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
url: "https://pub.dev"
source: hosted
version: "2.0.3"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19
url: "https://pub.dev"
source: hosted
version: "0.4.1"
clock:
dependency: transitive
description:
@ -57,6 +81,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.18.0"
crypto:
dependency: transitive
description:
name: crypto
sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27
url: "https://pub.dev"
source: hosted
version: "3.0.5"
cupertino_icons:
dependency: "direct main"
description:
@ -134,6 +166,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "8.1.6"
flutter_launcher_icons:
dependency: "direct dev"
description:
name: flutter_launcher_icons
sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea"
url: "https://pub.dev"
source: hosted
version: "0.13.1"
flutter_lints:
dependency: "direct dev"
description:
@ -205,6 +245,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.2"
image:
dependency: transitive
description:
name: image
sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8"
url: "https://pub.dev"
source: hosted
version: "4.2.0"
internet_connection_checker:
dependency: "direct main"
description:
@ -221,6 +269,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.19.0"
json_annotation:
dependency: transitive
description:
name: json_annotation
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
url: "https://pub.dev"
source: hosted
version: "4.9.0"
latlong2:
dependency: "direct main"
description:
@ -602,6 +658,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.5.0"
yaml:
dependency: transitive
description:
name: yaml
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.4.1 <4.0.0"
flutter: ">=3.22.0"

View File

@ -31,6 +31,8 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.13.1
flutter_lints: ^3.0.0
@ -38,33 +40,17 @@ flutter:
uses-material-design: true
assets:
- assets/logo/
- assets/svg/
- assets/svg/logo/
- assets/images/
- assets/locale/
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/logo/logo.png"
min_sdk_android: 21 # android min sdk min:16, default 21
remove_alpha_ios: true
adaptive_icon_background: "#343FDE"
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages