added string for every screen and removed from app strings
This commit is contained in:
@@ -5,10 +5,11 @@ import 'package:tm_app/core/routes/app_routes.dart';
|
||||
import 'package:tm_app/view_models/profile_view_model.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../../core/constants/strings.dart';
|
||||
import '../../../core/constants/common_strings.dart';
|
||||
import '../../../core/theme/colors.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
import '../../shared/desktop_navigation_widget.dart';
|
||||
import '../strings/profile_strings.dart';
|
||||
import '../widgets/theme_toggle.dart';
|
||||
import '../widgets/title_description.dart';
|
||||
|
||||
@@ -64,7 +65,7 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
|
||||
}
|
||||
|
||||
if (viewModel.companyProfileData == null) {
|
||||
return Center(child: Text(AppStrings.noData));
|
||||
return Center(child: Text(CommonStrings.noData));
|
||||
}
|
||||
|
||||
return Column(
|
||||
@@ -100,24 +101,24 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
|
||||
children: [
|
||||
SizedBox(height: 36.0.h()),
|
||||
TitleDescription(
|
||||
title: AppStrings.companyName,
|
||||
title: ProfileStrings.companyName,
|
||||
description: viewModel.companyProfileData!.name!,
|
||||
),
|
||||
TitleDescription(
|
||||
title: AppStrings.nationalId,
|
||||
title: ProfileStrings.nationalId,
|
||||
description: viewModel.companyProfileData!.id!,
|
||||
),
|
||||
TitleDescription(
|
||||
title: AppStrings.registrationNumber,
|
||||
title: ProfileStrings.registrationNumber,
|
||||
description:
|
||||
viewModel.companyProfileData!.registrationNumber!,
|
||||
),
|
||||
TitleDescription(
|
||||
title: AppStrings.businessType,
|
||||
title: ProfileStrings.businessType,
|
||||
description: '-',
|
||||
),
|
||||
TitleDescription(
|
||||
title: AppStrings.founded,
|
||||
title: ProfileStrings.founded,
|
||||
description:
|
||||
viewModel.companyProfileData!.foundedYear!.toString(),
|
||||
),
|
||||
@@ -126,7 +127,7 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
|
||||
Align(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
child: Text(
|
||||
AppStrings.settings,
|
||||
ProfileStrings.settings,
|
||||
style: TextStyle(
|
||||
fontSize: 20.0.sp(),
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -140,7 +141,7 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
AppStrings.appTheme,
|
||||
ProfileStrings.appTheme,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -178,7 +179,7 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
AppStrings.logout,
|
||||
ProfileStrings.logout,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
|
||||
@@ -7,9 +7,10 @@ import 'package:tm_app/views/profile/widgets/theme_toggle.dart';
|
||||
import 'package:tm_app/views/shared/tender_app_bar.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../../core/constants/strings.dart';
|
||||
import '../../../core/constants/common_strings.dart';
|
||||
import '../../../core/theme/colors.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
import '../strings/profile_strings.dart';
|
||||
import '../widgets/title_description.dart';
|
||||
|
||||
class MobileProfilePage extends StatefulWidget {
|
||||
@@ -52,7 +53,7 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
appBar: tenderMobileAppBar(title: AppStrings.profile),
|
||||
appBar: tenderMobileAppBar(title: ProfileStrings.profileTitle),
|
||||
body: Consumer<ProfileViewModel>(
|
||||
builder: (context, viewModel, child) {
|
||||
if (viewModel.isLoading) {
|
||||
@@ -66,7 +67,7 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
|
||||
}
|
||||
|
||||
if (viewModel.companyProfileData == null) {
|
||||
return Center(child: Text(AppStrings.noData));
|
||||
return Center(child: Text(CommonStrings.noData));
|
||||
}
|
||||
|
||||
return Padding(
|
||||
@@ -78,24 +79,24 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
|
||||
children: [
|
||||
SizedBox(height: 36.0.h()),
|
||||
TitleDescription(
|
||||
title: AppStrings.companyName,
|
||||
title: ProfileStrings.companyName,
|
||||
description: viewModel.companyProfileData!.name!,
|
||||
),
|
||||
TitleDescription(
|
||||
title: AppStrings.nationalId,
|
||||
title: ProfileStrings.nationalId,
|
||||
description: viewModel.companyProfileData!.id!,
|
||||
),
|
||||
TitleDescription(
|
||||
title: AppStrings.registrationNumber,
|
||||
title: ProfileStrings.registrationNumber,
|
||||
description:
|
||||
viewModel.companyProfileData!.registrationNumber!,
|
||||
),
|
||||
TitleDescription(
|
||||
title: AppStrings.businessType,
|
||||
title: ProfileStrings.businessType,
|
||||
description: '-',
|
||||
),
|
||||
TitleDescription(
|
||||
title: AppStrings.founded,
|
||||
title: ProfileStrings.founded,
|
||||
description:
|
||||
viewModel.companyProfileData!.foundedYear!.toString(),
|
||||
),
|
||||
@@ -103,7 +104,7 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
|
||||
Align(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
child: Text(
|
||||
AppStrings.settings,
|
||||
ProfileStrings.settings,
|
||||
style: TextStyle(
|
||||
fontSize: 20.0.sp(),
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -117,7 +118,7 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
AppStrings.appTheme,
|
||||
ProfileStrings.appTheme,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -153,7 +154,7 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
AppStrings.logout,
|
||||
ProfileStrings.logout,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
|
||||
@@ -3,13 +3,14 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/core/constants/assets.dart';
|
||||
import 'package:tm_app/core/constants/strings.dart';
|
||||
import 'package:tm_app/core/constants/common_strings.dart';
|
||||
import 'package:tm_app/core/routes/app_routes.dart';
|
||||
import 'package:tm_app/view_models/profile_view_model.dart';
|
||||
|
||||
import '../../../core/theme/colors.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
import '../../shared/tablet_navigation_widget.dart';
|
||||
import '../strings/profile_strings.dart';
|
||||
import '../widgets/theme_toggle.dart';
|
||||
import '../widgets/title_description.dart';
|
||||
|
||||
@@ -64,7 +65,7 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
|
||||
}
|
||||
|
||||
if (viewModel.companyProfileData == null) {
|
||||
return Center(child: Text(AppStrings.noData));
|
||||
return Center(child: Text(CommonStrings.noData));
|
||||
}
|
||||
|
||||
return SafeArea(
|
||||
@@ -124,24 +125,24 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
|
||||
children: [
|
||||
SizedBox(height: 128.0.h()),
|
||||
TitleDescription(
|
||||
title: AppStrings.companyName,
|
||||
title: ProfileStrings.companyName,
|
||||
description: viewModel.companyProfileData!.name!,
|
||||
),
|
||||
TitleDescription(
|
||||
title: AppStrings.nationalId,
|
||||
title: ProfileStrings.nationalId,
|
||||
description: viewModel.companyProfileData!.id!,
|
||||
),
|
||||
TitleDescription(
|
||||
title: AppStrings.registrationNumber,
|
||||
title: ProfileStrings.registrationNumber,
|
||||
description:
|
||||
viewModel.companyProfileData!.registrationNumber!,
|
||||
),
|
||||
TitleDescription(
|
||||
title: AppStrings.businessType,
|
||||
title: ProfileStrings.businessType,
|
||||
description: '-',
|
||||
),
|
||||
TitleDescription(
|
||||
title: AppStrings.founded,
|
||||
title: ProfileStrings.founded,
|
||||
description:
|
||||
viewModel.companyProfileData!.foundedYear!.toString(),
|
||||
),
|
||||
@@ -150,7 +151,7 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
|
||||
Align(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
child: Text(
|
||||
AppStrings.settings,
|
||||
ProfileStrings.settings,
|
||||
style: TextStyle(
|
||||
fontSize: 20.0.sp(),
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -164,7 +165,7 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
AppStrings.appTheme,
|
||||
ProfileStrings.appTheme,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -202,7 +203,7 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
AppStrings.logout,
|
||||
ProfileStrings.logout,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
class ProfileStrings {
|
||||
ProfileStrings._();
|
||||
|
||||
static const String profile = 'Profile';
|
||||
static const String profileTitle = 'Profile';
|
||||
static const String settings = 'Settings';
|
||||
static const String appTheme = 'App Theme';
|
||||
static const String companyName = 'Company Name';
|
||||
static const String nationalId = 'National ID';
|
||||
static const String registrationNumber = 'Registration No.';
|
||||
static const String businessType = 'Business Type';
|
||||
static const String founded = 'Founded';
|
||||
static const String logout = 'Logout';
|
||||
}
|
||||
Reference in New Issue
Block a user