fixed login
This commit is contained in:
parent
086f639c02
commit
c06c369cb3
|
|
@ -26,7 +26,7 @@
|
||||||
"order": "Заказ",
|
"order": "Заказ",
|
||||||
"order_info": "Информация о заказе",
|
"order_info": "Информация о заказе",
|
||||||
"route": "Маршруте",
|
"route": "Маршруте",
|
||||||
"order_status": "Груз",
|
"order_status": "Статус",
|
||||||
"order_carrier": "Автомашина №",
|
"order_carrier": "Автомашина №",
|
||||||
"order_shop": "Магазин №",
|
"order_shop": "Магазин №",
|
||||||
"order_from": "Откуда",
|
"order_from": "Откуда",
|
||||||
|
|
@ -50,5 +50,6 @@
|
||||||
"image_preview": "Предварительный просмотр",
|
"image_preview": "Предварительный просмотр",
|
||||||
"error_message": "Что-то пошло не так. Пожалуйста, попробуйте еще раз.",
|
"error_message": "Что-то пошло не так. Пожалуйста, попробуйте еще раз.",
|
||||||
"follow_orders_banner": "Отслеживайте ваш груз 24/7",
|
"follow_orders_banner": "Отслеживайте ваш груз 24/7",
|
||||||
"order_empty": "У вас пока нет заказов"
|
"order_empty": "У вас пока нет заказов",
|
||||||
|
"deliver_all": "Довезём всё!"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
"order": "Sargyt",
|
"order": "Sargyt",
|
||||||
"order_info": "Sargyt barada maglumat",
|
"order_info": "Sargyt barada maglumat",
|
||||||
"route": "Gatnaw ýoly",
|
"route": "Gatnaw ýoly",
|
||||||
"order_status": "Ýük",
|
"order_status": "Ýagdaýy",
|
||||||
"order_carrier": "Awtoulag №",
|
"order_carrier": "Awtoulag №",
|
||||||
"order_shop": "Dükan №",
|
"order_shop": "Dükan №",
|
||||||
"order_from": "Nireden ugradyldy",
|
"order_from": "Nireden ugradyldy",
|
||||||
|
|
@ -50,5 +50,6 @@
|
||||||
"image_preview": "Surat",
|
"image_preview": "Surat",
|
||||||
"error_message": "Näsazlyk ýüze çykdy. Täzeden synanşyp görmegiňizi haýyş edýäris.",
|
"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",
|
"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!"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
|
|
@ -1,5 +1,6 @@
|
||||||
// const String baseUrl = 'https://192.168.99.64:5001/api';
|
const String baseUrl = 'https://192.168.99.64:5001/api';
|
||||||
const String baseUrl = 'https://cargo.tpsadvertising.com/api';
|
// const String baseUrl = 'https://cargo.tpsadvertising.com/api';
|
||||||
const String imageUrl = 'https://cargo.tpsadvertising.com';
|
// const String imageUrl = 'https://cargo.tpsadvertising.com';
|
||||||
|
const String imageUrl = 'https://192.168.99.64:5001';
|
||||||
const String defaultApiKey = '';
|
const String defaultApiKey = '';
|
||||||
const String defaultSources = '';
|
const String defaultSources = '';
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ sealed class AppAssets {
|
||||||
///png
|
///png
|
||||||
static const String logoPng = 'assets/logo/logo.png';
|
static const String logoPng = 'assets/logo/logo.png';
|
||||||
static const String logoTransparent = 'assets/logo/logo_transparent.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 boxesPng = 'assets/images/boxes.png';
|
||||||
static const String trucksPng = 'assets/images/trucks.png';
|
static const String trucksPng = 'assets/images/trucks.png';
|
||||||
static const String header = 'assets/images/header.png';
|
static const String header = 'assets/images/header.png';
|
||||||
|
|
|
||||||
|
|
@ -17,18 +17,21 @@ class OrderModel extends OrderEntity {
|
||||||
required super.from,
|
required super.from,
|
||||||
required super.to,
|
required super.to,
|
||||||
required super.departedAt,
|
required super.departedAt,
|
||||||
required super.arrivedAt,
|
// required super.arrivedAt,
|
||||||
required super.depth,
|
// required super.depth,
|
||||||
required super.width,
|
// required super.width,
|
||||||
required super.height,
|
// required super.height,
|
||||||
required super.image1,
|
// required super.image1,
|
||||||
required super.image2,
|
// required super.image2,
|
||||||
required super.image3,
|
// required super.image3,
|
||||||
|
required super.cargoState,
|
||||||
|
required super.invoice,
|
||||||
|
required super.image,
|
||||||
});
|
});
|
||||||
// Factory method to create an instance of CargoEntity from JSON
|
// Factory method to create an instance of CargoEntity from JSON
|
||||||
factory OrderModel.fromJson(Map<String, dynamic> json) {
|
factory OrderModel.fromJson(Map<String, dynamic> json) {
|
||||||
DateTime? departedAt = json['DepartedAt'] != null ? DateTime.parse(json['DepartedAt']) : null;
|
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(
|
return OrderModel(
|
||||||
oid: json['Oid'],
|
oid: json['Oid'],
|
||||||
clientId: json['ClientId'],
|
clientId: json['ClientId'],
|
||||||
|
|
@ -43,13 +46,16 @@ class OrderModel extends OrderEntity {
|
||||||
from: json['From'] ?? '',
|
from: json['From'] ?? '',
|
||||||
to: json['To'] ?? '',
|
to: json['To'] ?? '',
|
||||||
departedAt: DateUtil.formatDateTimeToDDMMYYYY(departedAt),
|
departedAt: DateUtil.formatDateTimeToDDMMYYYY(departedAt),
|
||||||
arrivedAt: DateUtil.formatDateTimeToDDMMYYYY(arrivedAt),
|
// arrivedAt: DateUtil.formatDateTimeToDDMMYYYY(arrivedAt),
|
||||||
depth: json['Depth'].toDouble(),
|
// depth: json['Depth'].toDouble(),
|
||||||
width: json['Width'].toDouble(),
|
// width: json['Width'].toDouble(),
|
||||||
height: json['Height'].toDouble(),
|
// height: json['Height'].toDouble(),
|
||||||
image1: json['Image1'] ?? '',
|
// image1: json['Image1'] ?? '',
|
||||||
image2: json['Image2'] ?? '',
|
// image2: json['Image2'] ?? '',
|
||||||
image3: json['Image3'] ?? '',
|
// image3: json['Image3'] ?? '',
|
||||||
|
cargoState: json['CargoState'],
|
||||||
|
invoice: json['Invoice'],
|
||||||
|
image: json['Image'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ class OrderEntity extends Equatable {
|
||||||
final String clientId;
|
final String clientId;
|
||||||
final String cargoId;
|
final String cargoId;
|
||||||
final String state;
|
final String state;
|
||||||
|
final String cargoState;
|
||||||
final String no;
|
final String no;
|
||||||
final String name;
|
final String name;
|
||||||
final String shopNo;
|
final String shopNo;
|
||||||
|
|
@ -14,19 +15,22 @@ class OrderEntity extends Equatable {
|
||||||
final String from;
|
final String from;
|
||||||
final String to;
|
final String to;
|
||||||
final String departedAt;
|
final String departedAt;
|
||||||
final String arrivedAt;
|
// final String arrivedAt;
|
||||||
final double depth;
|
// final double depth;
|
||||||
final double width;
|
// final double width;
|
||||||
final double height;
|
// final double height;
|
||||||
final String image1;
|
// final String image1;
|
||||||
final String image2;
|
// final String image2;
|
||||||
final String image3;
|
// final String image3;
|
||||||
|
final String invoice;
|
||||||
|
final String image;
|
||||||
|
|
||||||
const OrderEntity({
|
const OrderEntity({
|
||||||
required this.oid,
|
required this.oid,
|
||||||
required this.clientId,
|
required this.clientId,
|
||||||
required this.cargoId,
|
required this.cargoId,
|
||||||
required this.state,
|
required this.state,
|
||||||
|
required this.cargoState,
|
||||||
required this.no,
|
required this.no,
|
||||||
required this.name,
|
required this.name,
|
||||||
required this.shopNo,
|
required this.shopNo,
|
||||||
|
|
@ -36,13 +40,15 @@ class OrderEntity extends Equatable {
|
||||||
required this.from,
|
required this.from,
|
||||||
required this.to,
|
required this.to,
|
||||||
required this.departedAt,
|
required this.departedAt,
|
||||||
required this.arrivedAt,
|
// required this.arrivedAt,
|
||||||
required this.depth,
|
// required this.depth,
|
||||||
required this.width,
|
// required this.width,
|
||||||
required this.height,
|
// required this.height,
|
||||||
required this.image1,
|
// required this.image1,
|
||||||
required this.image2,
|
// required this.image2,
|
||||||
required this.image3,
|
// required this.image3,
|
||||||
|
required this.invoice,
|
||||||
|
required this.image,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -58,18 +58,19 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.only(top: 60, bottom: 20),
|
padding: const EdgeInsets.only(top: 20, bottom: 20),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// SvgPicture.asset(
|
// SvgPicture.asset(
|
||||||
// AppAssets.logo,
|
// AppAssets.logo,
|
||||||
// height: AppDimensions.normalize(30),
|
// height: AppDimensions.normalize(30),
|
||||||
// ),
|
// ),
|
||||||
|
Space.yf(4),
|
||||||
|
|
||||||
Image.asset(
|
Image.asset(
|
||||||
AppAssets.logoTransparent,
|
AppAssets.logoLogin,
|
||||||
height: AppDimensions.normalize(50),
|
|
||||||
),
|
),
|
||||||
Space.yf(0.80),
|
Space.yf(0.50),
|
||||||
Text(
|
Text(
|
||||||
appTitle,
|
appTitle,
|
||||||
style: AppText.h1b?.copyWith(
|
style: AppText.h1b?.copyWith(
|
||||||
|
|
@ -78,7 +79,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||||
),
|
),
|
||||||
Space.yf(0.30),
|
Space.yf(0.30),
|
||||||
Text(
|
Text(
|
||||||
'Довезём всё!',
|
'deliver_all'.tr(),
|
||||||
style: AppText.b1?.copyWith(
|
style: AppText.b1?.copyWith(
|
||||||
color: AppColors.yellow,
|
color: AppColors.yellow,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class OrderDetailsScreen extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
|
class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
|
||||||
bool _isFullScreen = false; // Track fullscreen mode
|
bool _isFullScreen = false; // Track fullScreen mode
|
||||||
bool _showLocation = true;
|
bool _showLocation = true;
|
||||||
final List<String> _images = [];
|
final List<String> _images = [];
|
||||||
|
|
||||||
|
|
@ -40,14 +40,11 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
|
||||||
}
|
}
|
||||||
|
|
||||||
void _setImages() {
|
void _setImages() {
|
||||||
if (widget.order.image1.isNotEmpty) {
|
if (widget.order.invoice.isNotEmpty) {
|
||||||
_images.add(widget.order.image1);
|
_images.add(widget.order.invoice);
|
||||||
}
|
}
|
||||||
if (widget.order.image2.isNotEmpty) {
|
if (widget.order.image.isNotEmpty) {
|
||||||
_images.add(widget.order.image2);
|
_images.add(widget.order.image);
|
||||||
}
|
|
||||||
if (widget.order.image3.isNotEmpty) {
|
|
||||||
_images.add(widget.order.image3);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -56,10 +53,10 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
|
||||||
_isFullScreen = !_isFullScreen;
|
_isFullScreen = !_isFullScreen;
|
||||||
|
|
||||||
if (_isFullScreen) {
|
if (_isFullScreen) {
|
||||||
// Enter fullscreen mode
|
// Enter fullScreen mode
|
||||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
|
||||||
} else {
|
} else {
|
||||||
// Exit fullscreen mode
|
// Exit fullScreen mode
|
||||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -71,7 +68,7 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.surface,
|
backgroundColor: AppColors.surface,
|
||||||
appBar: _isFullScreen
|
appBar: _isFullScreen
|
||||||
? null // Hide the app bar in fullscreen mode
|
? null // Hide the app bar in fullScreen mode
|
||||||
: AppBar(
|
: AppBar(
|
||||||
iconTheme: const IconThemeData(
|
iconTheme: const IconThemeData(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|
@ -116,7 +113,7 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'${'order_info'.tr()} №${widget.order.no}',
|
'${'order_info'.tr()} № ${widget.order.no}',
|
||||||
style: AppText.h2b,
|
style: AppText.h2b,
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,10 @@ class InfoCard extends StatelessWidget {
|
||||||
Space.y!,
|
Space.y!,
|
||||||
RowTextWidget(title: '${'order_volume'.tr()}:', info: order.volume.toString()),
|
RowTextWidget(title: '${'order_volume'.tr()}:', info: order.volume.toString()),
|
||||||
Space.y!,
|
Space.y!,
|
||||||
RowTextWidget(
|
/* RowTextWidget(
|
||||||
title: '${'order_dimensions'.tr()}:',
|
title: '${'order_dimensions'.tr()}:',
|
||||||
info: '${order.width}x${order.depth}x${order.height} ${'order_dimensions_desc'.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),
|
RowTextWidget(title: '${'order_product_name'.tr()}:', info: order.name),
|
||||||
// Space.y!,
|
// Space.y!,
|
||||||
// RowTextWidget(title: 'Sargydyň bahasy:', info: order.price),
|
// RowTextWidget(title: 'Sargydyň bahasy:', info: order.price),
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class OrderCard extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'№${order.no}',
|
'№ ${order.no}',
|
||||||
style: AppText.b1b,
|
style: AppText.b1b,
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ class OrderHeader extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: AppDimensions.normalize(80),
|
height: AppDimensions.normalize(95),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
Image.asset(
|
||||||
|
|
@ -22,27 +22,28 @@ class OrderHeader extends StatelessWidget {
|
||||||
top: 0,
|
top: 0,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
left: AppDimensions.normalize(12),
|
left: AppDimensions.normalize(12),
|
||||||
child: Column(
|
child: SizedBox(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
width: MediaQuery.of(context).size.width * 0.50,
|
||||||
children: [
|
child: Column(
|
||||||
SizedBox(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
width: MediaQuery.of(context).size.width * 0.50,
|
children: [
|
||||||
child: Text(
|
Text(
|
||||||
'cargo_app'.tr(),
|
'cargo_app'.tr(),
|
||||||
style: AppText.h1b?.copyWith(
|
style: AppText.h1b?.copyWith(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
),
|
Space.yf(0.30),
|
||||||
Space.yf(0.30),
|
Text(
|
||||||
Text(
|
'follow_orders_banner'.tr(),
|
||||||
'follow_orders_banner'.tr(),
|
style: AppText.b1?.copyWith(
|
||||||
style: AppText.b1?.copyWith(
|
color: AppColors.yellow,
|
||||||
color: AppColors.yellow,
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue