payengine 1.5.3 payengine: ^1.5.3 copied to clipboard
PayEngine SDK.
import 'package:flutter/material.dart';
import 'package:payengine_example/config.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: 3, vsync: this);
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
title: const Text('PayEngine SDK example'),
bottom: TabBar(
controller: _controller,
isScrollable: true,
tabs: const [Tab(text: 'Onboarding'),Tab(text: 'Credit Card'), Tab(text: 'Bank Account')],
),
),
body: TabBarView(
controller: _controller,
children: [
OnboardingScreen(config: config, merchantId: merchantId),
CreditCardScreen(config: config, merchantId: merchantId),
BankAccountScreen(config: config, merchantId: merchantId)
],
),
),
);
}
}