@@ -31,6 +31,7 @@ class FarmGroupEditWindow extends StatefulWidget {
31
31
32
32
class _FarmGroupEditWindowState extends State <FarmGroupEditWindow > {
33
33
late final FarmGroupEditController controller;
34
+ final _overlayController = OverlayPortalController ();
34
35
35
36
@override
36
37
void initState () {
@@ -67,59 +68,79 @@ class _FarmGroupEditWindowState extends State<FarmGroupEditWindow> {
67
68
Provider .value (value: this ),
68
69
ChangeNotifierProvider .value (value: controller),
69
70
],
70
- child: FittedBox (
71
- child: Container (
72
- decoration: BoxDecoration (
73
- color: Colors .white,
74
- borderRadius: BorderRadius .circular (18.0 ),
75
- ),
76
- padding: const EdgeInsets .all (18.0 ),
77
- child: Row (
78
- spacing: 34 ,
79
- crossAxisAlignment: CrossAxisAlignment .start,
80
- children: [
81
- const Row (
82
- spacing: 30 ,
83
- mainAxisAlignment: MainAxisAlignment .center,
84
- children: < Widget > [
85
- FertilizersInfoBox (),
86
- CropsInfoBox (),
87
- ],
88
- ),
89
- Column (
90
- spacing: 34 ,
91
- children: [
92
- const FarmGroupCanvas (),
93
- ValueListenableBuilder (
94
- valueListenable: controller.farmGroupModelNotifier,
95
- builder: (context, value, child) => const AnalysisView ()),
96
- ],
97
- ),
98
- Column (
99
- spacing: 30.0 ,
71
+ child: GestureDetector (
72
+ onTap: () => _overlayController.hide (),
73
+ child: FittedBox (
74
+ child: Container (
75
+ decoration: BoxDecoration (
76
+ color: Colors .white,
77
+ borderRadius: BorderRadius .circular (18.0 ),
78
+ ),
79
+ padding: const EdgeInsets .all (18.0 ),
80
+ child: IntrinsicHeight (
81
+ child: Row (
82
+ spacing: 20 ,
100
83
crossAxisAlignment: CrossAxisAlignment .start,
101
84
children: [
102
- const _TitleTextField (),
85
+ Row (
86
+ spacing: 30 ,
87
+ mainAxisAlignment: MainAxisAlignment .center,
88
+ children: < Widget > [
89
+ const FertilizersInfoBox (),
90
+ VerticalDivider (
91
+ width: 1.0 ,
92
+ color: Colors .grey.shade300,
93
+ ),
94
+ const CropsInfoBox (),
95
+ ],
96
+ ),
97
+ VerticalDivider (
98
+ width: 1.0 ,
99
+ color: Colors .grey.shade300,
100
+ ),
103
101
Column (
104
- crossAxisAlignment: CrossAxisAlignment .start,
105
- spacing: 8 ,
102
+ spacing: 34 ,
106
103
children: [
107
- _buildFarmTypeSelectionBox (),
108
- _buildFarmGroupTypeSelectionBox (),
104
+ const FarmGroupCanvas (),
105
+ ValueListenableBuilder (
106
+ valueListenable: controller.farmGroupModelNotifier,
107
+ builder: (context, value, child) => const AnalysisView ()),
109
108
],
110
109
),
111
- CropSelectionSection (notifier: controller.selectedCropNotifier),
112
- FertilizerSelectionSection (notifier: controller.selectedFertilizerNotifier),
113
- const Row (
114
- spacing: 20 ,
110
+ VerticalDivider (
111
+ width: 1.0 ,
112
+ color: Colors .grey.shade300,
113
+ ),
114
+ Column (
115
+ spacing: 30.0 ,
116
+ crossAxisAlignment: CrossAxisAlignment .start,
115
117
children: [
116
- _CancelButton (),
117
- _OkButton (),
118
+ const _TitleTextField (),
119
+ Column (
120
+ crossAxisAlignment: CrossAxisAlignment .start,
121
+ spacing: 8 ,
122
+ children: [
123
+ _buildFarmTypeSelectionBox (),
124
+ _buildFarmGroupTypeSelectionBox (),
125
+ ],
126
+ ),
127
+ CropSelectionSection (notifier: controller.selectedCropNotifier),
128
+ FertilizerSelectionSection (
129
+ notifier: controller.selectedFertilizerNotifier,
130
+ overlayController: _overlayController,
131
+ ),
132
+ const Row (
133
+ spacing: 20 ,
134
+ children: [
135
+ _CancelButton (),
136
+ _OkButton (),
137
+ ],
138
+ ),
118
139
],
119
140
),
120
141
],
121
142
),
122
- ] ,
143
+ ) ,
123
144
),
124
145
),
125
146
),
0 commit comments