lycan_pay_sdk 0.0.1 copy "lycan_pay_sdk: ^0.0.1" to clipboard
lycan_pay_sdk: ^0.0.1 copied to clipboard

A new flutter Lycan Pay SDK project.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:lycan_payment_example/product_screen.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: ProductPageScreen(),
      ),
    );
  }
}

// class TestPage extends StatefulWidget {
//   const TestPage({Key? key}) : super(key: key);

//   @override
//   State<TestPage> createState() => _TestPageState();
// }

// class _TestPageState extends State<TestPage> {
//   TextEditingController name = TextEditingController();
//   TextEditingController amount = TextEditingController();
//   TextEditingController email = TextEditingController();
//   TextEditingController invoce = TextEditingController();
//   TextEditingController merchant = TextEditingController();
//   bool buttonShow = false;

//   @override
//   Widget build(BuildContext context) {
//     return Scaffold(
//       body: Padding(
//         padding: const EdgeInsets.all(20),
//         child: Column(
//           crossAxisAlignment: CrossAxisAlignment.center,
//           mainAxisAlignment: MainAxisAlignment.center,
//           children:  [
//             TextFormField(
//               controller: name,
//               decoration: const InputDecoration(labelText: "Name"),
//               textInputAction: TextInputAction.next,
//               autovalidateMode: AutovalidateMode.always,
//             ),
//             TextFormField(
//               controller: amount,
//               autovalidateMode: AutovalidateMode.always,
//               decoration: const InputDecoration(labelText: "Amount"),
//               textInputAction: TextInputAction.next,
//             ),
//             TextFormField(
//               controller: email,
//               autovalidateMode: AutovalidateMode.always,
//               decoration: const InputDecoration(labelText: "Email Addess"),
//               textInputAction: TextInputAction.next,
//             ),
//             TextFormField(
//               controller: invoce,
//               autovalidateMode: AutovalidateMode.always,
//               decoration: const InputDecoration(labelText: "Invoice"),
//               textInputAction: TextInputAction.next,
//             ),
//             TextFormField(
//               controller: merchant,
//               autovalidateMode: AutovalidateMode.always,
//               decoration: const InputDecoration(labelText: "Merchant ID"),
//               textInputAction: TextInputAction.done,
//               onFieldSubmitted: (v) {},
//             ),
//             const SizedBox(height: 30),
//             if (buttonShow == false)
//               TextButton(
//                   onPressed: () {
//                     if (amount.text.isNotEmpty &&
//                         name.text.isNotEmpty &&
//                         invoce.text.isNotEmpty &&
//                         amount.text.isNotEmpty &&
//                         merchant.text.isNotEmpty) {
//                       setState(() {
//                         buttonShow = true;
//                       });
//                     }
//                   },
//                   child: const Text("Submit")),
//             if (buttonShow &&
//                 (amount.text.isNotEmpty &&
//                     name.text.isNotEmpty &&
//                     invoce.text.isNotEmpty &&
//                     amount.text.isNotEmpty &&
//                     merchant.text.isNotEmpty))
//               LycanpaySDK(
//                 amount: amount.text,
//                 name: name.text,
//                 email: email.text,
//                 merchantID: merchant.text,
//                 idTestMode: 1,
//                 invoiceNo: invoce.text,
//                 redirectPage: const TestPage(),
//               )
//             // LycanpaySDK(
//             //   amount: "70",
//             //   name: "Lycan Pay",
//             //   email: "exapmle@gmail.com",
//             //   merchantID: "test_2120B4CFAD094A",
//             //   idTestMode: 1,
//             //   invoiceNo: "INV001",
//             //   redirectPage: MyApp(),
//             // )
//             // Fill all details and generate lycan pay button
//           ],
//         ),
//       ),
//     );
//   }
// }
1
likes
80
pub points
0%
popularity

Publisher

unverified uploader

A new flutter Lycan Pay SDK project.

Documentation

API reference

License

BSL-1.0 (license)

Dependencies

flutter, flutter_svg, http, provider, qr_flutter, shimmer, slide_to_act

More

Packages that depend on lycan_pay_sdk