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.

68 lines
2.5KB

  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:flutter/material.dart';
  7. class HomePage extends StatelessWidget {
  8. static Route route() {
  9. return MaterialPageRoute<void>(builder: (_) => HomePage());
  10. }
  11. @override
  12. Widget build(BuildContext context) {
  13. return Scaffold(
  14. appBar: AppBar(title: const Text('Home')),
  15. body: Center(
  16. child: Column(
  17. mainAxisSize: MainAxisSize.min,
  18. children: <Widget>[
  19. Text("logged in."),
  20. MaterialButton(
  21. child: Text("Nursery action"),
  22. onPressed: () {
  23. Navigator.of(context).push(
  24. MaterialPageRoute(builder: (_) => ActionNurseryScreen()));
  25. }),
  26. MaterialButton(
  27. child: Text("Plant action"),
  28. onPressed: () {
  29. Navigator.of(context).push(
  30. MaterialPageRoute(builder: (_) => ActionPlantScreen()));
  31. }),
  32. MaterialButton(
  33. child: Text("Chi tiết lô"),
  34. onPressed: () {
  35. Navigator.of(context).push(
  36. MaterialPageRoute(builder: (_) => PlotDetailScreen()));
  37. }),
  38. MaterialButton(
  39. child: Text("Danh sách lô"),
  40. onPressed: () {
  41. Navigator.of(context).push(
  42. MaterialPageRoute(builder: (_) => PlotListScreen()));
  43. }),
  44. MaterialButton(
  45. child: Text("ResourceHelperScreen"),
  46. onPressed: () {
  47. Navigator.of(context)
  48. .push(MaterialPageRoute(
  49. builder: (_) => ResourceHelperScreen(
  50. resourceName: "test",
  51. selectedPlotId: 1531,
  52. ),
  53. fullscreenDialog: false))
  54. .then((value) {
  55. if (value != null) {
  56. print("Home: $value");
  57. }
  58. });
  59. }),
  60. ],
  61. ),
  62. ),
  63. );
  64. }
  65. }