getnet_payment_tech 1.1.0
getnet_payment_tech: ^1.1.0 copied to clipboard
Plugin Flutter para integrar sua aplicação com o SDK Android da Getnet para meios de pagamento.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'payment/payment_page.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Getnet Payment Tech Example',
theme: ThemeData(colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue), useMaterial3: true),
home: const HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: const Text('Getnet Payment Tech')),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(Icons.payment, size: 100, color: Colors.blue),
const SizedBox(height: 20),
const Text(
'Bem-vindo ao exemplo do Getnet Payment Tech',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
),
const SizedBox(height: 40),
ElevatedButton(
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) => const PaymentPage()));
},
style: ElevatedButton.styleFrom(padding: const EdgeInsets.symmetric(horizontal: 40, vertical: 15)),
child: const Text('Iniciar Pagamentos'),
),
],
),
),
);
}
}