Browse Source

商品更改

liuyuqi-dellpc 2 years ago
parent
commit
a971ca7a39

BIN
assets/images/feibing.jpg


BIN
assets/images/gaozicai.jpg


BIN
assets/images/guozi.jpg


BIN
assets/images/haixian.jpg


BIN
assets/images/mantou.jpg


BIN
assets/images/mifan.jpg


BIN
assets/images/niupai.jpg


BIN
assets/images/pijiu.jpg


BIN
assets/images/shengcai.jpg


BIN
assets/images/tixian.jpg


BIN
assets/images/tudou.jpg


BIN
assets/images/wawacai.jpg


BIN
assets/images/yazhang.jpg


BIN
assets/images/youtiao.jpg


BIN
assets/images/zhima.jpg


BIN
assets/images/zhunaohua.jpg


BIN
assets/images/zhushun.jpg


+ 143 - 33
lib/model/product.dart

@@ -5,6 +5,7 @@ class Product {
   final int price, size, id;
   final Color color;
   bool status;
+
   Product(
       {this.id,
       this.image,
@@ -16,7 +17,46 @@ class Product {
       this.status});
 }
 
-List<Product> products2 = [
+List<Product> productsguodi = [
+  Product(
+      id: 1,
+      title: "牛油菌汤锅",
+      price: 55,
+      size: 12,
+      description: dummyText,
+      image: "assets/images/bag_1_1.png",
+      color: Color(0xFF3D82AE),
+      status: true),
+  Product(
+      id: 2,
+      title: "番茄清汤锅",
+      price: 34,
+      size: 8,
+      description: dummyText,
+      image: "assets/images/bag_2_1.png",
+      color: Color(0xFFD3A984),
+      status: false),
+  Product(
+      id: 3,
+      title: "嫩羊肉卷",
+      price: 33,
+      size: 10,
+      description: dummyText,
+      image: "assets/images/bag_3_1.png",
+      color: Color(0xFF989493),
+      status: true),
+  Product(
+      id: 4,
+      title: "菌汤牛油鸳鸯锅",
+      price: 24,
+      size: 11,
+      description: dummyText,
+      image: "assets/images/bag_1_1.png",
+      color: Color(0xFFE6B398),
+      status: false),
+];
+
+List<Product> productshuncai = [
   Product(
       id: 1,
       title: "小炒肉",
@@ -37,98 +77,168 @@ List<Product> products2 = [
       status: false),
   Product(
       id: 3,
-      title: "番茄炒蛋",
+      title: "牛排",
       price: 16,
       size: 10,
       description: dummyText,
-      image: "assets/images/bag_1_1.png",
+      image: "assets/images/niupai.jpg",
       color: Color(0xFF989493),
       status: true),
   Product(
       id: 4,
-      title: "鲜骨浓汤锅",
+      title: "猪脑花",
       price: 34,
       size: 11,
       description: dummyText,
-      image: "assets/images/bag_2_1.png",
+      image: "assets/images/zhunaohua.jpg",
       color: Color(0xFFE6B398),
       status: false),
   Product(
       id: 5,
-      title: "Office Code",
+      title: "脱骨鸭掌",
       price: 24,
       size: 12,
       description: dummyText,
-      image: "assets/images/bag_2_1.png",
+      image: "assets/images/yazhang.jpg",
       color: Color(0xFFFB7883),
       status: true),
-  Product(
-      id: 6,
-      title: "Office Code",
-      price: 26,
-      size: 12,
-      description: dummyText,
-      image: "assets/images/bag_6.png",
-      color: Color(0xFFAEAEAE),
-      status: true),
 ];
 
-List<Product> products = [
+List<Product> productssucai = [
   Product(
       id: 1,
-      title: "牛油菌汤锅",
+      title: "娃娃菜",
       price: 55,
       size: 12,
       description: dummyText,
-      image: "assets/images/bag_1_1.png",
+      image: "assets/images/wawacai.jpg",
       color: Color(0xFF3D82AE),
       status: true),
   Product(
       id: 2,
-      title: "番茄清汤锅",
+      title: "蒿子菜",
       price: 34,
       size: 8,
       description: dummyText,
-      image: "assets/images/bag_2_1.png",
+      image: "assets/images/gaozicai.jpg",
       color: Color(0xFFD3A984),
       status: false),
   Product(
       id: 3,
-      title: "嫩羊肉卷",
+      title: "生菜",
       price: 33,
       size: 10,
       description: dummyText,
-      image: "assets/images/bag_3_1.png",
+      image: "assets/images/shengcai.jpg",
       color: Color(0xFF989493),
       status: true),
   Product(
       id: 4,
-      title: "菌汤牛油鸳鸯锅",
+      title: "土豆",
       price: 24,
       size: 11,
       description: dummyText,
-      image: "assets/images/bag_1_1.png",
+      image: "assets/images/tudou.jpg",
       color: Color(0xFFE6B398),
       status: false),
   Product(
       id: 5,
-      title: "Office Code",
+      title: "竹笋",
       price: 24,
       size: 12,
       description: dummyText,
-      image: "assets/images/bag_2_1.png",
+      image: "assets/images/zhushun.jpg",
       color: Color(0xFFFB7883),
       status: true),
+];
+
+List<Product> productsZhushi = [
   Product(
-      id: 6,
-      title: "Office Code",
+      id: 1,
+      title: "飞饼",
+      price: 55,
+      size: 12,
+      description: dummyText,
+      image: "assets/images/feibing.jpg",
+      color: Color(0xFF3D82AE),
+      status: true),
+  Product(
+      id: 2,
+      title: "五香米饭",
+      price: 34,
+      size: 8,
+      description: dummyText,
+      image: "assets/images/mifan.jpg",
+      color: Color(0xFFD3A984),
+      status: false),
+  Product(
+      id: 3,
+      title: "馒头",
+      price: 33,
+      size: 10,
+      description: dummyText,
+      image: "assets/images/mantou.jpg",
+      color: Color(0xFF989493),
+      status: true),
+  Product(
+      id: 4,
+      title: "油条",
       price: 24,
+      size: 11,
+      description: dummyText,
+      image: "assets/images/youtiao.jpg",
+      color: Color(0xFFE6B398),
+      status: false),
+];
+
+List<Product> productsJiushui = [
+  Product(
+      id: 1,
+      title: "啤酒",
+      price: 55,
       size: 12,
       description: dummyText,
-      image: "assets/images/bag_1_1.png",
-      color: Color(0xFFAEAEAE),
+      image: "assets/images/pijiu.jpg",
+      color: Color(0xFF3D82AE),
       status: true),
+  Product(
+      id: 2,
+      title: "果汁",
+      price: 34,
+      size: 8,
+      description: dummyText,
+      image: "assets/images/guozi.jpg",
+      color: Color(0xFFD3A984),
+      status: false),
 ];
 
-String dummyText =
-    "菜品很好吃,本店特色美食。";
+List<Product> productsTiaoliao = [
+  Product(
+      id: 1,
+      title: "提鲜调料",
+      price: 55,
+      size: 12,
+      description: dummyText,
+      image: "assets/images/tixian.jpg",
+      color: Color(0xFF3D82AE),
+      status: true),
+  Product(
+      id: 2,
+      title: "海鲜调料",
+      price: 34,
+      size: 8,
+      description: dummyText,
+      image: "assets/images/haixian.jpg",
+      color: Color(0xFFD3A984),
+      status: false),
+  Product(
+      id: 3,
+      title: "芝麻调料",
+      price: 33,
+      size: 10,
+      description: dummyText,
+      image: "assets/images/zhima.jpg",
+      color: Color(0xFF989493),
+      status: true),
+];
+String dummyText = "菜品很好吃,本店特色美食。";

+ 0 - 5
lib/pages/details/components/body.dart

@@ -1,11 +1,6 @@
 import 'package:flutter/material.dart';
 import 'package:fooddeliveryapp/constants.dart';
 import 'package:fooddeliveryapp/model/product.dart';
-// import 'package:fooddeliveryapp/model/tableDetail.dart';
-// import 'package:provider/provider.dart';
-
-// import 'add_to_cart.dart';
-// import 'color_and_size.dart';
 import 'counter_with_fav_btn.dart';
 import 'description.dart';
 import 'product_title_with_image.dart';

+ 0 - 2
lib/pages/details/components/cart_counter.dart

@@ -6,8 +6,6 @@ import 'package:provider/provider.dart';
 
 class CartCounter extends StatefulWidget {
   final Product product;
-  // final TableDetail myTableDetail;
-
   const CartCounter({
     Key key,
     @required this.product,

+ 0 - 2
lib/pages/details/components/counter_with_fav_btn.dart

@@ -1,8 +1,6 @@
 import 'package:flutter/material.dart';
 import 'package:flutter_svg/flutter_svg.dart';
 import 'package:fooddeliveryapp/model/product.dart';
-// import 'package:fooddeliveryapp/model/tableDetail.dart';
-
 import 'cart_counter.dart';
 
 class CounterWithFavBtn extends StatelessWidget {

+ 1 - 1
lib/pages/order/components/categories.dart

@@ -7,7 +7,7 @@ class Categories extends StatefulWidget {
 }
 
 class _CategoriesState extends State<Categories> {
-  List<String> categories = ["功夫锅底", "飘香卤味", "安心肉品", "招牌菜"];
+  List<String> categories = ["锅底", "荤菜", "素菜", "主食", "酒水", "调料"];
 
   int selectedIndex = 0;
 

+ 6 - 6
lib/pages/order/order_home_screen.dart

@@ -77,7 +77,7 @@ List<MyTab> getMyTabs() {
         ),
       ),
       Menu(
-        productsList: products,
+        productsList: productsguodi,
       ),
     ),
     MyTab(
@@ -88,7 +88,7 @@ List<MyTab> getMyTabs() {
         ),
       ),
       // Icon(Icons.directions_transit, color: Colors.pink, size: 60),
-      Menu(productsList: products),
+      Menu(productsList: productshuncai),
     ),
     MyTab(
       Tab(
@@ -98,7 +98,7 @@ List<MyTab> getMyTabs() {
         ),
       ),
       // Icon(Icons.directions_bike, color: Colors.pink, size: 60),
-      Menu(productsList: products2),
+      Menu(productsList: productssucai),
     ),
     MyTab(
       Tab(
@@ -108,7 +108,7 @@ List<MyTab> getMyTabs() {
         ),
       ),
       // Icon(Icons.directions_bike, color: Colors.pink, size: 60),
-      Menu(productsList: products2),
+      Menu(productsList: productsZhushi),
     ),
     MyTab(
       Tab(
@@ -118,7 +118,7 @@ List<MyTab> getMyTabs() {
         ),
       ),
       // Icon(Icons.directions_bike, color: Colors.pink, size: 60),
-      Menu(productsList: products2),
+      Menu(productsList: productsJiushui),
     ),
     MyTab(
       Tab(
@@ -128,7 +128,7 @@ List<MyTab> getMyTabs() {
         ),
       ),
       // Icon(Icons.directions_bike, color: Colors.pink, size: 60),
-      Menu(productsList: products2),
+      Menu(productsList: productsTiaoliao),
     )
   ];
 }

+ 0 - 37
pubspec.yaml

@@ -32,46 +32,9 @@ dependencies:
 dev_dependencies:
   flutter_test:
     sdk: flutter
-
-
-# For information on the generic Dart part of this file, see the
-# following page: https://dart.dev/tools/pub/pubspec
-
-# The following section is specific to Flutter.
 flutter:
-
-  # The following line ensures that the Material Icons font is
-  # included with your application, so that you can use the icons in
-  # the material Icons class.
   uses-material-design: true
 
-  # To add assets to your application, add an assets section, like this:
   assets:
     - assets/images/
     - assets/icons/
-
-  # An image asset can refer to one or more resolution-specific "variants", see
-  # https://flutter.dev/assets-and-images/#resolution-aware.
-
-  # For details regarding adding assets from package dependencies, see
-  # https://flutter.dev/assets-and-images/#from-packages
-
-  # To add custom fonts to your application, add a fonts section here,
-  # in this "flutter" section. Each entry in this list should have a
-  # "family" key with the font family name, and a "fonts" key with a
-  # list giving the asset and other descriptors for the font. For
-  # example:
-  # fonts:
-  #   - family: Schyler
-  #     fonts:
-  #       - asset: fonts/Schyler-Regular.ttf
-  #       - asset: fonts/Schyler-Italic.ttf
-  #         style: italic
-  #   - family: Trajan Pro
-  #     fonts:
-  #       - asset: fonts/TrajanPro.ttf
-  #       - asset: fonts/TrajanPro_Bold.ttf
-  #         weight: 700
-  #
-  # For details regarding fonts from package dependencies,
-  # see https://flutter.dev/custom-fonts/#from-packages