diff --git a/android/app/src/main/ic_launcher-playstore.png b/android/app/src/main/ic_launcher-playstore.png
deleted file mode 100644
index 3a93ad2..0000000
Binary files a/android/app/src/main/ic_launcher-playstore.png and /dev/null differ
diff --git a/android/app/src/main/res/ic_launcher-web.png b/android/app/src/main/res/ic_launcher-web.png
deleted file mode 100644
index 3a93ad2..0000000
Binary files a/android/app/src/main/res/ic_launcher-web.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index 79d695e..345888d 100644
--- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,4 +1,6 @@
+
-
+
+
\ No newline at end of file
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index 79d695e..0000000
--- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
index 4c2dab1..5a227c9 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png
new file mode 100644
index 0000000..c109174
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
index ea68ff0..c0472c4 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png
new file mode 100644
index 0000000..c0472c4
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 703ad00..0000000
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-ldpi/ic_launcher.png b/android/app/src/main/res/mipmap-ldpi/ic_launcher.png
deleted file mode 100644
index cfbb884..0000000
Binary files a/android/app/src/main/res/mipmap-ldpi/ic_launcher.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png
deleted file mode 100644
index 8eac30d..0000000
Binary files a/android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
index d2ae127..aac2ae3 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png
new file mode 100644
index 0000000..a81514a
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
index 4e7b028..f145a1f 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png
new file mode 100644
index 0000000..f145a1f
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index d1cf65c..0000000
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index b326f4a..668070f 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png
new file mode 100644
index 0000000..11525d0
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
index a90240b..51979ce 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png
new file mode 100644
index 0000000..51979ce
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index a193149..0000000
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index cbe8e71..e9bb9be 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png
new file mode 100644
index 0000000..72ffb32
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
index 87a3319..1aaa0b7 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png
new file mode 100644
index 0000000..1aaa0b7
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index 0eead5c..0000000
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index a806105..2382269 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png
new file mode 100644
index 0000000..a4fe917
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
index 7bb9a5a..4f0ca06 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png
new file mode 100644
index 0000000..4f0ca06
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index 9362c78..0000000
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/android/app/src/main/res/play_store_512.png b/android/app/src/main/res/play_store_512.png
new file mode 100644
index 0000000..36286f0
Binary files /dev/null and b/android/app/src/main/res/play_store_512.png differ
diff --git a/android/app/src/main/res/playstore-icon.png b/android/app/src/main/res/playstore-icon.png
deleted file mode 100644
index 3a93ad2..0000000
Binary files a/android/app/src/main/res/playstore-icon.png and /dev/null differ
diff --git a/android/app/src/main/res/values/ic_launcher_background.xml b/android/app/src/main/res/values/ic_launcher_background.xml
deleted file mode 100644
index 7e7cb1f..0000000
--- a/android/app/src/main/res/values/ic_launcher_background.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- #ffffff
-
\ No newline at end of file
diff --git a/lib/screens/pay/pay_controller.dart b/lib/screens/pay/pay_controller.dart
index 39fa8de..116c336 100644
--- a/lib/screens/pay/pay_controller.dart
+++ b/lib/screens/pay/pay_controller.dart
@@ -20,6 +20,7 @@ class PayScreenModel {
PaymentProcessor? selectedPaymentProcessor;
String region = '';
bool isLoading = false;
+ bool isLoadingProducts = false;
String? errorMessage;
String? status;
}
@@ -146,7 +147,7 @@ class PayController extends ChangeNotifier {
Future>> getProducts(String providerId) async {
try {
- model.isLoading = true;
+ model.isLoadingProducts = true;
notifyListeners();
List response = await http.get(
@@ -154,12 +155,12 @@ class PayController extends ChangeNotifier {
);
model.products = response.map((e) => BillProduct.fromJson(e)).toList();
- model.isLoading = false;
+ model.isLoadingProducts = false;
notifyListeners();
return ApiResponse.success(model.products);
} catch (e) {
logger.e(e);
- model.isLoading = false;
+ model.isLoadingProducts = false;
notifyListeners();
return ApiResponse.failure(
"Problem fetching products, are you connected to the internet?",
diff --git a/lib/screens/pay/pay_screen.dart b/lib/screens/pay/pay_screen.dart
index ce2322c..7963d96 100644
--- a/lib/screens/pay/pay_screen.dart
+++ b/lib/screens/pay/pay_screen.dart
@@ -298,9 +298,7 @@ class _PayScreenState extends State with TickerProviderStateMixin {
if (showAdditionalRecipientDetails)
_buildAdditionalRecipientDetails(),
const SizedBox(height: 7),
- if (controller.model.products.isNotEmpty ||
- controller.model.isLoading)
- _buildBillProductSelector(controller),
+ _buildBillProductSelector(controller),
const SizedBox(height: 7),
_buildPhoneField(),
const SizedBox(height: 7),
@@ -364,8 +362,9 @@ class _PayScreenState extends State with TickerProviderStateMixin {
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ crossAxisAlignment: CrossAxisAlignment.center,
children: [
- Row(
+ Column(
children: [
const Text(
'Debit Phone Number',
@@ -607,6 +606,31 @@ class _PayScreenState extends State with TickerProviderStateMixin {
}
Widget _buildBillProductSelector(PayController controller) {
+ if (controller.model.products.isEmpty && !controller.model.isLoadingProducts) {
+ return SizedBox.shrink();
+ }
+
+ if (controller.model.isLoadingProducts) {
+ return Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 20),
+ const Text(
+ 'Provider Product',
+ style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
+ ),
+ const SizedBox(height: 5),
+ Container(
+ height: 50,
+ decoration: BoxDecoration(
+ color: Colors.grey.shade300,
+ borderRadius: BorderRadius.circular(12),
+ ),
+ ),
+ ],
+ );
+ }
+
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -616,51 +640,48 @@ class _PayScreenState extends State with TickerProviderStateMixin {
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
),
const SizedBox(height: 5),
- Skeletonizer(
- enabled: controller.model.isLoading,
- child: DropdownButtonHideUnderline(
- child: DropdownButtonFormField(
- initialValue: controller.model.selectedProduct?.uid,
- isExpanded: true,
- icon: const Icon(Icons.arrow_drop_down),
- decoration: InputDecoration(
- hintText: 'Select Product',
- enabledBorder: OutlineInputBorder(
- borderRadius: BorderRadius.circular(12),
- borderSide: BorderSide(
- color: Theme.of(
- context,
- ).colorScheme.primary.withValues(alpha: 0.2),
+ DropdownButtonHideUnderline(
+ child: DropdownButtonFormField(
+ initialValue: controller.model.selectedProduct?.uid,
+ isExpanded: true,
+ icon: const Icon(Icons.arrow_drop_down),
+ decoration: InputDecoration(
+ hintText: 'Select Product',
+ enabledBorder: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(12),
+ borderSide: BorderSide(
+ color: Theme.of(
+ context,
+ ).colorScheme.primary.withValues(alpha: 0.2),
+ ),
+ ),
+ ),
+ items: [
+ DropdownMenuItem(child: Text("Select Product")),
+ ...controller.model.products.map(
+ (e) => DropdownMenuItem(
+ value: e.uid,
+ child: Text(
+ '${e.displayName} - '
+ '${transactionController.model.formData.debitCurrency}${e.defaultAmount}',
),
),
),
- items: [
- DropdownMenuItem(child: Text("Select Product")),
- ...controller.model.products.map(
- (e) => DropdownMenuItem(
- value: e.uid,
- child: Text(
- '${e.displayName} - '
- '${transactionController.model.formData.debitCurrency}${e.defaultAmount}',
- ),
- ),
- ),
- ],
- onChanged: (String? newValue) {
- if (newValue != null) {
- BillProduct product = controller.model.products.firstWhere(
- (e) => e.uid == newValue,
- );
- controller.updateSelectedProduct(product);
- }
- },
- validator: (value) {
- if (value == null || value.isEmpty) {
- return 'Please select a product';
- }
- return null;
- },
- ),
+ ],
+ onChanged: (String? newValue) {
+ if (newValue != null) {
+ BillProduct product = controller.model.products.firstWhere(
+ (e) => e.uid == newValue,
+ );
+ controller.updateSelectedProduct(product);
+ }
+ },
+ validator: (value) {
+ if (value == null || value.isEmpty) {
+ return 'Please select a product';
+ }
+ return null;
+ },
),
),
],