btc_stripe_payment 0.0.2 copy "btc_stripe_payment: ^0.0.2" to clipboard
btc_stripe_payment: ^0.0.2 copied to clipboard

personal use

ADD IN PUBSPEC.YMAL #

dependencies:
    btc_stripe_payment: 

ADD IN KOTLIN MAIN ACTIVITY #

class MainActivity: FlutterFragmentActivity() {
    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
        GeneratedPluginRegistrant.registerWith(flutterEngine)
    }
}

ADD IN VALUES --> STYLE #

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
    <style name="LaunchTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Show a splash screen on the activity. Automatically removed when
             Flutter draws its first frame -->
        <item name="android:windowBackground">@drawable/launch_background</item>
        <item name="android:windowFullscreen">false</item>
    </style>
    <!-- Theme applied to the Android Window as soon as the process has started.
         This theme determines the color of the Android Window while your
         Flutter UI initializes, as well as behind your Flutter UI while its
         running.

         This Theme is only used starting with V2 of Flutter's Android embedding. -->
    <style name="NormalTheme" parent="Theme.MaterialComponents">
        <item name="android:windowBackground">?android:colorBackground</item>
    </style>
</resources>

CREATE .env FILE IN ASSETS #

const stripePublishableKey =  "";

ADD IN VOID MAIN #

void main() {
    WidgetsFlutterBinding.ensureInitialized();
    StripePaymentFlutter.initialiseStripe(publishKey: "");
    runApp(const MyApp());
}

MAKE PAYMENT #

 StripePaymentFlutter.makePayment(fees: 2000.10,secretKey:"");