added detail screen
This commit is contained in:
parent
fb6ca83ce4
commit
b3c71e46a3
|
|
@ -8,7 +8,7 @@ sealed class AppRouter {
|
||||||
static const String splash2 = '/splash2';
|
static const String splash2 = '/splash2';
|
||||||
static const String login = '/login';
|
static const String login = '/login';
|
||||||
static const String root = '/root';
|
static const String root = '/root';
|
||||||
// static const String productDetails = '/product-details';
|
static const String orderDetails = '/order-details';
|
||||||
// static const String search = '/search';
|
// static const String search = '/search';
|
||||||
// static const String filter = '/filter';
|
// static const String filter = '/filter';
|
||||||
// static const String signup = '/signup';
|
// static const String signup = '/signup';
|
||||||
|
|
@ -36,6 +36,9 @@ sealed class AppRouter {
|
||||||
return MaterialPageRoute(builder: (_) => const LoginScreen());
|
return MaterialPageRoute(builder: (_) => const LoginScreen());
|
||||||
case root:
|
case root:
|
||||||
return MaterialPageRoute(builder: (_) => const RootScreen());
|
return MaterialPageRoute(builder: (_) => const RootScreen());
|
||||||
|
case orderDetails:
|
||||||
|
// ProductEntity product = routeSettings.arguments as ProductEntity;
|
||||||
|
return MaterialPageRoute(builder: (_) => const OrderDetailsScreen());
|
||||||
// case search:
|
// case search:
|
||||||
// return MaterialPageRoute(builder: (_) => const SearchScreen());
|
// return MaterialPageRoute(builder: (_) => const SearchScreen());
|
||||||
// case filter:
|
// case filter:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
import 'package:cargo/configs/configs.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../core/core.dart';
|
||||||
|
import '../widgets/widgets.dart';
|
||||||
|
|
||||||
|
class OrderDetailsScreen extends StatelessWidget {
|
||||||
|
const OrderDetailsScreen({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
App.init(context);
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColors.surface,
|
||||||
|
appBar: AppBar(
|
||||||
|
iconTheme: const IconThemeData(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
backgroundColor: AppColors.primary,
|
||||||
|
title: Text(
|
||||||
|
'Sargyt №ABC456789',
|
||||||
|
style: AppText.h2!.copyWith(color: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: CustomScrollView(
|
||||||
|
slivers: [
|
||||||
|
/// map
|
||||||
|
const SliverToBoxAdapter(
|
||||||
|
child: OrderHeader(),
|
||||||
|
),
|
||||||
|
|
||||||
|
/// info text
|
||||||
|
SliverToBoxAdapter(
|
||||||
|
child: Padding(
|
||||||
|
padding: Space.all(1, 1),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'Sargyt barada maglumat №ABC456789',
|
||||||
|
style: AppText.b1b,
|
||||||
|
),
|
||||||
|
|
||||||
|
/// gap
|
||||||
|
Space.y!,
|
||||||
|
|
||||||
|
/// info card
|
||||||
|
const InfoCard(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
/// current location info
|
||||||
|
SliverToBoxAdapter(
|
||||||
|
child: Padding(
|
||||||
|
padding: Space.all(1, 1),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'Gatnaw yoly',
|
||||||
|
style: AppText.b1b,
|
||||||
|
),
|
||||||
|
|
||||||
|
/// gap
|
||||||
|
Space.y!,
|
||||||
|
|
||||||
|
/// info card
|
||||||
|
const InfoCard(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,3 +2,4 @@ export 'splash.dart';
|
||||||
export 'splash2.dart';
|
export 'splash2.dart';
|
||||||
export 'login.dart';
|
export 'login.dart';
|
||||||
export 'root.dart';
|
export 'root.dart';
|
||||||
|
export 'order_details.dart';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
|
||||||
import '../../configs/app.dart';
|
|
||||||
import '../../configs/configs.dart';
|
import '../../configs/configs.dart';
|
||||||
import '../../core/core.dart';
|
import '../../core/core.dart';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../../configs/app.dart';
|
|
||||||
import '../../configs/configs.dart';
|
import '../../configs/configs.dart';
|
||||||
import '../../core/core.dart';
|
import '../../core/core.dart';
|
||||||
import '../presentation.dart';
|
import '../presentation.dart';
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../configs/configs.dart';
|
||||||
|
|
||||||
|
class InfoCard extends StatelessWidget {
|
||||||
|
const InfoCard({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: Card(
|
||||||
|
color: Colors.white,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const RowTextWidget(title: 'Ýagdaýy:', info: 'Ýolda'),
|
||||||
|
Space.y!,
|
||||||
|
const RowTextWidget(title: 'Awtoulag №:', info: 'ABC456789'),
|
||||||
|
Space.y!,
|
||||||
|
const RowTextWidget(title: 'Dukan №:', info: 'ABC456789'),
|
||||||
|
Space.y!,
|
||||||
|
const RowTextWidget(title: 'Nireden ugradyldy:', info: 'Urumçy'),
|
||||||
|
Space.y!,
|
||||||
|
const RowTextWidget(title: 'Nirä barmaly:', info: 'Aşgabat'),
|
||||||
|
Space.y!,
|
||||||
|
const RowTextWidget(title: 'Ýer sany:', info: '36'),
|
||||||
|
Space.y!,
|
||||||
|
const RowTextWidget(title: 'Kub:', info: '12 m3'),
|
||||||
|
Space.y!,
|
||||||
|
const RowTextWidget(title: 'Göwrumi:', info: '60x57x38 (ini, uzynlygy, beýikligi)'),
|
||||||
|
Space.y!,
|
||||||
|
const RowTextWidget(title: 'Harydyň ady:', info: 'Köwüş'),
|
||||||
|
Space.y!,
|
||||||
|
const RowTextWidget(title: 'Sargydyň bahasy:', info: '300'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RowTextWidget extends StatelessWidget {
|
||||||
|
final String title;
|
||||||
|
final String info;
|
||||||
|
const RowTextWidget({
|
||||||
|
super.key,
|
||||||
|
required this.title,
|
||||||
|
required this.info,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
style: AppText.b1!.copyWith(
|
||||||
|
color: const Color(0xFF57575C),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Space.x!,
|
||||||
|
Text(
|
||||||
|
info,
|
||||||
|
style: AppText.b1!.copyWith(
|
||||||
|
color: const Color(0xFF0C0C0D),
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class LocationCard extends StatelessWidget {
|
||||||
|
const LocationCard({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return const Placeholder();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import 'package:easy_stepper/easy_stepper.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../../configs/configs.dart';
|
import '../../configs/configs.dart';
|
||||||
|
|
@ -25,10 +24,15 @@ class OrderCard extends StatelessWidget {
|
||||||
'№ABC456789',
|
'№ABC456789',
|
||||||
style: AppText.b1b,
|
style: AppText.b1b,
|
||||||
),
|
),
|
||||||
Text(
|
GestureDetector(
|
||||||
'Genişleýin >',
|
onTap: () {
|
||||||
style: AppText.b1b?.copyWith(
|
Navigator.of(context).pushNamed(AppRouter.orderDetails);
|
||||||
color: AppColors.primary,
|
},
|
||||||
|
child: Text(
|
||||||
|
'Ginişleýin >',
|
||||||
|
style: AppText.b1b?.copyWith(
|
||||||
|
color: AppColors.primary,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
export 'button.dart';
|
|
||||||
export 'successful_auth_dialog.dart';
|
|
||||||
export 'credential_failure_dialog.dart';
|
|
||||||
export 'auth_error_dialog.dart';
|
export 'auth_error_dialog.dart';
|
||||||
export 'bottom_navbar.dart';
|
export 'bottom_navbar.dart';
|
||||||
export 'order_header.dart';
|
export 'button.dart';
|
||||||
|
export 'credential_failure_dialog.dart';
|
||||||
|
export 'info_card.dart';
|
||||||
|
export 'location_card.dart';
|
||||||
export 'order_card.dart';
|
export 'order_card.dart';
|
||||||
|
export 'order_header.dart';
|
||||||
|
export 'successful_auth_dialog.dart';
|
||||||
|
|
|
||||||
32
pubspec.lock
32
pubspec.lock
|
|
@ -1,14 +1,6 @@
|
||||||
# Generated by pub
|
# Generated by pub
|
||||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||||
packages:
|
packages:
|
||||||
archive:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: archive
|
|
||||||
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.6.1"
|
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -65,14 +57,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.18.0"
|
version: "1.18.0"
|
||||||
crypto:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: crypto
|
|
||||||
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.3"
|
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -89,14 +73,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.10.1"
|
version: "0.10.1"
|
||||||
easy_stepper:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: easy_stepper
|
|
||||||
sha256: d09e974ec9148480072f8a7d3b0779dfdbc1a3ec1ff7daa7fbda95b0c1fe7453
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.8.5"
|
|
||||||
equatable:
|
equatable:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -296,14 +272,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0"
|
version: "3.0.0"
|
||||||
lottie:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: lottie
|
|
||||||
sha256: "6a24ade5d3d918c306bb1c21a6b9a04aab0489d51a2582522eea820b4093b62b"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.1.2"
|
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ dependencies:
|
||||||
flutter_phoenix: ^1.1.1
|
flutter_phoenix: ^1.1.1
|
||||||
flutter_svg: ^2.0.10+1
|
flutter_svg: ^2.0.10+1
|
||||||
flutter_secure_storage: ^9.2.2
|
flutter_secure_storage: ^9.2.2
|
||||||
easy_stepper: ^0.8.5
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue