payengine 1.5.0 copy "payengine: ^1.5.0" to clipboard
payengine: ^1.5.0 copied to clipboard

retractedoutdated

PayEngine SDK.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:payengine/payengine.dart';

import 'screens/bank_account_screen.dart';
import 'screens/credit_card_screen.dart';

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

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

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

class _MyAppState extends State<MyApp> with TickerProviderStateMixin {
  late TabController _controller;

  final PayEngineConfig config = const PayEngineConfig(
      publicKey: "pk_test_yHpGIwKZ0Pi031bayG6rSWXDwi4MLggP",
      scriptURL: "https://staging-sandbox.payengine.dev/js/1.0.0/embed.js");

  Map<dynamic, dynamic> result = {};

  @override
  void initState() {
    super.initState();
    _controller = TabController(length: 2, vsync: this);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        resizeToAvoidBottomInset: false,
        appBar: AppBar(
          title: const Text('Secure Fields example'),
          bottom: TabBar(
            controller: _controller,
            tabs: const [Tab(text: 'Credit Card'), Tab(text: 'Bank Account')],
          ),
        ),
        body: TabBarView(
          controller: _controller,
          children: [
            CreditCardScreen(config: config),
            BankAccountScreen(config: config)
          ],
        ),
      ),
    );
  }
}
2
likes
0
pub points
42%
popularity

Publisher

unverified uploader

PayEngine SDK.

Homepage

License

unknown (license)

Dependencies

flutter, http, plugin_platform_interface

More

Packages that depend on payengine