{"id":48581309,"url":"https://github.com/lambiengcode/flutter-pizza-store","last_synced_at":"2026-04-08T17:01:16.175Z","repository":{"id":52946417,"uuid":"355893159","full_name":"lambiengcode/flutter-pizza-store","owner":"lambiengcode","description":"Pizza ordering app built with Flutter, demonstrating the Factory design pattern","archived":false,"fork":false,"pushed_at":"2021-04-20T12:17:18.000Z","size":4074,"stargazers_count":31,"open_issues_count":0,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-02T20:38:16.702Z","etag":null,"topics":["ecommerce","firebase","flutter","food-delivery","restaurant"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambiengcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-08T12:12:11.000Z","updated_at":"2026-03-28T19:09:51.000Z","dependencies_parsed_at":"2022-08-28T03:13:41.664Z","dependency_job_id":null,"html_url":"https://github.com/lambiengcode/flutter-pizza-store","commit_stats":null,"previous_names":["lambiengcode/flutter-pizza-store"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lambiengcode/flutter-pizza-store","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambiengcode%2Fflutter-pizza-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambiengcode%2Fflutter-pizza-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambiengcode%2Fflutter-pizza-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambiengcode%2Fflutter-pizza-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambiengcode","download_url":"https://codeload.github.com/lambiengcode/flutter-pizza-store/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambiengcode%2Fflutter-pizza-store/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31564915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecommerce","firebase","flutter","food-delivery","restaurant"],"created_at":"2026-04-08T17:01:15.313Z","updated_at":"2026-04-08T17:01:16.171Z","avatar_url":"https://github.com/lambiengcode.png","language":"Dart","readme":"## Flutter Pizza Hut 🍕\n\n### Description:\n- 🚀 This is mobile application using Flutter for develop a pizza store\n- 🚀 Factory Method\n\n- Create Enum ***product_type.dart*** \u0026 ***location_type.dart***\n```dart\nenum ProductType {\n  burger,\n  pizza,\n  chicken,\n  chips,\n}\n\nenum LocationType {\n  hanoi,\n  danang,\n  hochiminh,\n}\n```\n\n- Create Abstract Class - ***food.dart***\n```dart\nimport 'package:flutter_pizza_store/src/events/location_event.dart';\nimport 'package:flutter_pizza_store/src/models/product.dart';\n\nabstract class Food {\n  void initial() {}\n\n  void filterByLocation(LocationType location) {}\n\n  List\u003cProduct\u003e products() {\n    return [];\n  }\n}\n```\n\n- Create Concrete Class - ***burger.dart***, similar with ***pizza.dart, chicken.dart, chips.dart***\n```dart\nimport 'package:flutter_pizza_store/src/events/location_event.dart';\nimport 'package:flutter_pizza_store/src/events/product_event.dart';\nimport 'package:flutter_pizza_store/src/models/food.dart';\nimport 'package:flutter_pizza_store/src/models/product.dart';\nimport 'package:flutter_pizza_store/src/repository/product_repository.dart';\n\nclass Burger implements Food {\n  List\u003cProduct\u003e _products = [];\n\n  @override\n  void initial() {\n    allProducts.forEach((product) {\n      if (product.type == ProductType.burger) _products.add(product);\n    });\n  }\n\n  @override\n  void filterByLocation(LocationType location) {\n    _products\n        .where((e) {\n          return e.location != location;\n        })\n        .toList()\n        .forEach((_products.remove));\n  }\n\n  @override\n  List\u003cProduct\u003e products() {\n    return _products;\n  }\n}\n```\n\n- Create Factory Class - ***food_factory.dart*** \n```dart\nimport 'package:flutter_pizza_store/src/events/product_event.dart';\nimport 'package:flutter_pizza_store/src/models/burger.dart';\nimport 'package:flutter_pizza_store/src/models/chicken.dart';\nimport 'package:flutter_pizza_store/src/models/chips.dart';\nimport 'package:flutter_pizza_store/src/models/food.dart';\nimport 'package:flutter_pizza_store/src/models/pizza.dart';\n\nclass FoodFactory {\n  static Food getFood(ProductType type) {\n    switch (type) {\n      case ProductType.burger:\n        return Burger();\n      case ProductType.pizza:\n        return Pizza();\n      case ProductType.chicken:\n        return Chicken();\n      case ProductType.chips:\n        return Chips();\n      default:\n        return Burger();\n    }\n  }\n}\n```\n\n### How I can run it? \n- 🚀 Clone this repo\n- 🚀 Run below code in terminal of project\n```terminal\nflutter pub get\nflutter run\n```\n\n### Screenshots\n\n\u003cp\u003e \n\u003cimg src=\"https://github.com/hongvinhmobile/flutter_pizza_store/blob/master/screenshots/home.png?raw=true\" width=\"200px\"/\u003e\n\u003c/p\u003e\n\n#### Author: lambiengcode\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambiengcode%2Fflutter-pizza-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambiengcode%2Fflutter-pizza-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambiengcode%2Fflutter-pizza-store/lists"}