promptpay_qrcode_generate 1.0.0 promptpay_qrcode_generate: ^1.0.0 copied to clipboard
Promptpay QR Code Generate
import 'package:flutter/material.dart';
import 'package:promptpay_qrcode_generate/promptpay_qrcode_generate.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'PromptPayQRCodeGenerate Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'PromptPayQRCodeGenerate Demo'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey.shade200,
appBar: AppBar(
title: Text(widget.title),
),
body: const Center(
child: QRCodeGenerate(
promptPayId: "YourPromptPay",
amount: 1234.56,
width: 400,
height: 400,
),
),
);
}
}