Skip to content

Commit

Permalink
Remove feedback menu and view
Browse files Browse the repository at this point in the history
  • Loading branch information
AshutoshPatole committed Nov 25, 2021
1 parent cd02308 commit 459a727
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 66 deletions.
1 change: 0 additions & 1 deletion lib/core/constants/drawer_enum.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
enum DrawerIndex {
home,
feedback,
share,
about,
invite,
Expand Down
27 changes: 12 additions & 15 deletions lib/core/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@

import 'package:flutter/material.dart';
import 'package:zerosandones/core/router_constants.dart';
import 'package:zerosandones/views/cart_page/cart_page_view.dart' as view6;

import 'package:zerosandones/views/login_page/login_page_view.dart' as view0;
import 'package:zerosandones/views/drawer_page/drawer_page_view.dart' as view1;
import 'package:zerosandones/views/edit_profile_page/edit_profile_page_view.dart'
as view8;
import 'package:zerosandones/views/feedback_page/feedback_page_view.dart'
as view4;
import 'package:zerosandones/views/navigation/navigation_view.dart' as view2;
import 'package:zerosandones/views/home_page/home_page_view.dart' as view3;
import 'package:zerosandones/views/item_detail_page/item_detail_page_view.dart'
as view5;
import 'package:zerosandones/views/login_page/login_page_view.dart' as view0;
import 'package:zerosandones/views/navigation/navigation_view.dart' as view2;
as view4;
import 'package:zerosandones/views/cart_page/cart_page_view.dart' as view5;
import 'package:zerosandones/views/phone_auth_page/phone_auth_page_view.dart'
as view6;
import 'package:zerosandones/views/edit_profile_page/edit_profile_page_view.dart'
as view7;

class Router {
Expand All @@ -27,19 +26,17 @@ class Router {
return MaterialPageRoute(builder: (_) => const view2.NavigationView());
case homePageViewRoute:
return MaterialPageRoute(builder: (_) => view3.HomePageView());
case feedbackPageViewRoute:
return MaterialPageRoute(
builder: (_) => const view4.FeedbackPageView());
case itemDetailPageViewRoute:
return MaterialPageRoute(builder: (_) => view5.ItemDetailPageView());
return MaterialPageRoute(
builder: (_) => const view4.ItemDetailPageView());
case cartPageViewRoute:
return MaterialPageRoute(builder: (_) => view6.CartPageView());
return MaterialPageRoute(builder: (_) => view5.CartPageView());
case phoneAuthPageViewRoute:
return MaterialPageRoute(
builder: (_) => const view7.PhoneAuthPageView());
builder: (_) => const view6.PhoneAuthPageView());
case editProfilePageViewRoute:
return MaterialPageRoute(
builder: (_) => const view8.EditProfilePageView());
builder: (_) => const view7.EditProfilePageView());
default:
return MaterialPageRoute(
builder: (_) => Scaffold(
Expand Down
5 changes: 0 additions & 5 deletions lib/core/router.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
"route_name": "home_pageViewRoute",
"view_name": "HomePageView"
},
{
"file_path": "views/feedback_page/feedback_page_view.dart",
"route_name": "feedback_pageViewRoute",
"view_name": "FeedbackPageView"
},
{
"file_path": "views/item_detail_page/item_detail_page_view.dart",
"route_name": "item_detail_pageViewRoute",
Expand Down
1 change: 0 additions & 1 deletion lib/core/router_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const String loginPageViewRoute = 'loginPageViewRoute';
const String drawerPageViewRoute = 'drawerPageViewRoute';
const String navigationViewRoute = 'navigationViewRoute';
const String homePageViewRoute = 'homePageViewRoute';
const String feedbackPageViewRoute = 'feedbackPageViewRoute';
const String itemDetailPageViewRoute = 'itemDetailPageViewRoute';
const String cartPageViewRoute = 'cartPageViewRoute';
const String phoneAuthPageViewRoute = 'phoneAuthPageViewRoute';
Expand Down
5 changes: 0 additions & 5 deletions lib/views/drawer_page/drawer_ui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ class _HomeDrawerState extends State<HomeDrawer> {
labelName: 'Home',
icon: const Icon(CupertinoIcons.home),
),
DrawerList(
index: DrawerIndex.feedback,
labelName: 'Advice',
icon: const Icon(CupertinoIcons.chat_bubble_text),
),
DrawerList(
index: DrawerIndex.invite,
labelName: 'Invite Friend',
Expand Down
22 changes: 0 additions & 22 deletions lib/views/feedback_page/feedback_page_view.dart

This file was deleted.

11 changes: 0 additions & 11 deletions lib/views/feedback_page/feedback_page_view_model.dart

This file was deleted.

5 changes: 2 additions & 3 deletions lib/views/item_detail_page/item_detail_page_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class ItemDetailPageView extends StatelessWidget {
itemBuilder: (context, index) {
final data = viewModel.ingredients[index];
return Container(
width: _size.width * 0.24,
width: _size.width * 0.20,
height: _size.height * 0.1,
margin: const EdgeInsets.symmetric(horizontal: 5),
decoration: BoxDecoration(
Expand Down Expand Up @@ -137,7 +137,7 @@ class ItemDetailPageView extends StatelessWidget {
),
child: Center(
child: Text(
data.percentage,
"${data.percentage}%",
style: const TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16.0,
Expand Down Expand Up @@ -209,7 +209,6 @@ class ItemDetailPageView extends StatelessWidget {
price: viewModel.foodPrice,
quantity: 1,
itemName: viewModel.foodName);
print(result);
if (result == true) {
// ! TODO : Fix E/flutter (14427): Typically, the Scaffold widget is introduced by the MaterialApp or WidgetsApp widget at the top of your application widget tree.
ScaffoldMessenger.of(context).showSnackBar(
Expand Down
3 changes: 0 additions & 3 deletions lib/views/navigation/navigation_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'package:logger/logger.dart';
import 'package:stacked/stacked.dart';
import '../../core/constants/drawer_enum.dart';
import '../../core/logger.dart';
import '../feedback_page/feedback_page_view.dart';
import '../home_page/home_page_view.dart';

class NavigationViewModel extends BaseViewModel {
Expand All @@ -20,8 +19,6 @@ class NavigationViewModel extends BaseViewModel {
drawerIndex = drawerIndexdata;
if (drawerIndex == DrawerIndex.home) {
screenView = HomePageView();
} else if (drawerIndex == DrawerIndex.feedback) {
screenView = const FeedbackPageView();
} else {
// error screen
}
Expand Down

0 comments on commit 459a727

Please sign in to comment.