BASE: Update Icons & Name Of The App.
This commit is contained in:
@@ -5,7 +5,7 @@ import 'dart:developer';
|
||||
import 'package:customer/payment/xenditModel.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
|
||||
@@ -14,7 +14,12 @@ class XenditScreen extends StatefulWidget {
|
||||
final String transId;
|
||||
final String apiKey;
|
||||
|
||||
const XenditScreen({super.key, required this.initialURl, required this.transId, required this.apiKey});
|
||||
const XenditScreen({
|
||||
super.key,
|
||||
required this.initialURl,
|
||||
required this.transId,
|
||||
required this.apiKey,
|
||||
});
|
||||
|
||||
@override
|
||||
State<XenditScreen> createState() => _XenditScreenState();
|
||||
@@ -102,7 +107,16 @@ class _XenditScreenState extends State<XenditScreen> {
|
||||
child: const Icon(Icons.arrow_back, color: Colors.white),
|
||||
),
|
||||
),
|
||||
body: Stack(alignment: Alignment.center, children: [WebViewWidget(controller: controller), Visibility(visible: isLoading, child: const Center(child: CircularProgressIndicator()))]),
|
||||
body: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
WebViewWidget(controller: controller),
|
||||
Visibility(
|
||||
visible: isLoading,
|
||||
child: const Center(child: CircularProgressIndicator()),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -117,14 +131,20 @@ class _XenditScreenState extends State<XenditScreen> {
|
||||
content: SingleChildScrollView(child: Text("Cancel Payment?".tr())),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
child: Text('Cancel'.tr(), style: const TextStyle(color: Colors.red)),
|
||||
child: Text(
|
||||
'Cancel'.tr(),
|
||||
style: const TextStyle(color: Colors.red),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(false);
|
||||
Navigator.of(context).pop(false);
|
||||
},
|
||||
),
|
||||
TextButton(
|
||||
child: Text('Continue'.tr(), style: const TextStyle(color: Colors.green)),
|
||||
child: Text(
|
||||
'Continue'.tr(),
|
||||
style: const TextStyle(color: Colors.green),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(false);
|
||||
},
|
||||
@@ -140,7 +160,10 @@ class _XenditScreenState extends State<XenditScreen> {
|
||||
var url = Uri.parse('https://api.xendit.co/v2/invoices/$paymentId');
|
||||
|
||||
// Headers
|
||||
var headers = {'Content-Type': 'application/json', 'Authorization': generateBasicAuthHeader(widget.apiKey.toString())};
|
||||
var headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': generateBasicAuthHeader(widget.apiKey.toString()),
|
||||
};
|
||||
|
||||
// Making the POST request
|
||||
var response = await http.get(url, headers: headers);
|
||||
|
||||
Reference in New Issue
Block a user