Passing a base64 string of a PNG image to the image key in the options map does not seem to work. The documentation on this states the following:
string Link to an image (usually your business logo) shown on the Checkout form. Can also be a base64 string if you are not loading the image from a network.
The method used to create the base64 string is the following (verified the result with online base64 converters as well):
base64.encode(Uint8List.view( (await rootBundle.load('assets/images/sample.png')).buffer, ))
Android Studio Electric Eel | 2022.1.1 Patch 2
Build #AI-221.6008.13.2211.9619390, built on February 17, 2023
Runtime version: 11.0.15+0-b2043.56-8887301 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.3.1
Flutter dependency version:
razorpay_flutter: 1.3.4
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Create a base64 string of a PNG image
Pass the above string against the image key in the options map which is passed into the Razorpay().open(options) method.
Resulting image in PG is a blank white image
Expected Results
The base64 encoded PNG image must be displayed correctly in the PG.
Description
Passing a base64 string of a PNG image to the
image
key in the options map does not seem to work. The documentation on this states the following:The method used to create the base64 string is the following (verified the result with online base64 converters as well):
base64.encode(Uint8List.view( (await rootBundle.load('assets/images/sample.png')).buffer, ))
Flutter Version :
Flutter 3.0.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision f1875d570e (11 months ago) • 2022-07-13 11:24:16 -0700 Engine • revision e85ea0e79c Tools • Dart 2.17.6 • DevTools 2.12.2
Android Studio Version :
Android Studio Electric Eel | 2022.1.1 Patch 2 Build #AI-221.6008.13.2211.9619390, built on February 17, 2023 Runtime version: 11.0.15+0-b2043.56-8887301 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 13.3.1
Flutter dependency version:
razorpay_flutter: 1.3.4
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Razorpay().open(options)
method.Expected Results
The base64 encoded PNG image must be displayed correctly in the PG.