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

The PayEngine Flutter SDK allows you to build delightful payment experiences in your native Android and iOS apps using Flutter

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:payengine_example/config.dart';
import 'package:payengine_example/screens/becs_screen.dart';
import 'package:payengine_example/themes.dart';

import 'screens/bank_account_screen.dart';
import 'screens/credit_card_screen.dart';
import 'screens/onboarding_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 config = Config.config;
  final merchantId = Config.merchantId;

  Map<dynamic, dynamic> result = {};

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: MyAppThemes.lightTheme,
      darkTheme: MyAppThemes.darkTheme,
      themeMode: ThemeMode.light,
      home: Scaffold(
        // backgroundColor: Color.fromARGB(255, 0, 0, 0),
        resizeToAvoidBottomInset: false,
        appBar: AppBar(
          title: const Text('PayEngine SDK example'),
          bottom: TabBar(
            controller: _controller,
            isScrollable: false,
            tabs: const [
              Tab(text: 'Onboarding'),
              Tab(text: 'Credit Card'),
              Tab(text: 'Bank Account'),
              Tab(text: 'BECS')
            ],
          ),
        ),
        body: TabBarView(
          controller: _controller,
          physics: const NeverScrollableScrollPhysics(),
          children: [
            OnboardingScreen(config: config, merchantId: merchantId),
            CreditCardScreen(config: config, merchantId: merchantId),
            BankAccountScreen(config: config, merchantId: merchantId),
            BECSScreen(config: config, merchantId: merchantId)
          ],
        ),
      ),
    );
  }
}
2
likes
140
pub points
38%
popularity

Publisher

unverified uploader

The PayEngine Flutter SDK allows you to build delightful payment experiences in your native Android and iOS apps using Flutter

Homepage

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_web_plugins, http, path_provider, plugin_platform_interface, webview_flutter, webview_flutter_android, webview_flutter_wkwebview

More

Packages that depend on payengine