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.

88 lines
2.7KB

  1. import 'package:farm_tpf/presentation/custom_widgets/app_bar_widget.dart';
  2. import 'package:farm_tpf/presentation/screens/plot_detail/widget_tab.dart';
  3. import 'package:farm_tpf/utils/const_assets.dart';
  4. import 'package:farm_tpf/utils/const_color.dart';
  5. import 'package:flutter/material.dart';
  6. class PlotDetailScreen extends StatefulWidget {
  7. int cropId;
  8. String cropCode;
  9. int cropType;
  10. int initialIndex;
  11. PlotDetailScreen(
  12. {this.cropId,
  13. this.initialIndex = 0,
  14. this.cropCode,
  15. @required this.cropType});
  16. @override
  17. _PlotDetailScreenState createState() => _PlotDetailScreenState();
  18. }
  19. class _PlotDetailScreenState extends State<PlotDetailScreen> {
  20. @override
  21. Widget build(BuildContext context) {
  22. return Scaffold(
  23. appBar: AppBarWidget(),
  24. body: Column(
  25. children: [
  26. Container(
  27. padding: EdgeInsets.all(8),
  28. width: double.infinity,
  29. color: Colors.white,
  30. child: Row(
  31. children: [
  32. SizedBox(
  33. width: 12,
  34. ),
  35. Expanded(
  36. child: Container(
  37. height: 75,
  38. child: Column(
  39. crossAxisAlignment: CrossAxisAlignment.start,
  40. mainAxisSize: MainAxisSize.min,
  41. children: [
  42. Text('Rau muống trắng 6 sạch, 3 an toàn',
  43. style: TextStyle(
  44. fontWeight: FontWeight.bold, fontSize: 18)),
  45. Expanded(
  46. child: SizedBox(),
  47. ),
  48. Row(
  49. children: [
  50. SizedBox(
  51. width: 4,
  52. ),
  53. Text('item.startDate',
  54. style: TextStyle(color: Colors.grey)),
  55. SizedBox(
  56. width: 16,
  57. ),
  58. Text('item.startDate',
  59. style: TextStyle(color: Colors.grey))
  60. ],
  61. )
  62. ],
  63. ),
  64. ),
  65. ),
  66. Image.asset(
  67. AppAssets.tempImage,
  68. width: 75,
  69. height: 75,
  70. )
  71. ],
  72. ),
  73. ),
  74. Expanded(
  75. child: HomeTabbarWidget(
  76. cropType: widget.cropType,
  77. cropId: widget.cropId,
  78. cropCode: widget.cropCode,
  79. initialIndex: widget.initialIndex,
  80. ))
  81. ],
  82. ),
  83. );
  84. }
  85. }