Browse Source

update screens action

master
daivph 5 years ago
parent
commit
e4ee91173b
12 changed files with 82 additions and 17 deletions
  1. +6
    -1
      lib/presentation/screens/actions/disease/sc_edit_action_disease.dart
  2. +6
    -1
      lib/presentation/screens/actions/dung/sc_edit_action_dung.dart
  3. +6
    -1
      lib/presentation/screens/actions/end/sc_edit_action_end.dart
  4. +6
    -1
      lib/presentation/screens/actions/environment_update/sc_edit_action_environment_update.dart
  5. +6
    -1
      lib/presentation/screens/actions/harvest/sc_edit_action_harvest.dart
  6. +6
    -1
      lib/presentation/screens/actions/harvest_process/sc_edit_action_harvest_process.dart
  7. +6
    -1
      lib/presentation/screens/actions/packing/sc_edit_action_packing.dart
  8. +6
    -1
      lib/presentation/screens/actions/sell/sc_edit_action_sell.dart
  9. +6
    -1
      lib/presentation/screens/actions/spraying/sc_edit_action_spraying.dart
  10. +6
    -1
      lib/presentation/screens/actions/use_water/sc_edit_action_user_water.dart
  11. +19
    -7
      lib/presentation/screens/plot_detail/sc_plot_action.dart
  12. +3
    -0
      lib/utils/const_string.dart

+ 6
- 1
lib/presentation/screens/actions/disease/sc_edit_action_disease.dart View File

import 'package:farm_tpf/utils/const_string.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';


class EditActionDiseaseScreen extends StatefulWidget { class EditActionDiseaseScreen extends StatefulWidget {
class _EditActionDiseaseScreenState extends State<EditActionDiseaseScreen> { class _EditActionDiseaseScreenState extends State<EditActionDiseaseScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container();
return Scaffold(
appBar: AppBar(
title: Text(plot_action_disease),
),
);
} }
} }

+ 6
- 1
lib/presentation/screens/actions/dung/sc_edit_action_dung.dart View File

import 'package:farm_tpf/utils/const_string.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';


class EditActionDungScreen extends StatefulWidget { class EditActionDungScreen extends StatefulWidget {
class _EditActionDungScreenState extends State<EditActionDungScreen> { class _EditActionDungScreenState extends State<EditActionDungScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container();
return Scaffold(
appBar: AppBar(
title: Text(plot_action_dung),
),
);
} }
} }

+ 6
- 1
lib/presentation/screens/actions/end/sc_edit_action_end.dart View File

import 'package:farm_tpf/utils/const_string.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';


class EditActionEndScreen extends StatefulWidget { class EditActionEndScreen extends StatefulWidget {
class _EditActionEndScreenState extends State<EditActionEndScreen> { class _EditActionEndScreenState extends State<EditActionEndScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container();
return Scaffold(
appBar: AppBar(
title: Text(plot_action_finish),
),
);
} }
} }

+ 6
- 1
lib/presentation/screens/actions/environment_update/sc_edit_action_environment_update.dart View File

import 'package:farm_tpf/utils/const_string.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';


class EditActionEnvironmentUpdate extends StatefulWidget { class EditActionEnvironmentUpdate extends StatefulWidget {
extends State<EditActionEnvironmentUpdate> { extends State<EditActionEnvironmentUpdate> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container();
return Scaffold(
appBar: AppBar(
title: Text(plot_action_environment_update),
),
);
} }
} }

+ 6
- 1
lib/presentation/screens/actions/harvest/sc_edit_action_harvest.dart View File

import 'package:farm_tpf/utils/const_string.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';


class EditActionHarvestScreen extends StatefulWidget { class EditActionHarvestScreen extends StatefulWidget {
class _EditActionHarvestScreenState extends State<EditActionHarvestScreen> { class _EditActionHarvestScreenState extends State<EditActionHarvestScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container();
return Scaffold(
appBar: AppBar(
title: Text(plot_action_harvest),
),
);
} }
} }

+ 6
- 1
lib/presentation/screens/actions/harvest_process/sc_edit_action_harvest_process.dart View File

import 'package:farm_tpf/utils/const_string.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';


class EditActionHarvestProcessScreen extends StatefulWidget { class EditActionHarvestProcessScreen extends StatefulWidget {
extends State<EditActionHarvestProcessScreen> { extends State<EditActionHarvestProcessScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container();
return Scaffold(
appBar: AppBar(
title: Text(plot_action_harvest_process),
),
);
} }
} }

+ 6
- 1
lib/presentation/screens/actions/packing/sc_edit_action_packing.dart View File

import 'package:farm_tpf/utils/const_string.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';


class EditActionPackingScreen extends StatefulWidget { class EditActionPackingScreen extends StatefulWidget {
class _EditActionPackingScreenState extends State<EditActionPackingScreen> { class _EditActionPackingScreenState extends State<EditActionPackingScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container();
return Scaffold(
appBar: AppBar(
title: Text(plot_action_packing),
),
);
} }
} }

+ 6
- 1
lib/presentation/screens/actions/sell/sc_edit_action_sell.dart View File

import 'package:farm_tpf/utils/const_string.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';


class EditActionSellScreen extends StatefulWidget { class EditActionSellScreen extends StatefulWidget {
class _EditActionSellScreenState extends State<EditActionSellScreen> { class _EditActionSellScreenState extends State<EditActionSellScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container();
return Scaffold(
appBar: AppBar(
title: Text(plot_action_sell),
),
);
} }
} }

+ 6
- 1
lib/presentation/screens/actions/spraying/sc_edit_action_spraying.dart View File

import 'package:farm_tpf/utils/const_string.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';


