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.

63 lines
2.2KB

  1. import 'package:farm_tpf/presentation/custom_widgets/widget_rounded_rect_indicator.dart';
  2. import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_action.dart';
  3. import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_information.dart';
  4. import 'package:farm_tpf/presentation/screens/plot_detail/sc_plot_parameter.dart';
  5. import 'package:farm_tpf/utils/const_color.dart';
  6. import 'package:flutter/material.dart';
  7. class PlotDetailScreen extends StatefulWidget {
  8. final int cropId;
  9. PlotDetailScreen({@required this.cropId});
  10. @override
  11. _PlotDetailScreenState createState() => _PlotDetailScreenState();
  12. }
  13. class _PlotDetailScreenState extends State<PlotDetailScreen> {
  14. @override
  15. Widget build(BuildContext context) {
  16. return Container(
  17. color: COLOR_CONST.ITEM_BG,
  18. child: SafeArea(
  19. top: false,
  20. bottom: true,
  21. child: Scaffold(
  22. appBar: AppBar(
  23. centerTitle: true,
  24. title: Text("Chi tiết lô"),
  25. ),
  26. body: DefaultTabController(
  27. length: 2,
  28. child: new Scaffold(
  29. backgroundColor: COLOR_CONST.ITEM_BG,
  30. body: TabBarView(
  31. children: [
  32. PlotParameterScreen(),
  33. PlotActionScreen(
  34. cropId: widget.cropId,
  35. )
  36. ],
  37. ),
  38. bottomNavigationBar: new TabBar(
  39. tabs: [
  40. Tab(
  41. text: "Chỉ số",
  42. ),
  43. Tab(
  44. text: "Canh tác",
  45. ),
  46. ],
  47. labelColor: COLOR_CONST.DEFAULT,
  48. unselectedLabelColor: COLOR_CONST.GRAY1_70,
  49. indicatorSize: TabBarIndicatorSize.label,
  50. indicator: RoundedRectIndicator(
  51. color: COLOR_CONST.DEFAULT,
  52. radius: 2,
  53. padding: 22,
  54. weight: 3.0),
  55. ),
  56. ),
  57. ),
  58. )));
  59. }
  60. }