bean.dart 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import 'package:flutter/cupertino.dart';
  2. // class Campus{
  3. // String name;
  4. // late int id;
  5. // static int _id_count=0;
  6. // Map<String,Canteen>canteens=new Map();
  7. // Campus(this.name){id=++_id_count;}
  8. // Canteen addCanteen(String name){
  9. // canteens[name]=new Canteen(name);
  10. // return canteens[name]!;
  11. // }
  12. // }
  13. // class Canteen{
  14. // String name;
  15. // Dishes daily=new Dishes(); //当日菜品(固定)
  16. // Dishes special=new Dishes();//特色菜品
  17. // Dishes nowaday=new Dishes();//当日新菜
  18. // Canteen(this.name);
  19. // }
  20. class Dish{
  21. String name;
  22. String cost; //价格
  23. String time; //供应时间
  24. //String category; //菜品分类:当日菜品(固定),特色菜品,当日新菜
  25. //String campus; //校区
  26. String canteen; //食堂
  27. bool star=false,like=false;
  28. //DateTime? star_time=null;
  29. Dish(this.name,this.cost,this.time,this.canteen,{bool like=false,bool star=false,DateTime? star_time}){
  30. this.like=like;
  31. this.star=star;
  32. //if(star_time!=null)this.star_time=star_time;
  33. }
  34. }