fixed login

This commit is contained in:
komekh 2024-09-06 10:26:11 +05:00
parent 086f639c02
commit c06c369cb3
12 changed files with 86 additions and 71 deletions

View File

@ -26,7 +26,7 @@
"order": "Заказ",
"order_info": "Информация о заказе",
"route": "Маршруте",
"order_status": "Груз",
"order_status": "Статус",
"order_carrier": "Автомашина №",
"order_shop": "Магазин №",
"order_from": "Откуда",
@ -50,5 +50,6 @@
"image_preview": "Предварительный просмотр",
"error_message": "Что-то пошло не так. Пожалуйста, попробуйте еще раз.",
"follow_orders_banner": "Отслеживайте ваш груз 24/7",
"order_empty": "У вас пока нет заказов"
"order_empty": "У вас пока нет заказов",
"deliver_all": "Довезём всё!"
}

View File

@ -26,7 +26,7 @@
"order": "Sargyt",
"order_info": "Sargyt barada maglumat",
"route": "Gatnaw ýoly",
"order_status": ük",
"order_status": agdaýy",
"order_carrier": "Awtoulag №",
"order_shop": "Dükan №",
"order_from": "Nireden ugradyldy",
@ -50,5 +50,6 @@
"image_preview": "Surat",
"error_message": "Näsazlyk ýüze çykdy. Täzeden synanşyp görmegiňizi haýyş edýäris.",
"follow_orders_banner": "Ýükiňizi 24 sagadyň dowamynda yzarlamak indi elýeterli",
"order_empty": "Siziň entäk sargydyňyz ýok"
"order_empty": "Siziň entäk sargydyňyz ýok",
"deliver_all": "Ähli zady eltip bereris!"
}

BIN
assets/logo/logo_login.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,5 +1,6 @@
// 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 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 imageUrl = 'https://192.168.99.64:5001';
const String defaultApiKey = '';
const String defaultSources = '';

View File

