flutter_stone_payment 1.0.0 copy "flutter_stone_payment: ^1.0.0" to clipboard
flutter_stone_payment: ^1.0.0 copied to clipboard

Plugin flutter que faz a integração com o SDK da stone, para pagamento com maquininhas POS

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_stone_payment/constants/installment_type.dart';
import 'package:flutter_stone_payment/constants/transaction_type.dart';
import 'dart:async';

import 'package:flutter_stone_payment/flutter_stone_payment.dart';
import 'package:flutter_stone_payment/models/payment_payload.dart';

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

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

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

class _MyAppState extends State<MyApp> {
  final _flutterStonePaymentPlugin = FlutterStonePayment();

  @override
  void initState() {
    super.initState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    final payment = PaymentPayload(amount: 19.00, transactionType: TransactionType.DEBIT, orderId: '123456789');
    await _flutterStonePaymentPlugin.pay(paymentPayload: payment);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: ElevatedButton(onPressed: initPlatformState, child: Text('Pagar')),
        ),
      ),
    );
  }
}
1
likes
0
points
177
downloads

Publisher

unverified uploader

Weekly Downloads

Plugin flutter que faz a integração com o SDK da stone, para pagamento com maquininhas POS

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_stone_payment

Packages that implement flutter_stone_payment