mini bugs solved in some screens
This commit is contained in:
parent
66da382029
commit
85616fd627
|
|
@ -60,7 +60,7 @@ class _ContactsScreenState extends State<ContactsScreen> {
|
|||
appBar: SapalyAppBar(
|
||||
hasActionButton: true,
|
||||
title: 'contacts'.translation,
|
||||
badge: '2',
|
||||
badge: '',
|
||||
leadingButton: const Icon(
|
||||
Icons.arrow_back,
|
||||
color: AppTheme.blackColor,
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
|||
],
|
||||
),
|
||||
),
|
||||
me.user.user.email == '' && me.user.user.name == ''
|
||||
me.user.user.email.isEmpty
|
||||
? Container()
|
||||
: GestureDetector(
|
||||
onTap: () {
|
||||
|
|
@ -138,9 +138,7 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
|||
SizedBox(width: 10.adaptedPx()),
|
||||
Expanded(
|
||||
child: Text(
|
||||
me.user.user.email.isEmpty
|
||||
? me.user.user.email
|
||||
: me.user.user.name,
|
||||
me.user.user.email,
|
||||
softWrap: true,
|
||||
maxLines: 4,
|
||||
style: Theme.of(context)
|
||||
|
|
@ -157,10 +155,7 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 15.adaptedPx(),
|
||||
horizontal: 5.adaptedPx(),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(vertical: 10.adaptedPx()),
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
var lang =
|
||||
|
|
@ -174,8 +169,8 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
|||
},
|
||||
child: Row(
|
||||
children: [
|
||||
SapalyIcon(
|
||||
onTap: () async {
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
var lang = await languagePicker(
|
||||
context, settings.currentLanguage);
|
||||
|
||||
|
|
@ -186,12 +181,12 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
|||
'/home', (route) => false);
|
||||
}
|
||||
},
|
||||
width: 25.adaptedPx(),
|
||||
height: 25.adaptedPx(),
|
||||
hasBadge: false,
|
||||
child: SvgPicture.asset('assets/icons/lang.svg'),
|
||||
icon: SvgPicture.asset(
|
||||
'assets/icons/lang.svg',
|
||||
width: 25.adaptedPx(),
|
||||
height: 25.adaptedPx(),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10.adaptedPx()),
|
||||
Text(
|
||||
'currentLang'.translation,
|
||||
style: Theme.of(context)
|
||||
|
|
@ -199,18 +194,20 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
|||
.bodyMedium
|
||||
?.copyWith(
|
||||
color: AppTheme.blackColor,
|
||||
fontSize: 15.adaptedPx(),
|
||||
fontSize: 17.adaptedPx(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
ListView.builder(
|
||||
ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemCount: icons.length,
|
||||
scrollDirection: Axis.vertical,
|
||||
separatorBuilder: (context, index) =>
|
||||
SizedBox(height: 10.adaptedPx()),
|
||||
itemBuilder: (context, index) {
|
||||
return TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
|
|
@ -230,8 +227,8 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
|||
SvgPicture.asset(
|
||||
icons[index],
|
||||
color: AppTheme.lightPrimaryColor,
|
||||
width: 22.adaptedPx(),
|
||||
height: 22.adaptedPx(),
|
||||
width: 26.adaptedPx(),
|
||||
height: 26.adaptedPx(),
|
||||
),
|
||||
SizedBox(width: 10.adaptedPx()),
|
||||
Text(
|
||||
|
|
@ -242,7 +239,7 @@ class _SapalyDrawerState extends State<SapalyDrawer> {
|
|||
?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppTheme.blackColor,
|
||||
fontSize: 14.adaptedPx(),
|
||||
fontSize: 16.adaptedPx(),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -60,9 +60,11 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
}
|
||||
tabController = TabController(length: categories.length, vsync: this);
|
||||
} catch (e) {
|
||||
setState(() {
|
||||
hasError = true;
|
||||
});
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
hasError = true;
|
||||
});
|
||||
}
|
||||
debugPrint(e.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:sapaly_shop/features/screens/home/home_screen.dart';
|
||||
import 'package:sapaly_shop/features/services/page_navigator.dart';
|
||||
import 'package:sapaly_shop/themes/app_theme.dart';
|
||||
|
||||
class Onboarding extends StatefulWidget {
|
||||
|
|
@ -14,9 +15,7 @@ class _OnboardingState extends State<Onboarding> {
|
|||
@override
|
||||
void initState() {
|
||||
Future.delayed(const Duration(seconds: 5), () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (context) => const HomeScreen()),
|
||||
);
|
||||
PageNavigator(ctx: context).nextPageOnly(page: const HomeScreen());
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import 'package:flutter/material.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/features/screens/drawer/sapaly_drawer.dart';
|
||||
import 'package:sapaly_shop/features/widgets/sapaly_app_bar.dart';
|
||||
import 'package:sapaly_shop/models/settings_model.dart';
|
||||
import 'package:sapaly_shop/providers/user_provider.dart';
|
||||
|
|
@ -28,11 +27,11 @@ class _ProfileScreenState extends State<SettingsScreen> {
|
|||
return Scaffold(
|
||||
backgroundColor: AppTheme.lightBackgroundColor,
|
||||
appBar: SapalyAppBar(
|
||||
hasActionButton: true,
|
||||
hasActionButton: false,
|
||||
title: 'settings'.translation,
|
||||
badge: '2',
|
||||
badge: '',
|
||||
leadingButton: const Icon(Icons.arrow_back),
|
||||
actionButton: SvgPicture.asset('assets/icons/cart.svg'),
|
||||
actionButton: Container(),
|
||||
leadingOnTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
|
@ -78,7 +77,7 @@ class _ProfileScreenState extends State<SettingsScreen> {
|
|||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'name:'.translation,
|
||||
'${'email'.translation}:',
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium
|
||||
|
|
@ -90,13 +89,14 @@ class _ProfileScreenState extends State<SettingsScreen> {
|
|||
),
|
||||
SizedBox(width: 10.adaptedPx()),
|
||||
Text(
|
||||
me.user.user.name,
|
||||
me.user.user.email,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium
|
||||
?.copyWith(
|
||||
fontSize: 13.adaptedPx(),
|
||||
color: AppTheme.blackColor,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -171,7 +171,7 @@ class _ProfileScreenState extends State<SettingsScreen> {
|
|||
SvgPicture.asset('assets/icons/lang.svg'),
|
||||
SizedBox(width: 10.adaptedPx()),
|
||||
Text(
|
||||
'language'.translation,
|
||||
'currentLang'.translation,
|
||||
style: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.bodyMedium
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
"about_us":"Biz barada",
|
||||
"sales":"Satuwlar",
|
||||
"new_arrival":"Täze harytlar",
|
||||
"shops":"Meniň satyn almalarym",
|
||||
"shops":"Satyn alanlarym",
|
||||
"contacts":"Habarlaşmak",
|
||||
"settings":"Sazlamalar",
|
||||
"currentLang":"Dili saýlaň",
|
||||
|
|
|
|||
Loading…
Reference in New Issue