payment_lib 0.0.4+8 copy "payment_lib: ^0.0.4+8" to clipboard
payment_lib: ^0.0.4+8 copied to clipboard

Flutter Widgets that make it easy to implement Payment Lib to your Flutter App.

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

⚡️ Import #

import 'package:payment_lib/payment_lib.dart';

🎮 How To Use #

  • Payment Method
body: PaymentMethodListView(
        paymentMethod: paymentMethodList,
        selectPaymentMethod: selectPaymentMethod,
        onTap: () => Navigator.of(context).push(MaterialPageRoute(
            builder: (context) => const PaymentSummaryPage())),
      ),
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)),
                      ),
                    ),
                  ),
                )
            ],
          ),
        ),
      ),
  • Payment Summary
body: PaymentSummaryCard(
        paymentSummaryType: PaymentSummaryType.one,
        paymentSummaryModel: paymentSummaryDataDummy,
        paymentDetail: true,
        onTapPaymentDetail: (){},
      ),
  • Payment Instructions
PaymentInstructionCard(
            paymentIntruction: paymentSummaryModel.paymentIntructions,
          ),

🐛 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 #

Zian Fahrudy

2
likes
55
pub points
0%
popularity

Publisher

verified publishervarx.id

Flutter Widgets that make it easy to implement Payment Lib to your Flutter App.

Homepage
Repository (GitLab)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

fluentui_system_icons, flutter, flutter_html, get, intl

More

Packages that depend on payment_lib