BASE: Initialize Localization.
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:customer/models/vendor_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -43,7 +44,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Your Favourites, All in One Place".tr,
|
||||
"Your Favourites, All in One Place".tr(),
|
||||
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
@@ -64,18 +65,18 @@ class FavouriteScreen extends StatelessWidget {
|
||||
Image.asset("assets/images/login.gif", height: 120),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
"Please Log In to Continue".tr,
|
||||
"Please Log In to Continue".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"You’re not logged in. Please sign in to access your account and explore all features.".tr,
|
||||
"You’re not logged in. Please sign in to access your account and explore all features.".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.bold),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Log in".tr,
|
||||
title: "Log in".tr(),
|
||||
width: 55,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
@@ -113,7 +114,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: Text(
|
||||
"Favourite Store".tr,
|
||||
"Favourite Store".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
|
||||
),
|
||||
@@ -134,7 +135,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: Text(
|
||||
"Favourite Item".tr,
|
||||
"Favourite Item".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -164,7 +165,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
child:
|
||||
controller.favouriteRestaurant.value
|
||||
? controller.favouriteVendorList.isEmpty
|
||||
? Constant.showEmptyView(message: "Favourite Store not found.".tr)
|
||||
? Constant.showEmptyView(message: "Favourite Store not found.".tr())
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
@@ -260,7 +261,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr,
|
||||
"Free Delivery".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.success600,
|
||||
@@ -370,7 +371,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
},
|
||||
)
|
||||
: controller.favouriteFoodList.isEmpty
|
||||
? Constant.showEmptyView(message: "Favourite Item not found.".tr)
|
||||
? Constant.showEmptyView(message: "Favourite Item not found.".tr())
|
||||
: ListView.builder(
|
||||
itemCount: controller.favouriteFoodList.length,
|
||||
shrinkWrap: true,
|
||||
@@ -384,7 +385,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
return Constant.loader();
|
||||
} else {
|
||||
if (snapshot.hasError) {
|
||||
return Center(child: Text('${"error".tr}: ${snapshot.error}'));
|
||||
return Center(child: Text('${"error".tr()}: ${snapshot.error}'));
|
||||
} else if (snapshot.data == null) {
|
||||
return const SizedBox();
|
||||
} else {
|
||||
@@ -427,7 +428,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
: SvgPicture.asset("assets/icons/ic_veg.svg"),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
productModel.nonveg == true ? "Non Veg.".tr : "Pure veg.".tr,
|
||||
productModel.nonveg == true ? "Non Veg.".tr() : "Pure veg.".tr(),
|
||||
style: TextStyle(
|
||||
color: productModel.nonveg == true ? AppThemeData.danger300 : AppThemeData.success400,
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
|
||||
Reference in New Issue
Block a user