-
Notifications
You must be signed in to change notification settings - Fork 3
/
page 2.dart
225 lines (205 loc) · 8.1 KB
/
page 2.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/flutter_flow_widgets.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'page2_model.dart';
export 'page2_model.dart';
class Page2Widget extends StatefulWidget {
const Page2Widget({Key? key}) : super(key: key);
@override
_Page2WidgetState createState() => _Page2WidgetState();
}
class _Page2WidgetState extends State<Page2Widget> {
late Page2Model _model;
final scaffoldKey = GlobalKey<ScaffoldState>();
@override
void initState() {
super.initState();
_model = createModel(context, () => Page2Model());
_model.textController1 ??= TextEditingController();
_model.textFieldFocusNode1 ??= FocusNode();
_model.textController2 ??= TextEditingController();
_model.textFieldFocusNode2 ??= FocusNode();
}
@override
void dispose() {
_model.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
if (isiOS) {
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(
statusBarBrightness: Theme.of(context).brightness,
systemStatusBarContrastEnforced: true,
),
);
}
return GestureDetector(
onTap: () => _model.unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(_model.unfocusNode)
: FocusScope.of(context).unfocus(),
child: Scaffold(
key: scaffoldKey,
backgroundColor: Colors.white,
body: SafeArea(
top: true,
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(16, 16, 16, 16),
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsetsDirectional.fromSTEB(0, 0, 16, 0),
child: TextFormField(
controller: _model.textController1,
focusNode: _model.textFieldFocusNode1,
obscureText: false,
decoration: InputDecoration(
labelText: 'Sell',
hintText: 'Enter item to sell...',
hintStyle:
FlutterFlowTheme.of(context).bodyLarge.override(
fontFamily: 'Manrope',
color: Color(0xFF101213),
fontSize: 16,
fontWeight: FontWeight.normal,
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0xFF9489F5),
width: 2,
),
borderRadius: BorderRadius.circular(10),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0x00000000),
width: 2,
),
borderRadius: BorderRadius.circular(10),
),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0x00000000),
width: 2,
),
borderRadius: BorderRadius.circular(10),
),
focusedErrorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0x00000000),
width: 2,
),
borderRadius: BorderRadius.circular(10),
),
),
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Manrope',
color: Color(0xFF101213),
fontSize: 14,
fontWeight: FontWeight.normal,
),
validator:
_model.textController1Validator.asValidator(context),
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(0, 0, 16, 0),
child: TextFormField(
controller: _model.textController2,
focusNode: _model.textFieldFocusNode2,
obscureText: false,
decoration: InputDecoration(
labelText: 'Buy',
hintText: 'Enter item to buy...',
hintStyle:
FlutterFlowTheme.of(context).bodyLarge.override(
fontFamily: 'Manrope',
color: Color(0xFF101213),
fontSize: 16,
fontWeight: FontWeight.normal,
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0xFF9489F5),
width: 2,
),
borderRadius: BorderRadius.circular(10),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0x00000000),
width: 2,
),
borderRadius: BorderRadius.circular(10),
),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0x00000000),
width: 2,
),
borderRadius: BorderRadius.circular(10),
),
focusedErrorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color(0x00000000),
width: 2,
),
borderRadius: BorderRadius.circular(10),
),
),
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Manrope',
color: Color(0xFF101213),
fontSize: 14,
fontWeight: FontWeight.normal,
),
validator:
_model.textController2Validator.asValidator(context),
),
),
],
),
),
),
),
);
}
}
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/flutter_flow_widgets.dart';
import 'page2_widget.dart' show Page2Widget;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
class Page2Model extends FlutterFlowModel<Page2Widget> {
/// State fields for stateful widgets in this page.
final unfocusNode = FocusNode();
// State field(s) for TextField widget.
FocusNode? textFieldFocusNode1;
TextEditingController? textController1;
String? Function(BuildContext, String?)? textController1Validator;
// State field(s) for TextField widget.
FocusNode? textFieldFocusNode2;
TextEditingController? textController2;
String? Function(BuildContext, String?)? textController2Validator;
/// Initialization and disposal methods.
void initState(BuildContext context) {}
void dispose() {
unfocusNode.dispose();
textFieldFocusNode1?.dispose();
textController1?.dispose();
textFieldFocusNode2?.dispose();
textController2?.dispose();
}
/// Action blocks are added here.
/// Additional helper methods are added here.
}