You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.6KB

  1. import 'package:farm_tpf/presentation/screens/actions/nursery/sc_nursery.dart';
  2. import 'package:farm_tpf/presentation/screens/actions/plant/sc_plant.dart';
  3. import 'package:farm_tpf/presentation/screens/plot/sc_plot.dart';
  4. import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_detail.dart';
  5. import 'package:farm_tpf/presentation/screens/resources/sc_resource_helper.dart';
  6. import 'package:farm_tpf/utils/const_common.dart';
  7. import 'package:flutter/material.dart';
  8. class HomePage extends StatelessWidget {
  9. static Route route() {
  10. return MaterialPageRoute<void>(builder: (_) => HomePage());
  11. }
  12. @override
  13. Widget build(BuildContext context) {
  14. return Scaffold(
  15. appBar: AppBar(title: const Text('Home')),
  16. body: Center(
  17. child: Column(
  18. mainAxisSize: MainAxisSize.min,
  19. children: <Widget>[
  20. Text("logged in."),
  21. MaterialButton(
  22. child: Text("Nursery action"),
  23. onPressed: () {
  24. Navigator.of(context).push(
  25. MaterialPageRoute(builder: (_) => ActionNurseryScreen()));
  26. }),
  27. MaterialButton(
  28. child: Text("Plant action"),
  29. onPressed: () {
  30. Navigator.of(context).push(
  31. MaterialPageRoute(builder: (_) => ActionPlantScreen()));
  32. }),
  33. MaterialButton(
  34. child: Text("Chi tiết lô"),
  35. onPressed: () {
  36. Navigator.of(context).push(
  37. MaterialPageRoute(builder: (_) => PlotDetailScreen()));
  38. }),
  39. MaterialButton(
  40. child: Text("Danh sách lô"),
  41. onPressed: () {
  42. Navigator.of(context).push(
  43. MaterialPageRoute(builder: (_) => PlotListScreen()));
  44. }),
  45. MaterialButton(
  46. child: Text("ResourceHelperScreen"),
  47. onPressed: () {
  48. Navigator.of(context)
  49. .push(MaterialPageRoute(
  50. builder: (_) => ResourceHelperScreen(
  51. titleName: "phân bón",
  52. type: ConstCommon.supplyTypeDung,
  53. selectedId: 3,
  54. ),
  55. fullscreenDialog: false))
  56. .then((value) {
  57. if (value != null) {
  58. print("Home: $value");
  59. }
  60. });
  61. }),
  62. ],
  63. ),
  64. ),
  65. );
  66. }
  67. }