class EditActionSprayingScreen extends StatefulWidget { class EditActionSprayingScreen extends StatefulWidget {
class _EditActionSprayingScreenState extends State<EditActionSprayingScreen> { class _EditActionSprayingScreenState extends State<EditActionSprayingScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container();
return Scaffold(
appBar: AppBar(
title: Text(plot_action_spraying),
),
);
} }
} }

+ 6
- 1
lib/presentation/screens/actions/use_water/sc_edit_action_user_water.dart View File

import 'package:farm_tpf/utils/const_string.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';


class EditActionUseWaterScreen extends StatefulWidget { class EditActionUseWaterScreen extends StatefulWidget {
class _EditActionUseWaterScreenState extends State<EditActionUseWaterScreen> { class _EditActionUseWaterScreenState extends State<EditActionUseWaterScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container();
return Scaffold(
appBar: AppBar(
title: Text(plot_action_use_water),
),
);
} }
} }

+ 19
- 7
lib/presentation/screens/plot_detail/sc_plot_action.dart View File

import 'package:farm_tpf/presentation/custom_widgets/bottom_loader.dart'; import 'package:farm_tpf/presentation/custom_widgets/bottom_loader.dart';
import 'package:farm_tpf/presentation/custom_widgets/loading_list_page.dart'; import 'package:farm_tpf/presentation/custom_widgets/loading_list_page.dart';
import 'package:farm_tpf/presentation/screens/actions/crop_status/sc_edit_action_crop_status.dart'; import 'package:farm_tpf/presentation/screens/actions/crop_status/sc_edit_action_crop_status.dart';
import 'package:farm_tpf/presentation/screens/actions/disease/sc_edit_action_disease.dart';
import 'package:farm_tpf/presentation/screens/actions/dung/sc_edit_action_dung.dart';
import 'package:farm_tpf/presentation/screens/actions/end/sc_edit_action_end.dart';
import 'package:farm_tpf/presentation/screens/actions/environment_update/sc_edit_action_environment_update.dart';
import 'package:farm_tpf/presentation/screens/actions/harvest/sc_edit_action_harvest.dart';
import 'package:farm_tpf/presentation/screens/actions/nursery/sc_edit_action_nursery.dart'; import 'package:farm_tpf/presentation/screens/actions/nursery/sc_edit_action_nursery.dart';
import 'package:farm_tpf/presentation/screens/actions/other/sc_edit_action_other.dart'; import 'package:farm_tpf/presentation/screens/actions/other/sc_edit_action_other.dart';
import 'package:farm_tpf/presentation/screens/actions/plant/sc_edit_action_plant.dart'; import 'package:farm_tpf/presentation/screens/actions/plant/sc_edit_action_plant.dart';
import 'package:farm_tpf/presentation/screens/actions/spraying/sc_edit_action_spraying.dart';
import 'package:farm_tpf/presentation/screens/actions/use_water/sc_edit_action_user_water.dart';
import 'package:farm_tpf/presentation/screens/plot/sc_plot.dart'; import 'package:farm_tpf/presentation/screens/plot/sc_plot.dart';
import 'package:farm_tpf/presentation/screens/plot_detail/bloc/plot_detail_bloc.dart'; import 'package:farm_tpf/presentation/screens/plot_detail/bloc/plot_detail_bloc.dart';
import 'package:farm_tpf/utils/const_color.dart'; import 'package:farm_tpf/utils/const_color.dart';
actions.add(ActionType(plot_action_plant, null, EditActionPlantScreen())); actions.add(ActionType(plot_action_plant, null, EditActionPlantScreen()));
actions.add(ActionType( actions.add(ActionType(
plot_action_crop_status, null, EditActionCropStatusScreen())); plot_action_crop_status, null, EditActionCropStatusScreen()));
actions.add(ActionType(plot_action_environment_update, null, null));
actions.add(ActionType(plot_action_dung, null, null));
actions.add(ActionType(plot_action_spraying, null, null));
actions.add(ActionType(plot_action_disease, null, null));
actions.add(ActionType(plot_action_use_water, null, null));
actions.add(ActionType(
plot_action_environment_update, null, EditActionEnvironmentUpdate()));
actions.add(ActionType(plot_action_dung, null, EditActionDungScreen()));
actions.add(
ActionType(plot_action_spraying, null, EditActionSprayingScreen()));
actions
.add(ActionType(plot_action_disease, null, EditActionDiseaseScreen()));
actions.add(
ActionType(plot_action_use_water, null, EditActionUseWaterScreen()));
actions.add(ActionType(plot_action_other, null, EditActionOtherScreen())); actions.add(ActionType(plot_action_other, null, EditActionOtherScreen()));
actions.add(ActionType(plot_action_harvest, null, null));
actions.add(ActionType(plot_action_finish, null, null));
actions
.add(ActionType(plot_action_harvest, null, EditActionHarvestScreen()));
actions.add(ActionType(plot_action_finish, null, EditActionEndScreen()));
} }


Widget _createActionButtons(ActionType actionType) { Widget _createActionButtons(ActionType actionType) {

+ 3
- 0
lib/utils/const_string.dart View File

const String plot_action_other = "Hoạt động khác"; const String plot_action_other = "Hoạt động khác";
const String plot_action_harvest = "Thu hoạch"; const String plot_action_harvest = "Thu hoạch";
const String plot_action_finish = "Kết thúc canh tác"; const String plot_action_finish = "Kết thúc canh tác";
const String plot_action_harvest_process = "Xử lý sau thu hoạch";
const String plot_action_packing = "Đóng gói";
const String plot_action_sell = "Xuất bán";


const String plot_detail_title = "Lịch sử canh tác"; const String plot_detail_title = "Lịch sử canh tác";
const String plot_status_active = "Đang canh tác"; const String plot_status_active = "Đang canh tác";

Loading…
Cancel
Save