@@ -148,67 +148,67 @@ class _HomePageState extends State<HomePage> {
148
148
_verticalSizeBox,
149
149
_inProgress
150
150
? new Container (
151
- alignment: Alignment .center,
152
- height: 50.0 ,
153
- child: Platform .isIOS
154
- ? new CupertinoActivityIndicator ()
155
- : new CircularProgressIndicator (),
156
- )
151
+ alignment: Alignment .center,
152
+ height: 50.0 ,
153
+ child: Platform .isIOS
154
+ ? new CupertinoActivityIndicator ()
155
+ : new CircularProgressIndicator (),
156
+ )
157
157
: new Column (
158
- mainAxisSize: MainAxisSize .min,
159
- children: < Widget > [
160
- _getPlatformButton (
161
- 'Charge Card' , () => _startAfreshCharge ()),
162
- _verticalSizeBox,
163
- _border,
164
- new SizedBox (
165
- height: 40.0 ,
166
- ),
167
- new Row (
168
- mainAxisAlignment: MainAxisAlignment .spaceBetween,
169
- crossAxisAlignment: CrossAxisAlignment .center,
170
- children: < Widget > [
171
- new Flexible (
172
- flex: 3 ,
173
- child: new DropdownButtonHideUnderline (
174
- child: new InputDecorator (
175
- decoration: const InputDecoration (
176
- border: OutlineInputBorder (),
177
- isDense: true ,
178
- hintText: 'Checkout method' ,
179
- ),
180
- isEmpty: _method == null ,
181
- child: new DropdownButton <CheckoutMethod >(
182
- value: _method,
183
- isDense: true ,
184
- onChanged: (CheckoutMethod value) {
185
- setState (() {
186
- _method = value;
187
- });
188
- },
189
- items: banks.map ((String value) {
190
- return new DropdownMenuItem <
191
- CheckoutMethod >(
192
- value: _parseStringToMethod (value),
193
- child: new Text (value),
194
- );
195
- }).toList (),
196
- ),
197
- ))),
198
- _horizontalSizeBox,
199
- new Flexible (
200
- flex: 2 ,
201
- child: new Container (
202
- width: double .infinity,
203
- child: _getPlatformButton (
204
- 'Checkout' ,
205
- () => _handleCheckout (),
206
- )),
207
- ),
208
- ],
209
- )
210
- ],
211
- )
158
+ mainAxisSize: MainAxisSize .min,
159
+ children: < Widget > [
160
+ _getPlatformButton (
161
+ 'Charge Card' , () => _startAfreshCharge ()),
162
+ _verticalSizeBox,
163
+ _border,
164
+ new SizedBox (
165
+ height: 40.0 ,
166
+ ),
167
+ new Row (
168
+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
169
+ crossAxisAlignment: CrossAxisAlignment .center,
170
+ children: < Widget > [
171
+ new Flexible (
172
+ flex: 3 ,
173
+ child: new DropdownButtonHideUnderline (
174
+ child: new InputDecorator (
175
+ decoration: const InputDecoration (
176
+ border: OutlineInputBorder (),
177
+ isDense: true ,
178
+ hintText: 'Checkout method' ,
179
+ ),
180
+ isEmpty: _method == null ,
181
+ child: new DropdownButton <CheckoutMethod >(
182
+ value: _method,
183
+ isDense: true ,
184
+ onChanged: (CheckoutMethod value) {
185
+ setState (() {
186
+ _method = value;
187
+ });
188
+ },
189
+ items: banks.map ((String value) {
190
+ return new DropdownMenuItem <
191
+ CheckoutMethod >(
192
+ value: _parseStringToMethod (value),
193
+ child: new Text (value),
194
+ );
195
+ }).toList (),
196
+ ),
197
+ ))),
198
+ _horizontalSizeBox,
199
+ new Flexible (
200
+ flex: 2 ,
201
+ child: new Container (
202
+ width: double .infinity,
203
+ child: _getPlatformButton (
204
+ 'Checkout' ,
205
+ () => _handleCheckout (),
206
+ )),
207
+ ),
208
+ ],
209
+ )
210
+ ],
211
+ )
212
212
],
213
213
),
214
214
),
@@ -242,11 +242,8 @@ class _HomePageState extends State<HomePage> {
242
242
}
243
243
}
244
244
245
- CheckoutResponse response = await PaystackPlugin .checkout (
246
- context,
247
- method: _method,
248
- charge: charge,
249
- );
245
+ CheckoutResponse response = await PaystackPlugin .checkout (context,
246
+ method: _method, charge: charge, fullscreen: false );
250
247
print ('Response = $response ' );
251
248
setState (() => _inProgress = false );
252
249
_updateStatus (response.reference, '$response ' );
@@ -399,7 +396,7 @@ class _HomePageState extends State<HomePage> {
399
396
_updateStatus (
400
397
reference,
401
398
'There was a problem getting a new access code form'
402
- ' the backend: $e ' );
399
+ ' the backend: $e ' );
403
400
}
404
401
return accessCode;
405
402
}
@@ -415,7 +412,7 @@ class _HomePageState extends State<HomePage> {
415
412
_updateStatus (
416
413
reference,
417
414
'There was a problem verifying %s on the backend: '
418
- '$reference $e ' );
415
+ '$reference $e ' );
419
416
}
420
417
setState (() => _inProgress = false );
421
418
}
0 commit comments