credit_card_displayer 0.0.6 copy "credit_card_displayer: ^0.0.6" to clipboard
credit_card_displayer: ^0.0.6 copied to clipboard

A very easy-to-use package to display credit card with the appropriate logo, according to the credit card first number

example/lib/main.dart

import 'package:credit_card_displayer/credit_card_displayer.dart';
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Credit Card Displayer',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Credit Card Displayer Demo Home Page'),
    );
  }
}

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(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: const Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            CreditCardDisplayer(
              cardNumber: '3111111111111111',
              expiryDate: '12/24',
              cardHolder: 'John Doe',
              width: 300,
              height: 200,
              backgroundColor: Colors.blue,
              textColor: Colors.white,
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
150
points
22
downloads

Publisher

verified publisherhery.website

Weekly Downloads

A very easy-to-use package to display credit card with the appropriate logo, according to the credit card first number

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on credit_card_displayer