feat: lang
This commit is contained in:
@@ -34,7 +34,7 @@ class ProfileAccountInfo extends StatelessWidget {
|
||||
Padding(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Text(
|
||||
'Account Information',
|
||||
context.lang.account_information,
|
||||
style: AppStyle.xl.copyWith(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -45,7 +45,7 @@ class ProfileAccountInfo extends StatelessWidget {
|
||||
|
||||
ProfileTile(
|
||||
icon: LineIcons.envelope,
|
||||
title: 'Email',
|
||||
title: context.lang.email,
|
||||
subtitle: user.email,
|
||||
showArrow: false,
|
||||
),
|
||||
@@ -54,7 +54,7 @@ class ProfileAccountInfo extends StatelessWidget {
|
||||
|
||||
ProfileTile(
|
||||
icon: LineIcons.calendarAlt,
|
||||
title: 'Member Since',
|
||||
title: context.lang.member_since,
|
||||
subtitle: user.createdAt.toDate,
|
||||
showArrow: false,
|
||||
),
|
||||
@@ -62,15 +62,15 @@ class ProfileAccountInfo extends StatelessWidget {
|
||||
|
||||
ProfileTile(
|
||||
icon: LineIcons.userEdit,
|
||||
title: 'Ubah Profil',
|
||||
subtitle: 'Ubah profil kamu',
|
||||
title: context.lang.edit_profile,
|
||||
subtitle: context.lang.edit_profile_desc,
|
||||
onTap: () => context.router.push(ProfileEditRoute(user: user)),
|
||||
),
|
||||
ProfileDivider(),
|
||||
ProfileTile(
|
||||
icon: LineIcons.lock,
|
||||
title: 'Change Password',
|
||||
subtitle: 'Change your password',
|
||||
title: context.lang.change_password,
|
||||
subtitle: context.lang.change_password_desc,
|
||||
onTap: () => context.router.push(ProfileChangePasswordRoute()),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../common/extension/extension.dart';
|
||||
import '../../../../common/theme/theme.dart';
|
||||
import '../../../router/app_router.gr.dart';
|
||||
import 'profile_tile.dart';
|
||||
@@ -37,7 +38,7 @@ class _ProfileAppSettingState extends State<ProfileAppSetting> {
|
||||
Padding(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Text(
|
||||
'App Settings',
|
||||
context.lang.app_settings,
|
||||
style: AppStyle.xl.copyWith(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -74,8 +75,8 @@ class _ProfileAppSettingState extends State<ProfileAppSetting> {
|
||||
// ProfileDivider(),
|
||||
ProfileTile(
|
||||
icon: Icons.language_outlined,
|
||||
title: 'Language',
|
||||
subtitle: 'English (US)',
|
||||
title: context.lang.language,
|
||||
subtitle: context.lang.language_desc,
|
||||
onTap: () => context.router.push(LanguageRoute()),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../common/extension/extension.dart';
|
||||
import '../../../../common/theme/theme.dart';
|
||||
import '../../../router/app_router.gr.dart';
|
||||
import 'divider.dart';
|
||||
@@ -30,7 +31,7 @@ class ProfileBusinessSetting extends StatelessWidget {
|
||||
Padding(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Text(
|
||||
'Business Settings',
|
||||
context.lang.business_settings,
|
||||
style: AppStyle.xl.copyWith(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -41,8 +42,8 @@ class ProfileBusinessSetting extends StatelessWidget {
|
||||
|
||||
ProfileTile(
|
||||
icon: Icons.business_outlined,
|
||||
title: 'Outlet Information',
|
||||
subtitle: 'Manage your Outlet details',
|
||||
title: context.lang.outlet_information,
|
||||
subtitle: context.lang.outlet_informatio_desc,
|
||||
onTap: () => context.router.push(OutletInformationRoute()),
|
||||
),
|
||||
|
||||
@@ -50,8 +51,8 @@ class ProfileBusinessSetting extends StatelessWidget {
|
||||
|
||||
ProfileTile(
|
||||
icon: Icons.people_outline,
|
||||
title: 'Staff Management',
|
||||
subtitle: 'Manage employees and permissions',
|
||||
title: context.lang.staff_management,
|
||||
subtitle: context.lang.staff_management_desc,
|
||||
onTap: () => context.router.push(ComingSoonRoute()),
|
||||
),
|
||||
|
||||
@@ -59,16 +60,16 @@ class ProfileBusinessSetting extends StatelessWidget {
|
||||
|
||||
ProfileTile(
|
||||
icon: Icons.inventory_2_outlined,
|
||||
title: 'Product',
|
||||
subtitle: 'Manage your products',
|
||||
title: context.lang.products,
|
||||
subtitle: context.lang.manage_your_products,
|
||||
onTap: () => context.router.push(ProductRoute()),
|
||||
),
|
||||
ProfileDivider(),
|
||||
|
||||
ProfileTile(
|
||||
icon: Icons.download_outlined,
|
||||
title: 'Download Report',
|
||||
subtitle: 'Download your sales or inventory report',
|
||||
title: context.lang.download_report,
|
||||
subtitle: context.lang.download_report_desc,
|
||||
onTap: () => context.router.push(DownloadReportRoute()),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import '../../../../application/auth/logout_form/logout_form_bloc.dart';
|
||||
import '../../../../common/extension/extension.dart';
|
||||
import '../../../../common/theme/theme.dart';
|
||||
import '../../../components/spacer/spacer.dart';
|
||||
import 'profile_tile.dart';
|
||||
|
||||
class ProfileDangerZone extends StatelessWidget {
|
||||
@@ -28,27 +28,10 @@ class ProfileDangerZone extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.warning_outlined, color: AppColor.error, size: 20),
|
||||
const SpaceWidth(8),
|
||||
Text(
|
||||
'Danger Zone',
|
||||
style: AppStyle.xl.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.error,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
ProfileTile(
|
||||
icon: Icons.logout,
|
||||
title: 'Logout',
|
||||
subtitle: 'Sign out from your account',
|
||||
title: context.lang.logout,
|
||||
subtitle: context.lang.logout_desc,
|
||||
iconColor: AppColor.error,
|
||||
textColor: AppColor.error,
|
||||
onTap: () {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../common/extension/extension.dart';
|
||||
import '../../../../common/theme/theme.dart';
|
||||
import '../../../router/app_router.gr.dart';
|
||||
import 'divider.dart';
|
||||
@@ -30,7 +31,7 @@ class ProfileSupport extends StatelessWidget {
|
||||
Padding(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Text(
|
||||
'Support',
|
||||
context.lang.support,
|
||||
style: AppStyle.xl.copyWith(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -41,8 +42,8 @@ class ProfileSupport extends StatelessWidget {
|
||||
|
||||
ProfileTile(
|
||||
icon: Icons.help_outline,
|
||||
title: 'Help Center',
|
||||
subtitle: 'Get help and support',
|
||||
title: context.lang.help_center,
|
||||
subtitle: context.lang.help_center_desc,
|
||||
onTap: () => context.router.push(ComingSoonRoute()),
|
||||
),
|
||||
|
||||
@@ -60,8 +61,8 @@ class ProfileSupport extends StatelessWidget {
|
||||
|
||||
ProfileTile(
|
||||
icon: Icons.info_outline,
|
||||
title: 'About',
|
||||
subtitle: 'App version and information',
|
||||
title: context.lang.about,
|
||||
subtitle: context.lang.about_desc,
|
||||
onTap: () => context.router.push(AboutAppRoute()),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user