added screen
This commit is contained in:
parent
3d9e431914
commit
08e14d2efd
|
|
@ -41,3 +41,6 @@ app.*.map.json
|
||||||
/android/app/debug
|
/android/app/debug
|
||||||
/android/app/profile
|
/android/app/profile
|
||||||
/android/app/release
|
/android/app/release
|
||||||
|
|
||||||
|
# FVM Version Cache
|
||||||
|
.fvm/
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"dart.flutterSdkPath": ".fvm/versions/3.22.1"
|
||||||
|
}
|
||||||
|
|
@ -51,7 +51,7 @@ class AppDimensions {
|
||||||
|
|
||||||
static String inString() {
|
static String inString() {
|
||||||
final x = UI.width! / UI.height!;
|
final x = UI.width! / UI.height!;
|
||||||
final ps = ui.window.physicalSize;
|
final ps = WidgetsBinding.instance.platformDispatcher.views.first.physicalSize; //ui.window.physicalSize;
|
||||||
return '''
|
return '''
|
||||||
Width: ${UI.width} | ${ps.width}
|
Width: ${UI.width} | ${ps.width}
|
||||||
Height: ${UI.height} | ${ps.height}
|
Height: ${UI.height} | ${ps.height}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,202 @@
|
||||||
|
import 'package:cargo/configs/app_typography.dart';
|
||||||
|
import 'package:cargo/configs/space.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
|
import '../../configs/configs.dart';
|
||||||
|
import '../../core/core.dart';
|
||||||
|
|
||||||
|
class ProfileScreen extends StatelessWidget {
|
||||||
|
const ProfileScreen({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
App.init(context);
|
||||||
|
return Scaffold(
|
||||||
|
// appBar: AppBar(),
|
||||||
|
backgroundColor: AppColors.surface,
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Padding(
|
||||||
|
padding: Space.all(1, 1),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
/// gap
|
||||||
|
Space.yf(1),
|
||||||
|
|
||||||
|
/// header
|
||||||
|
Text(
|
||||||
|
'Şahsy otagym',
|
||||||
|
style: AppText.h1b,
|
||||||
|
),
|
||||||
|
|
||||||
|
Space.y!,
|
||||||
|
|
||||||
|
/// card
|
||||||
|
SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: Card(
|
||||||
|
color: Colors.white,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
/// identity
|
||||||
|
const RowWidget(
|
||||||
|
text: 'ABC1234567890!@#',
|
||||||
|
leadingIcon: Icons.verified_user_outlined,
|
||||||
|
),
|
||||||
|
|
||||||
|
/// gap
|
||||||
|
Space.yf(1),
|
||||||
|
|
||||||
|
/// name surname
|
||||||
|
const RowWidget(
|
||||||
|
text: 'Maksat Üstünlikow',
|
||||||
|
leadingIcon: Icons.person_2_outlined,
|
||||||
|
trailingIcon: Icons.mode_edit_outlined,
|
||||||
|
),
|
||||||
|
|
||||||
|
/// gap
|
||||||
|
Space.yf(1),
|
||||||
|
|
||||||
|
/// phone
|
||||||
|
const RowWidget(
|
||||||
|
text: '+993 (XX) XX-XX-XX',
|
||||||
|
leadingIcon: Icons.phone_android_outlined,
|
||||||
|
trailingIcon: Icons.mode_edit_outlined,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
///gap
|
||||||
|
Space.yf(2),
|
||||||
|
|
||||||
|
/// card
|
||||||
|
const SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: Card(
|
||||||
|
color: Colors.white,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(16.0),
|
||||||
|
child: RowWidget(
|
||||||
|
text: 'Tehniki goldaw bilen habarlaşmak',
|
||||||
|
leadingIcon: Icons.contact_support_outlined,
|
||||||
|
trailingIcon: Icons.arrow_forward_ios,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
///gap
|
||||||
|
Space.yf(2),
|
||||||
|
|
||||||
|
/// card
|
||||||
|
SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: Card(
|
||||||
|
color: Colors.white,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
/// identity
|
||||||
|
const RowWidget(
|
||||||
|
text: 'Dil saýlamak (Türkmen dili)',
|
||||||
|
leadingIcon: Icons.language_outlined,
|
||||||
|
trailingIcon: Icons.arrow_forward_ios,
|
||||||
|
),
|
||||||
|
|
||||||
|
/// gap
|
||||||
|
Space.yf(1),
|
||||||
|
|
||||||
|
/// name surname
|
||||||
|
const RowWidget(
|
||||||
|
text: 'Gizlinlik syýasaty',
|
||||||
|
leadingIcon: Icons.gpp_maybe_outlined,
|
||||||
|
trailingIcon: Icons.arrow_forward_ios,
|
||||||
|
),
|
||||||
|
|
||||||
|
/// gap
|
||||||
|
Space.yf(1),
|
||||||
|
|
||||||
|
/// phone
|
||||||
|
const RowWidget(
|
||||||
|
text: 'Ulanyş şertleri',
|
||||||
|
leadingIcon: Icons.file_copy_outlined,
|
||||||
|
trailingIcon: Icons.arrow_forward_ios,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
///gap
|
||||||
|
Space.yf(2),
|
||||||
|
|
||||||
|
/// logout
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: () {},
|
||||||
|
child: Text(
|
||||||
|
'Şahsy otagdan çykmak',
|
||||||
|
style: AppText.b1!.copyWith(
|
||||||
|
color: Colors.red,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
///gap
|
||||||
|
Space.yf(2),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RowWidget extends StatelessWidget {
|
||||||
|
final String text;
|
||||||
|
final IconData leadingIcon;
|
||||||
|
final IconData? trailingIcon;
|
||||||
|
const RowWidget({
|
||||||
|
super.key,
|
||||||
|
required this.text,
|
||||||
|
required this.leadingIcon,
|
||||||
|
this.trailingIcon,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
leadingIcon,
|
||||||
|
color: AppColors.darkGrey,
|
||||||
|
),
|
||||||
|
Space.x!,
|
||||||
|
Text(
|
||||||
|
text,
|
||||||
|
style: AppText.b1!.copyWith(
|
||||||
|
color: AppColors.darkGrey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (trailingIcon != null) ...[
|
||||||
|
const Spacer(),
|
||||||
|
Icon(
|
||||||
|
trailingIcon,
|
||||||
|
color: AppColors.darkGrey,
|
||||||
|
size: AppDimensions.normalize(7),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import 'package:cargo/core/core.dart';
|
|
||||||
import 'package:cargo/presentation/screens/orders.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
import '../../application/application.dart';
|
import '../../application/application.dart';
|
||||||
import '../../configs/configs.dart';
|
import '../../configs/configs.dart';
|
||||||
|
import '../../core/core.dart';
|
||||||
import '../widgets/bottom_navbar.dart';
|
import '../widgets/bottom_navbar.dart';
|
||||||
|
import 'screens.dart';
|
||||||
|
|
||||||
class RootScreen extends StatelessWidget {
|
class RootScreen extends StatelessWidget {
|
||||||
const RootScreen({super.key});
|
const RootScreen({super.key});
|
||||||
|
|
@ -69,9 +69,9 @@ class RootScreen extends StatelessWidget {
|
||||||
case NavigationTab.categoriesTab:
|
case NavigationTab.categoriesTab:
|
||||||
return const Text(' CategoriesScreen()');
|
return const Text(' CategoriesScreen()');
|
||||||
case NavigationTab.productsTap:
|
case NavigationTab.productsTap:
|
||||||
return const Text('ProductsListScreen()');
|
return const ProfileScreen();
|
||||||
default:
|
default:
|
||||||
return const Text('HomeScreen()');
|
return const OrdersScreen();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
|
export 'login.dart';
|
||||||
|
export 'order_details.dart';
|
||||||
|
export 'orders.dart';
|
||||||
|
export 'profile.dart';
|
||||||
|
export 'root.dart';
|
||||||
export 'splash.dart';
|
export 'splash.dart';
|
||||||
export 'splash2.dart';
|
export 'splash2.dart';
|
||||||
export 'login.dart';
|
|
||||||
export 'root.dart';
|
|
||||||
export 'order_details.dart';
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue