mctpaymentapiflutter 1.0.0
mctpaymentapiflutter: ^1.0.0 copied to clipboard
MCTPaymentApi flutter plugin.
Flutter Plugin Setup Guide #
Getting Started #
Feature #
- Payment Support KHQR Personal Account
- Allow integrate with flutter app
Ensure your Flutter application initializes properly by using the following main.dart configuration:
void main() {
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setPreferredOrientations(
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
runApp(const MyApp());
}
Installation #
Add Dependencies #
Add the following dependency to your pubspec.yaml file:
- required dartz: ^0.10.0
- mctpaymentapiflutter: ^1.0.0
dependencies:
dartz: ^0.10.0
mctpaymentapiflutter: ^1.0.0
Android Setup #
Modify project/build.gradle #
- Ensure your build.gradle file includes the necessary repositories:
allprojects {
repositories {
google()
mavenCentral()
maven {
url = uri("https://gitlab.com/api/v4/projects/67854824/packages/maven")
}
}
}
Modify project/settings.gradle #
- Ensure the required plugins are included: 2.0.0 or latest, 8.1.0 or latest.
plugins {
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
}
Configure app/build.gradle #
- Set up the Android application ID for your Flutter project: Your id the same configuration on your account register morecambodia.com before you can use Api.
defaultConfig {
// TODO: Specify your own unique Application ID.
applicationId = "com.example.flutterandroidapp"
}
Modify app/src/main/AndroidManifest.xml #
- To show QRCodeActivity
<application>
<activity
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
android:name="com.morecambodia.mctpaymentapi.QRCodeActivity"/>
</application
Android Result #
[Result Screen]
[Result Screen]
[Result Screen]
iOS Setup #
- For iOS, simply no install the required: /ios
pod install
IOS Result #
[Result Screen]
[Result Screen]
[Result Screen]
Run #
flutter clean
flutter pub get
flutter pub run