Last updated:
0 purchases
payment lib
Payment Lib #
Payment Lib package lets you add UI Template for Payment Method, Payment Summary, Payment Instructions to your Flutter app.
🎖 Installing #
dependencies:
payment_lib: ^0.0.4+3
copied to clipboard
⚡️ Import #
import 'package:payment_lib/payment_lib.dart';
copied to clipboard
🎮 How To Use #
Payment Method
body: PaymentMethodListView(
paymentMethod: paymentMethodList,
selectPaymentMethod: selectPaymentMethod,
onTap: () => Navigator.of(context).push(MaterialPageRoute(
builder: (context) => const PaymentSummaryPage())),
),
copied to clipboard
body: SafeArea(
child: ValueListenableBuilder(
valueListenable: selectPaymentMethod,
builder: (context, _, __) => Column(
children: [
Expanded(
child: ListView.builder(
itemCount: paymentMethodList.length,
itemBuilder: (context, i) => PaymentMethodCard(
selectPaymentMethod: selectPaymentMethod,
categoryName: paymentMethodList[i].paymentTypes.name,
payments: paymentMethodList[i].payments,
onChanged: (id) {
selectPaymentMethod.value = id!;
},
),
),
),
if (selectPaymentMethod.value != null)
SizedBox(
width: double.infinity,
child: Card(
margin: EdgeInsets.zero,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
minimumSize: const Size(double.infinity, 45)),
onPressed: () {},
child: Text("Pilih",
style: Theme.of(context)
.textTheme
.button!
.copyWith(color: Colors.white)),
),
),
),
)
],
),
),
),
copied to clipboard
Payment Summary
body: PaymentSummaryCard(
paymentSummaryType: PaymentSummaryType.one,
paymentSummaryModel: paymentSummaryDataDummy,
paymentDetail: true,
onTapPaymentDetail: (){},
),
copied to clipboard
Payment Instructions
PaymentInstructionCard(
paymentIntruction: paymentSummaryModel.paymentIntructions,
),
copied to clipboard
🐛 Bugs/Requests #
If you encounter any problems feel free to open an issue. If you feel the library is
missing a feature, please raise a ticket on Gitlab and I'll look into it.
❗️ Note #
For help getting started with Flutter, view our online
documentation.
For help on editing plugin code, view the documentation.
☀️ Authors #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.