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.

51 lines
1.8KB

  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:flutter/material.dart';
  6. class HomePage extends StatelessWidget {
  7. static Route route() {
  8. return MaterialPageRoute<void>(builder: (_) => HomePage());
  9. }
  10. @override
  11. Widget build(BuildContext context) {
  12. return Scaffold(
  13. appBar: AppBar(title: const Text('Home')),
  14. body: Center(
  15. child: Column(
  16. mainAxisSize: MainAxisSize.min,
  17. children: <Widget>[
  18. Text("logged in."),
  19. MaterialButton(
  20. child: Text("Nursery action"),
  21. onPressed: () {
  22. Navigator.of(context).push(
  23. MaterialPageRoute(builder: (_) => ActionNurseryScreen()));
  24. }),
  25. MaterialButton(
  26. child: Text("Plant action"),
  27. onPressed: () {
  28. Navigator.of(context).push(
  29. MaterialPageRoute(builder: (_) => ActionPlantScreen()));
  30. }),
  31. MaterialButton(
  32. child: Text("Chi tiết lô"),
  33. onPressed: () {
  34. Navigator.of(context).push(
  35. MaterialPageRoute(builder: (_) => PlotDetailScreen()));
  36. }),
  37. MaterialButton(
  38. child: Text("Danh sách lô"),
  39. onPressed: () {
  40. Navigator.of(context).push(
  41. MaterialPageRoute(builder: (_) => PlotListScreen()));
  42. }),
  43. ],
  44. ),
  45. ),
  46. );
  47. }
  48. }