@ -7,6 +7,7 @@ sealed class AppAssets {
///png
static const String logoPng = 'assets/logo/logo.png';
static const String logoTransparent = 'assets/logo/logo_transparent.png';
static const String logoLogin = 'assets/logo/logo_login.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

@ -17,18 +17,21 @@ class OrderModel extends OrderEntity {
required super.from,
required super.to,
required super.departedAt,
required super.arrivedAt,
required super.depth,
required super.width,
required super.height,
required super.image1,
required super.image2,
required super.image3,
// required super.arrivedAt,
// required super.depth,
// required super.width,
// required super.height,
// required super.image1,
// required super.image2,
// required super.image3,
required super.cargoState,
required super.invoice,
required super.image,
});
// Factory method to create an instance of CargoEntity from JSON
factory OrderModel.fromJson(Map<String, dynamic> json) {
DateTime? departedAt = json['DepartedAt'] != null ? DateTime.parse(json['DepartedAt']) : null;
DateTime? arrivedAt = json['ArrivedAt'] != null ? DateTime.parse(json['ArrivedAt']) : null;
// DateTime? arrivedAt = json['ArrivedAt'] != null ? DateTime.parse(json['ArrivedAt']) : null;
return OrderModel(
oid: json['Oid'],
clientId: json['ClientId'],
@ -43,13 +46,16 @@ class OrderModel extends OrderEntity {
from: json['From'] ?? '',
to: json['To'] ?? '',
departedAt: DateUtil.formatDateTimeToDDMMYYYY(departedAt),
arrivedAt: DateUtil.formatDateTimeToDDMMYYYY(arrivedAt),
depth: json['Depth'].toDouble(),
width: json['Width'].toDouble(),
height: json['Height'].toDouble(),
image1: json['Image1'] ?? '',
image2: json['Image2'] ?? '',
image3: json['Image3'] ?? '',
// arrivedAt: DateUtil.formatDateTimeToDDMMYYYY(arrivedAt),
// depth: json['Depth'].toDouble(),
// width: json['Width'].toDouble(),
// height: json['Height'].toDouble(),
// image1: json['Image1'] ?? '',
// image2: json['Image2'] ?? '',
// image3: json['Image3'] ?? '',
cargoState: json['CargoState'],
invoice: json['Invoice'],
image: json['Image'],
);
}

View File

@ -5,6 +5,7 @@ class OrderEntity extends Equatable {
final String clientId;
final String cargoId;
final String state;
final String cargoState;
final String no;
final String name;
final String shopNo;
@ -14,19 +15,22 @@ class OrderEntity extends Equatable {
final String from;
final String to;
final String departedAt;
final String arrivedAt;
final double depth;
final double width;
final double height;
final String image1;
final String image2;
final String image3;
// final String arrivedAt;
// final double depth;
// final double width;
// final double height;
// final String image1;
// final String image2;
// final String image3;
final String invoice;
final String image;
const OrderEntity({
required this.oid,
required this.clientId,
required this.cargoId,
required this.state,
required this.cargoState,
required this.no,
required this.name,
required this.shopNo,
@ -36,13 +40,15 @@ class OrderEntity extends Equatable {
required this.from,
required this.to,
required this.departedAt,
required this.arrivedAt,
required this.depth,
required this.width,
required this.height,
required this.image1,
required this.image2,
required this.image3,
// required this.arrivedAt,
// required this.depth,
// required this.width,
// required this.height,
// required this.image1,
// required this.image2,
// required this.image3,
required this.invoice,
required this.image,
});
@override

View File

@ -58,18 +58,19 @@ class _LoginScreenState extends State<LoginScreen> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Container(
padding: const EdgeInsets.only(top: 60, bottom: 20),
padding: const EdgeInsets.only(top: 20, bottom: 20),
child: Column(
children: [
// SvgPicture.asset(
// AppAssets.logo,
// height: AppDimensions.normalize(30),
// ),
Space.yf(4),
Image.asset(
AppAssets.logoTransparent,
height: AppDimensions.normalize(50),
AppAssets.logoLogin,
),
Space.yf(0.80),
Space.yf(0.50),
Text(
appTitle,
style: AppText.h1b?.copyWith(
@ -78,7 +79,7 @@ class _LoginScreenState extends State<LoginScreen> {
),
Space.yf(0.30),
Text(
'Довезём всё!',
'deliver_all'.tr(),
style: AppText.b1?.copyWith(
color: AppColors.yellow,
),

View File

@ -20,7 +20,7 @@ class OrderDetailsScreen extends StatefulWidget {
}
class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
bool _isFullScreen = false; // Track fullscreen mode
bool _isFullScreen = false; // Track fullScreen mode
bool _showLocation = true;
final List<String> _images = [];
@ -40,14 +40,11 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
}
void _setImages() {
if (widget.order.image1.isNotEmpty) {
_images.add(widget.order.image1);
if (widget.order.invoice.isNotEmpty) {
_images.add(widget.order.invoice);
}
if (widget.order.image2.isNotEmpty) {
_images.add(widget.order.image2);
}
if (widget.order.image3.isNotEmpty) {
_images.add(widget.order.image3);
if (widget.order.image.isNotEmpty) {
_images.add(widget.order.image);
}
}
@ -56,10 +53,10 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
_isFullScreen = !_isFullScreen;
if (_isFullScreen) {
// Enter fullscreen mode
// Enter fullScreen mode
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
} else {
// Exit fullscreen mode
// Exit fullScreen mode
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
}
});
@ -71,7 +68,7 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
return Scaffold(
backgroundColor: AppColors.surface,
appBar: _isFullScreen
? null // Hide the app bar in fullscreen mode
? null // Hide the app bar in fullScreen mode
: AppBar(
iconTheme: const IconThemeData(
color: Colors.white,

View File

@ -33,10 +33,10 @@ class InfoCard extends StatelessWidget {
Space.y!,
RowTextWidget(title: '${'order_volume'.tr()}:', info: order.volume.toString()),
Space.y!,
RowTextWidget(
/* RowTextWidget(
title: '${'order_dimensions'.tr()}:',
info: '${order.width}x${order.depth}x${order.height} ${'order_dimensions_desc'.tr()}'),
Space.y!,
Space.y!, */
RowTextWidget(title: '${'order_product_name'.tr()}:', info: order.name),
// Space.y!,
// RowTextWidget(title: 'Sargydyň bahasy:', info: order.price),

View File

@ -10,7 +10,7 @@ class OrderHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
height: AppDimensions.normalize(80),
height: AppDimensions.normalize(95),
child: Stack(
children: [
Image.asset(
@ -22,29 +22,30 @@ class OrderHeader extends StatelessWidget {
top: 0,
bottom: 0,
left: AppDimensions.normalize(12),
child: SizedBox(
width: MediaQuery.of(context).size.width * 0.50,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: MediaQuery.of(context).size.width * 0.50,
child: Text(
Text(
'cargo_app'.tr(),
style: AppText.h1b?.copyWith(
color: Colors.white,
),
textAlign: TextAlign.center,
),
),
Space.yf(0.30),
Text(
'follow_orders_banner'.tr(),
style: AppText.b1?.copyWith(
color: AppColors.yellow,
),
textAlign: TextAlign.center,
),
],
),
),
),
],
),
);