Skip to content

Commit

Permalink
shop_info distance problem fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
haritha037 committed Nov 26, 2024
1 parent 7951411 commit 30e3524
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 3 additions & 2 deletions front-end/lib/pages/my shop page/my_shop_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ class MyShopInfo extends StatelessWidget {
// DISTANCE
IconAndTextWidget(
icon: Icons.timeline,
text:
'${locationController.distance!.toStringAsFixed(2)} km',
text: locationController.distance != null
? '${locationController.distance!.toStringAsFixed(2)} km'
: "_ km",
backgroundColor: AppColors.iconColorRedLight,
iconColor: AppColors.iconColorRed,
iconSize: 36 * Dimentions.hUnit,
Expand Down
5 changes: 3 additions & 2 deletions front-end/lib/pages/shop page/shop_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ class ShopInfo extends StatelessWidget {
// DISTANCE
IconAndTextWidget(
icon: Icons.timeline,
text:
'${locationController.distance!.toStringAsFixed(2)} km',
text: locationController.distance != null
? '${locationController.distance!.toStringAsFixed(2)} km'
: "_ km",
backgroundColor: AppColors.iconColorRedLight,
iconColor: AppColors.iconColorRed,
iconSize: 36 * Dimentions.hUnit,
Expand Down
6 changes: 3 additions & 3 deletions front-end/lib/utils/app_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ class AppConstants {
// static const String BASE_URL = "http://10.0.2.2:5000"; // emulator
// static const String BASE_URL =
// "http://Food-buddy-env.eba-upp3xrai.ap-south-1.elasticbeanstalk.com";
// static const String BASE_URL =
// "http://foodbuddy.ap-south-1.elasticbeanstalk.com";
static const String BASE_URL = "http://192.168.1.5:5000";
static const String BASE_URL =
"http://FoodBuddy-env.eba-smvaptbm.ap-south-1.elasticbeanstalk.com";
// static const String BASE_URL = "http://192.168.1.5:5000";

// shared preference keys
static const String TOKEN = "token";
Expand Down

0 comments on commit 30e3524

Please sign in to comment.