bean.dart 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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=Map();
  7. // Campus(this.name){id=++_id_count;}
  8. // Canteen addCanteen(String name){
  9. // canteens[name]=Canteen(name);
  10. // return canteens[name]!;
  11. // }
  12. // }
  13. // class Canteen{
  14. // String name;
  15. // Dishes daily=Dishes(); //当日菜品(固定)
  16. // Dishes special=Dishes();//特色菜品
  17. // Dishes nowaday=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,
  30. {bool like = false, bool star = false, DateTime? star_time}) {
  31. this.like = like;
  32. this.star = star;
  33. //if(star_time!=null)this.star_time=star_time;
  34. }
  35. }