major bug fix, unauhenticaed widget added
This commit is contained in:
parent
e52b41dc8b
commit
82f1265997
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 6.2 KiB |
|
|
@ -230,6 +230,7 @@ class _DetailsState extends State<Details> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
SizedBox(height: 20.adaptedPx()),
|
||||||
InkWell(
|
InkWell(
|
||||||
splashColor: AppTheme.lightPrimaryColor.withOpacity(0.2),
|
splashColor: AppTheme.lightPrimaryColor.withOpacity(0.2),
|
||||||
highlightColor:
|
highlightColor:
|
||||||
|
|
@ -253,38 +254,33 @@ class _DetailsState extends State<Details> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: CustomButton(
|
child: Container(
|
||||||
name: 'add_to_cart'.translation,
|
decoration: BoxDecoration(
|
||||||
onTap: () {},
|
border: Border.all(
|
||||||
backgroundColor: AppTheme.lightPrimaryColor,
|
width: 1.adaptedPx(),
|
||||||
isMain: true,
|
color: AppTheme.lightPrimaryColor,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(15.adaptedPx()),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
vertical: 15.adaptedPx(),
|
||||||
|
horizontal: 15.adaptedPx(),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'add_to_cart'.translation,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: Theme.of(context)
|
||||||
|
.primaryTextTheme
|
||||||
|
.bodyMedium
|
||||||
|
?.copyWith(
|
||||||
|
fontSize: 15.adaptedPx(),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppTheme.lightPrimaryColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
// Container(
|
|
||||||
// decoration: BoxDecoration(
|
|
||||||
// border: Border.all(
|
|
||||||
// width: 1.adaptedPx(),
|
|
||||||
// color: AppTheme.lightPrimaryColor,
|
|
||||||
// ),
|
|
||||||
// borderRadius: BorderRadius.circular(15.adaptedPx()),
|
|
||||||
// ),
|
|
||||||
// padding: EdgeInsets.symmetric(
|
|
||||||
// vertical: 15.adaptedPx(),
|
|
||||||
// horizontal: 15.adaptedPx(),
|
|
||||||
// ),
|
|
||||||
// child: Text(
|
|
||||||
// 'add_to_cart'.translation,
|
|
||||||
// textAlign: TextAlign.center,
|
|
||||||
// style: Theme.of(context)
|
|
||||||
// .primaryTextTheme
|
|
||||||
// .bodyMedium
|
|
||||||
// ?.copyWith(
|
|
||||||
// fontSize: 15.adaptedPx(),
|
|
||||||
// fontWeight: FontWeight.w600,
|
|
||||||
// color: AppTheme.lightPrimaryColor,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
),
|
),
|
||||||
|
SizedBox(height: 15.adaptedPx()),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,20 @@
|
||||||
import 'package:adaptix/adaptix.dart';
|
import 'package:adaptix/adaptix.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
import 'package:sapaly_shop/common/custom_button.dart';
|
import 'package:sapaly_shop/common/custom_button.dart';
|
||||||
import 'package:sapaly_shop/common/widgets/custom_text_field.dart';
|
import 'package:sapaly_shop/common/widgets/custom_text_field.dart';
|
||||||
import 'package:sapaly_shop/constants/global_variables.dart';
|
import 'package:sapaly_shop/constants/global_variables.dart';
|
||||||
import 'package:sapaly_shop/features/screens/drawer/sapaly_drawer.dart';
|
import 'package:sapaly_shop/features/screens/drawer/sapaly_drawer.dart';
|
||||||
|
import 'package:sapaly_shop/features/screens/home/home_screen.dart';
|
||||||
|
import 'package:sapaly_shop/features/services/auth_service.dart';
|
||||||
import 'package:sapaly_shop/features/widgets/sapaly_app_bar.dart';
|
import 'package:sapaly_shop/features/widgets/sapaly_app_bar.dart';
|
||||||
|
import 'package:sapaly_shop/features/widgets/unauthenticatedWidget.dart';
|
||||||
import 'package:sapaly_shop/models/settings_model.dart';
|
import 'package:sapaly_shop/models/settings_model.dart';
|
||||||
|
import 'package:sapaly_shop/providers/user_provider.dart';
|
||||||
import 'package:url_launcher/url_launcher_string.dart';
|
import 'package:url_launcher/url_launcher_string.dart';
|
||||||
|
|
||||||
|
import '../../../models/auth/login/login_request_model.dart';
|
||||||
import '../../../themes/app_theme.dart';
|
import '../../../themes/app_theme.dart';
|
||||||
|
|
||||||
class ContactsScreen extends StatefulWidget {
|
class ContactsScreen extends StatefulWidget {
|
||||||
|
|
@ -26,14 +32,27 @@ class _ContactsScreenState extends State<ContactsScreen> {
|
||||||
TextEditingController subjectController = TextEditingController();
|
TextEditingController subjectController = TextEditingController();
|
||||||
TextEditingController messageController = TextEditingController();
|
TextEditingController messageController = TextEditingController();
|
||||||
final GlobalKey<ScaffoldState> _key = GlobalKey();
|
final GlobalKey<ScaffoldState> _key = GlobalKey();
|
||||||
|
final AuthService authService = AuthService();
|
||||||
|
|
||||||
String number1 = '+993 63721584';
|
String number1 = '+993 63721584';
|
||||||
String number2 = '25-53-19';
|
String number2 = '25-53-19';
|
||||||
String mail1 = 'enquery@gmail.com';
|
String mail1 = 'enquery@gmail.com';
|
||||||
String mail2 = 'help@yourdomain.com';
|
String mail2 = 'help@yourdomain.com';
|
||||||
|
|
||||||
|
void sendMessage() {
|
||||||
|
debugPrint('EMAIL ${emailController.text}');
|
||||||
|
authService.sendMessage(
|
||||||
|
loginRequestModel: LoginRequestModel(
|
||||||
|
email: emailController.text,
|
||||||
|
password: messageController.text,
|
||||||
|
),
|
||||||
|
context: context,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
var me = Provider.of<UserProvider>(context, listen: false);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
drawer: SapalyDrawer(),
|
drawer: SapalyDrawer(),
|
||||||
backgroundColor: AppTheme.lightBackgroundColor,
|
backgroundColor: AppTheme.lightBackgroundColor,
|
||||||
|
|
@ -78,7 +97,7 @@ class _ContactsScreenState extends State<ContactsScreen> {
|
||||||
contentPadding: 0,
|
contentPadding: 0,
|
||||||
),
|
),
|
||||||
CustomTextField(
|
CustomTextField(
|
||||||
labelText: 'subject',
|
labelText: 'subject'.translation,
|
||||||
hintText: 'subject'.translation,
|
hintText: 'subject'.translation,
|
||||||
controller: subjectController,
|
controller: subjectController,
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
|
|
@ -100,7 +119,15 @@ class _ContactsScreenState extends State<ContactsScreen> {
|
||||||
),
|
),
|
||||||
CustomButton(
|
CustomButton(
|
||||||
name: 'send_message'.translation,
|
name: 'send_message'.translation,
|
||||||
onTap: () {},
|
onTap: () {
|
||||||
|
Navigator.of(context).push(
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => me.user.token.isEmpty
|
||||||
|
? const UnAuthenticated()
|
||||||
|
: const HomeScreen(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
backgroundColor: AppTheme.lightPrimaryColor,
|
backgroundColor: AppTheme.lightPrimaryColor,
|
||||||
isMain: true,
|
isMain: true,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,12 @@ import 'package:sapaly_shop/features/screens/drawer/sales.dart';
|
||||||
import 'package:sapaly_shop/features/screens/drawer/shops.dart';
|
import 'package:sapaly_shop/features/screens/drawer/shops.dart';
|
||||||
import 'package:sapaly_shop/features/screens/home/home_screen.dart';
|
import 'package:sapaly_shop/features/screens/home/home_screen.dart';
|
||||||
import 'package:sapaly_shop/features/screens/settings/settings_screen.dart';
|
import 'package:sapaly_shop/features/screens/settings/settings_screen.dart';
|
||||||
|
import 'package:sapaly_shop/features/services/page_navigator.dart';
|
||||||
import 'package:sapaly_shop/features/services/requests.dart';
|
import 'package:sapaly_shop/features/services/requests.dart';
|
||||||
import 'package:sapaly_shop/features/widgets/sapaly_icon.dart';
|
import 'package:sapaly_shop/features/widgets/sapaly_icon.dart';
|
||||||
import 'package:sapaly_shop/models/category_model.dart';
|
import 'package:sapaly_shop/models/category_model.dart';
|
||||||
import 'package:sapaly_shop/models/settings_model.dart';
|
import 'package:sapaly_shop/models/settings_model.dart';
|
||||||
|
import 'package:sapaly_shop/providers/user_provider.dart';
|
||||||
import 'package:url_launcher/url_launcher_string.dart';
|
import 'package:url_launcher/url_launcher_string.dart';
|
||||||
|
|
||||||
import '../../../constants/global_variables.dart';
|
import '../../../constants/global_variables.dart';
|
||||||
|
|
@ -85,7 +87,8 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SettingsModel settings = Provider.of<SettingsModel>(context, listen: true);
|
var settings = Provider.of<SettingsModel>(context, listen: false);
|
||||||
|
var me = Provider.of<UserProvider>(context, listen: false);
|
||||||
return Drawer(
|
return Drawer(
|
||||||
backgroundColor: AppTheme.whiteColor,
|
backgroundColor: AppTheme.whiteColor,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
@ -118,26 +121,43 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
me.user.user.email == '' && me.user.user.name == ''
|
||||||
|
? Container()
|
||||||
|
: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
PageNavigator(ctx: context)
|
||||||
|
.nextPage(page: const SettingsScreen());
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
Icons.account_circle,
|
||||||
|
size: 35.adaptedPx(),
|
||||||
|
color: AppTheme.lightPrimaryColor,
|
||||||
|
),
|
||||||
|
SizedBox(width: 10.adaptedPx()),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
me.user.user.email.isEmpty
|
||||||
|
? me.user.user.email
|
||||||
|
: me.user.user.name,
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: 4,
|
||||||
|
style: Theme.of(context)
|
||||||
|
.primaryTextTheme
|
||||||
|
.bodyMedium
|
||||||
|
?.copyWith(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppTheme.blackColor,
|
||||||
|
fontSize: 13.adaptedPx(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
|
||||||
Icons.account_circle,
|
|
||||||
size: 35.adaptedPx(),
|
|
||||||
color: AppTheme.lightPrimaryColor,
|
|
||||||
),
|
|
||||||
SizedBox(width: 10.adaptedPx()),
|
|
||||||
Text(
|
|
||||||
'Aman Amanow',
|
|
||||||
softWrap: true,
|
|
||||||
maxLines: 2,
|
|
||||||
style:
|
|
||||||
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: AppTheme.blackColor,
|
|
||||||
fontSize: 13.adaptedPx(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Spacer(),
|
|
||||||
SapalyIcon(
|
SapalyIcon(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var lang =
|
var lang =
|
||||||
|
|
@ -149,21 +169,18 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
||||||
.pushNamedAndRemoveUntil('/home', (route) => false);
|
.pushNamedAndRemoveUntil('/home', (route) => false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
width: 22.adaptedPx(),
|
width: 25.adaptedPx(),
|
||||||
height: 22.adaptedPx(),
|
height: 25.adaptedPx(),
|
||||||
hasBadge: false,
|
hasBadge: false,
|
||||||
child: SvgPicture.asset('assets/icons/lang.svg'),
|
child: SvgPicture.asset('assets/icons/lang.svg'),
|
||||||
),
|
),
|
||||||
SizedBox(width: 10.adaptedPx()),
|
SizedBox(width: 10.adaptedPx()),
|
||||||
Text(
|
Text(
|
||||||
settings.currentLanguage == 'tk'
|
'currentLang'.translation,
|
||||||
? 'TM'
|
|
||||||
: settings.currentLanguage.toUpperCase(),
|
|
||||||
style:
|
style:
|
||||||
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: AppTheme.blackColor,
|
color: AppTheme.blackColor,
|
||||||
fontSize: 13.adaptedPx(),
|
fontSize: 15.adaptedPx(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -177,7 +194,7 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
||||||
return TextButton(
|
return TextButton(
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
vertical: GlobalVariables.verticalPadding(context) / 2,
|
vertical: GlobalVariables.verticalPadding(context) / 3,
|
||||||
horizontal:
|
horizontal:
|
||||||
GlobalVariables.horizontalPadding(context) / 2,
|
GlobalVariables.horizontalPadding(context) / 2,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -24,20 +24,17 @@ class _ProfileScreenState extends State<SettingsScreen> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var me = Provider.of<UserProvider>(context, listen: false);
|
var me = Provider.of<UserProvider>(context, listen: false);
|
||||||
SettingsModel settings = Provider.of<SettingsModel>(context, listen: true);
|
SettingsModel settings = Provider.of<SettingsModel>(context, listen: true);
|
||||||
final GlobalKey<ScaffoldState> _key = GlobalKey();
|
|
||||||
String email = 'demir.at@gmail.com';
|
String email = 'demir.at@gmail.com';
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
drawer: SapalyDrawer(),
|
|
||||||
backgroundColor: AppTheme.lightBackgroundColor,
|
backgroundColor: AppTheme.lightBackgroundColor,
|
||||||
key: _key,
|
|
||||||
appBar: SapalyAppBar(
|
appBar: SapalyAppBar(
|
||||||
hasActionButton: true,
|
hasActionButton: true,
|
||||||
title: 'settings'.translation,
|
title: 'settings'.translation,
|
||||||
badge: '2',
|
badge: '2',
|
||||||
leadingButton: SvgPicture.asset('assets/icons/menu.svg'),
|
leadingButton: const Icon(Icons.arrow_back),
|
||||||
actionButton: SvgPicture.asset('assets/icons/cart.svg'),
|
actionButton: SvgPicture.asset('assets/icons/cart.svg'),
|
||||||
leadingOnTap: () {
|
leadingOnTap: () {
|
||||||
_key.currentState?.openDrawer();
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
actionOnTap: () {},
|
actionOnTap: () {},
|
||||||
),
|
),
|
||||||
|
|
@ -91,6 +88,7 @@ class _ProfileScreenState extends State<SettingsScreen> {
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(width: 10.adaptedPx()),
|
||||||
Text(
|
Text(
|
||||||
me.user.user.name,
|
me.user.user.name,
|
||||||
style: Theme.of(context)
|
style: Theme.of(context)
|
||||||
|
|
@ -117,6 +115,7 @@ class _ProfileScreenState extends State<SettingsScreen> {
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(width: 10.adaptedPx()),
|
||||||
Text(
|
Text(
|
||||||
me.user.user.phone,
|
me.user.user.phone,
|
||||||
style: Theme.of(context)
|
style: Theme.of(context)
|
||||||
|
|
@ -125,6 +124,7 @@ class _ProfileScreenState extends State<SettingsScreen> {
|
||||||
?.copyWith(
|
?.copyWith(
|
||||||
fontSize: 13.adaptedPx(),
|
fontSize: 13.adaptedPx(),
|
||||||
color: AppTheme.blackColor,
|
color: AppTheme.blackColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -132,4 +132,54 @@ class AuthService {
|
||||||
// await http.post(Uri.parse('$uri'));
|
// await http.post(Uri.parse('$uri'));
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// send message
|
||||||
|
Future<void> sendMessage({
|
||||||
|
required LoginRequestModel loginRequestModel,
|
||||||
|
required BuildContext context,
|
||||||
|
}) async {
|
||||||
|
try {
|
||||||
|
var response = await http.post(Uri.parse('$kBaseUrl/jwt/contact'),
|
||||||
|
body: loginRequestModel.toMap(),
|
||||||
|
headers: {
|
||||||
|
'Accept': 'application/json',
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.statusCode == HttpStatus.ok) {
|
||||||
|
var data = response.body;
|
||||||
|
var loginResponse = LoginResponseModel.fromJson(data);
|
||||||
|
debugPrint('LOGIN ${loginResponse.user.email}');
|
||||||
|
}
|
||||||
|
|
||||||
|
httpErrorHandle(
|
||||||
|
response: response,
|
||||||
|
context: context,
|
||||||
|
onSuccess: () async {
|
||||||
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
Provider.of<UserProvider>(context, listen: false)
|
||||||
|
.setUser(response.body);
|
||||||
|
await prefs.setString(
|
||||||
|
'token', jsonDecode(response.body)['data']['token']);
|
||||||
|
Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
|
HomeScreen.routeName,
|
||||||
|
(route) => false,
|
||||||
|
);
|
||||||
|
showSnackBar(
|
||||||
|
context,
|
||||||
|
content: 'login_success'.translation,
|
||||||
|
backgroundColor: AppTheme.lightPrimaryColor,
|
||||||
|
textColor: AppTheme.whiteColor,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
showSnackBar(
|
||||||
|
context,
|
||||||
|
content: e.toString(),
|
||||||
|
backgroundColor: AppTheme.redColor,
|
||||||
|
textColor: AppTheme.whiteColor,
|
||||||
|
);
|
||||||
|
debugPrint('Login ERROR ${e.toString()}');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:adaptix/adaptix.dart';
|
||||||
|
import 'package:sapaly_shop/common/custom_button.dart';
|
||||||
|
import 'package:sapaly_shop/features/services/page_navigator.dart';
|
||||||
|
import 'package:sapaly_shop/features/widgets/sapaly_app_bar.dart';
|
||||||
|
import 'package:sapaly_shop/models/settings_model.dart';
|
||||||
|
import 'package:sapaly_shop/themes/app_theme.dart';
|
||||||
|
|
||||||
|
import '../screens/auth/login/login_screen.dart';
|
||||||
|
import '../screens/drawer/sapaly_drawer.dart';
|
||||||
|
import 'button.dart';
|
||||||
|
|
||||||
|
class UnAuthenticated extends StatefulWidget {
|
||||||
|
const UnAuthenticated({Key? key}) : super(key: key);
|
||||||
|
@override
|
||||||
|
_UnAuthenticatedState createState() => _UnAuthenticatedState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _UnAuthenticatedState extends State<UnAuthenticated> {
|
||||||
|
final GlobalKey<ScaffoldState> _key = GlobalKey();
|
||||||
|
final GlobalKey<FormState> formKey = GlobalKey<FormState>();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
key: _key,
|
||||||
|
backgroundColor: AppTheme.lightBackgroundColor,
|
||||||
|
appBar: SapalyAppBar(
|
||||||
|
hasActionButton: false,
|
||||||
|
title: '',
|
||||||
|
badge: '',
|
||||||
|
leadingButton: const Icon(Icons.arrow_back),
|
||||||
|
actionButton: Container(),
|
||||||
|
leadingOnTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
actionOnTap: () {},
|
||||||
|
),
|
||||||
|
body: Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
width: 60.orientationWidth,
|
||||||
|
height: 200.adaptedPx(),
|
||||||
|
child: SvgPicture.asset('assets/images/unauth.svg'),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'needToEnter'.translation,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: Theme.of(context).primaryTextTheme.bodyMedium?.copyWith(
|
||||||
|
color: AppTheme.lightPrimaryColor,
|
||||||
|
fontSize: 15.adaptedPx(),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20.adaptedPx(),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 100.adaptedPx()),
|
||||||
|
child: CustomButton(
|
||||||
|
name: 'login'.translation,
|
||||||
|
onTap: () {
|
||||||
|
PageNavigator(ctx: context)
|
||||||
|
.nextPage(page: const LoginScreen());
|
||||||
|
},
|
||||||
|
backgroundColor: AppTheme.lightPrimaryColor,
|
||||||
|
isMain: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
"repeat_password":"Repeat password",
|
"repeat_password":"Repeat password",
|
||||||
"repeat_password_to_confirm":"Repeat password to confirm",
|
"repeat_password_to_confirm":"Repeat password to confirm",
|
||||||
"add_to_cart":"Add to cart",
|
"add_to_cart":"Add to cart",
|
||||||
|
"added_to_cart":"Added to cart",
|
||||||
"home":"Home",
|
"home":"Home",
|
||||||
"about_us":"About us",
|
"about_us":"About us",
|
||||||
"sales":"Sales",
|
"sales":"Sales",
|
||||||
|
|
@ -22,7 +23,13 @@
|
||||||
"settings":"Settings",
|
"settings":"Settings",
|
||||||
"currentLang":"Language",
|
"currentLang":"Language",
|
||||||
"our_location":"Our location",
|
"our_location":"Our location",
|
||||||
"login_success":"Successfully logged in!"
|
"login_success":"Successfully logged in!",
|
||||||
|
"send_message":"Send message",
|
||||||
|
"first_name":"First name",
|
||||||
|
"subject":"Subject of message",
|
||||||
|
"message":"Your message...",
|
||||||
|
"needToEnter":"Log in to use the service",
|
||||||
|
"error_occured":"Error occured",
|
||||||
|
"info_about_user":"Information about user",
|
||||||
|
"edit":"Edit"
|
||||||
}
|
}
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
"repeat_password":"Повторите пароль",
|
"repeat_password":"Повторите пароль",
|
||||||
"repeat_password_to_confirm":"Повторите пароль для подтверждения",
|
"repeat_password_to_confirm":"Повторите пароль для подтверждения",
|
||||||
"add_to_cart":"Добавить в корзину",
|
"add_to_cart":"Добавить в корзину",
|
||||||
|
"added_to_cart":"Добавлено в корзину",
|
||||||
"home":"Главная",
|
"home":"Главная",
|
||||||
"about_us":"О нас",
|
"about_us":"О нас",
|
||||||
"sales":"Продажи",
|
"sales":"Продажи",
|
||||||
|
|
@ -22,6 +23,14 @@
|
||||||
"settings":"Настройки",
|
"settings":"Настройки",
|
||||||
"currentLang":"Язык",
|
"currentLang":"Язык",
|
||||||
"our_location":"Наш адрес",
|
"our_location":"Наш адрес",
|
||||||
"login_success":"Успешно авторизовано!"
|
"login_success":"Успешно авторизовано!",
|
||||||
|
"send_message":"Отправить сообщение",
|
||||||
|
"first_name":"Ваше имя",
|
||||||
|
"subject":"Тема сообщения",
|
||||||
|
"message":"Ваше сообщение...",
|
||||||
|
"needToEnter":"Чтобы воспользоваться услугой авторизуйтесь",
|
||||||
|
"error_occured":"Произошла ошибка",
|
||||||
|
"info_about_user":"Информация о пользователе",
|
||||||
|
"edit":"Редактировать"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
"repeat_password":"Açar sözi gaýtalaň",
|
"repeat_password":"Açar sözi gaýtalaň",
|
||||||
"repeat_password_to_confirm":"Açar sözi tassyklamak üçin gaýtalaň",
|
"repeat_password_to_confirm":"Açar sözi tassyklamak üçin gaýtalaň",
|
||||||
"add_to_cart":"Sebede goş",
|
"add_to_cart":"Sebede goş",
|
||||||
|
"added_to_cart":"Sebede goşuldy",
|
||||||
"home":"Esasy sahypa",
|
"home":"Esasy sahypa",
|
||||||
"about_us":"Biz barada",
|
"about_us":"Biz barada",
|
||||||
"sales":"Satuwlar",
|
"sales":"Satuwlar",
|
||||||
|
|
@ -22,5 +23,13 @@
|
||||||
"settings":"Sazlamalar",
|
"settings":"Sazlamalar",
|
||||||
"currentLang":"Dili saýlaň",
|
"currentLang":"Dili saýlaň",
|
||||||
"our_location":"Biziň salgymyz",
|
"our_location":"Biziň salgymyz",
|
||||||
"login_success":"Üstünlikli içeri girdiňiz!"
|
"login_success":"Üstünlikli içeri girdiňiz!",
|
||||||
|
"send_message":"Ugratmak",
|
||||||
|
"first_name":"Ady",
|
||||||
|
"subject":"Hatyň mowzugy",
|
||||||
|
"message":"Siziň hatyňyz...",
|
||||||
|
"needToEnter":"Hyzmaty ulanmak üçin ulgama giriň",
|
||||||
|
"error_occured":"Näsazlyk ýüze çykdy",
|
||||||
|
"info_about_user":"Ulanyjy barada maglumat",
|
||||||
|
"edit":"Üýtgetmek"
|
||||||
}
|
}
|
||||||
|
|
@ -74,6 +74,7 @@ extension LocalMessageExt on String {
|
||||||
"repeat_password_to_confirm":
|
"repeat_password_to_confirm":
|
||||||
SettingsModel._localization?.repeat_password_to_confirm,
|
SettingsModel._localization?.repeat_password_to_confirm,
|
||||||
"add_to_cart": SettingsModel._localization?.add_to_cart,
|
"add_to_cart": SettingsModel._localization?.add_to_cart,
|
||||||
|
"added_to_cart": SettingsModel._localization?.added_to_cart,
|
||||||
"home": SettingsModel._localization?.home,
|
"home": SettingsModel._localization?.home,
|
||||||
"about_us": SettingsModel._localization?.about_us,
|
"about_us": SettingsModel._localization?.about_us,
|
||||||
"sales": SettingsModel._localization?.sales,
|
"sales": SettingsModel._localization?.sales,
|
||||||
|
|
@ -84,6 +85,12 @@ extension LocalMessageExt on String {
|
||||||
"currentLang": SettingsModel._localization?.currentLang,
|
"currentLang": SettingsModel._localization?.currentLang,
|
||||||
"our_location": SettingsModel._localization?.our_location,
|
"our_location": SettingsModel._localization?.our_location,
|
||||||
"login_success": SettingsModel._localization?.login_success,
|
"login_success": SettingsModel._localization?.login_success,
|
||||||
|
"send_message": SettingsModel._localization?.send_message,
|
||||||
|
"first_name": SettingsModel._localization?.first_name,
|
||||||
|
"subject": SettingsModel._localization?.subject,
|
||||||
|
"message": SettingsModel._localization?.message,
|
||||||
|
"needToEnter": SettingsModel._localization?.needToEnter,
|
||||||
|
"info_about_user": SettingsModel._localization?.info_about_user,
|
||||||
}[this] ??
|
}[this] ??
|
||||||
this;
|
this;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue