get_upi 0.0.3+4 copy "get_upi: ^0.0.3+4" to clipboard
get_upi: ^0.0.3+4 copied to clipboard

PlatformAndroidiOS
outdated

Flutter plugin for get the installed upi apps on device and launch the application.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:get_upi/get_upi.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  List<UpiObject> upiAppsList = [];

  @override
  void initState() {
    getUpi();
    super.initState();
  }

  void getUpi() async {
    var value = await GetUPI.apps();
    upiAppsList = value.data;
    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: ElevatedButton(
            onPressed: () {
              GetUPI.openNativeIntent(
                url:
                    'upi://mandate?pa=ippoautopay@icici&pn=IPPOPAY%20TECHNOLOGIES&tr=EZM2023070112223506269543&am=2000.00 &cu=INR&orgid=400011&mc=5818&purpose=14&tn=Mandate%20for%20Sound%20box&validitystart=01072023&validityend=01072053&amrule=MAX&recur=ASPRESENTED&rev=Y&share=Y&block=N&txnType=CREATE&mode=13',
              );
            },
            child: const Text("Native Intent"),
          ),
        ),
        // body: GridView.builder(
        //   itemCount: upiAppsList.length,
        //   gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
        //     crossAxisCount: 4,
        //     mainAxisSpacing: 5,
        //     mainAxisExtent: 80,
        //   ),
        //   physics: const NeverScrollableScrollPhysics(),
        //   shrinkWrap: true,
        //   itemBuilder: (context, index) {
        //     final upiApp = upiAppsList[index];

        //     return InkWell(
        //       onTap: () {
        //         GetUPI.launch(
        //           package: upiApp.packageName,
        //           url: '',
        //         );
        //       },
        //       borderRadius: BorderRadius.circular(10),
        //       child: Container(
        //         decoration: BoxDecoration(
        //           borderRadius: BorderRadius.circular(10),
        //         ),
        //         child: Column(
        //           mainAxisSize: MainAxisSize.min,
        //           mainAxisAlignment: MainAxisAlignment.center,
        //           children: [
        //             Image.memory(
        //               base64Decode(upiApp.icon),
        //               height: 32,
        //               width: 32,
        //             ),
        //             const SizedBox(height: 15),
        //             Text(
        //               upiApp.name,
        //               textAlign: TextAlign.center,
        //               style: const TextStyle(fontSize: 12),
        //             ),
        //           ],
        //         ),
        //       ),
        //     );
        //   },
        // ),
      ),
    );
  }
}
2
likes
130
points
615
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin for get the installed upi apps on device and launch the application.

Documentation

API reference

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on get_upi

Packages that implement get_upi