|
- import 'package:farm_tpf/presentation/screens/actions/nursery/sc_nursery.dart';
- import 'package:farm_tpf/presentation/screens/actions/plant/sc_plant.dart';
- import 'package:farm_tpf/presentation/screens/plot/sc_plot.dart';
- import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_detail.dart';
- import 'package:farm_tpf/presentation/screens/resources/sc_resource_helper.dart';
- import 'package:flutter/material.dart';
-
- class HomePage extends StatelessWidget {
- static Route route() {
- return MaterialPageRoute<void>(builder: (_) => HomePage());
- }
-
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(title: const Text('Home')),
- body: Center(
- child: Column(
- mainAxisSize: MainAxisSize.min,
- children: <Widget>[
- Text("logged in."),
- MaterialButton(
- child: Text("Nursery action"),
- onPressed: () {
- Navigator.of(context).push(
- MaterialPageRoute(builder: (_) => ActionNurseryScreen()));
- }),
- MaterialButton(
- child: Text("Plant action"),
- onPressed: () {
- Navigator.of(context).push(
- MaterialPageRoute(builder: (_) => ActionPlantScreen()));
- }),
- MaterialButton(
- child: Text("Chi tiết lô"),
- onPressed: () {
- Navigator.of(context).push(
- MaterialPageRoute(builder: (_) => PlotDetailScreen()));
- }),
- MaterialButton(
- child: Text("Danh sách lô"),
- onPressed: () {
- Navigator.of(context).push(
- MaterialPageRoute(builder: (_) => PlotListScreen()));
- }),
- MaterialButton(
- child: Text("ResourceHelperScreen"),
- onPressed: () {
- Navigator.of(context)
- .push(MaterialPageRoute(
- builder: (_) => ResourceHelperScreen(
- resourceName: "test",
- selectedPlotId: 1531,
- ),
- fullscreenDialog: false))
- .then((value) {
- if (value != null) {
- print("Home: $value");
- }
- });
- }),
- ],
- ),
- ),
- );
- }
- }
|