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

A flutter plugin to integrate GoKwik's Flutter SDK.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_gokwik/flutter_gokwik.dart';
import 'package:flutter_gokwik_example/home.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'GoKwik Payment Gateway',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(primaryColor: Colors.indigo),
      home: Home() // or CAll GokwikAPI() ,
    );
  }
}
void GokwikAPI() async {
    Gokwik _gokwik;
    String requestId = "requestId";
    String gokwikOid = "gokwikOid";
    String moid = "MerchantOrderID";
    String mid = "MerchantID";
    String total = "total";
    String orderType = "cod/upi/non-gk";

    _gokwik.initPayment(context,
        production: false, data: GokwikData(requestId, gokwikOid,
            total, moid, mid, orderType));

    _gokwik.on(Gokwik.EVENT_PAYMENT_SUCCESS, _handleResult);
    _gokwik.on(Gokwik.EVENT_PAYMENT_ERROR, _handleResult);

    void _handleResult(PaymentResponse response) {
      print(response);
    }

  }
1
likes
100
pub points
0%
popularity

Publisher

unverified uploader

A flutter plugin to integrate GoKwik's Flutter SDK.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

eventify, flutter

More

Packages that depend on flutter_gokwik