cart_counter 0.0.1 copy "cart_counter: ^0.0.1" to clipboard
cart_counter: ^0.0.1 copied to clipboard

This is a package which helps You Can Implement Cart Counter in your flutter project easily.

cart_counter #

A Flutter Package which Helps you can Implement Cart Counter in your flutter project. Its really Simple and Easy to use. This Package will provide me a default design and if you want to change according to you then you can also do this. In This Package you can enable TextField for custom Enter value. simple in CartCounter widget you need to pass isEnable paramter true like: isEnable:true then you'll able to Enter custom value.

Screenshots #

Usage #

Example

To use this package:

    dependencies:
      flutter:
        sdk: flutter
      cart_counter: ^0.0.1

How to use #

  
import 'package:cart_counter/Widgets/CartCounter.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        debugShowCheckedModeBanner: false,
        title: 'Cart Counter',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: HomePage());
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: Container(
      height: double.infinity,
      child: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
           Container(
              width: 150,
              child: CartCounter(
                maximumValue: 10,
                minimumValue: 3,
                value: 3,
                style: TextStyle(
                    color: Colors.red,
                    fontSize: 30,
                    fontWeight: FontWeight.bold),
               onChanged: (val) {
                  //here in val variable you'll get updated counter value.
                  print(val);
                },
              ),
            ),
          ],
        ),
      ),
    ));
  }
}


Done Thank You For The Using This Package. It Will Be Really Really Helpfull. #

9
likes
40
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

This is a package which helps You Can Implement Cart Counter in your flutter project easily.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, flutter_bounce

More

Packages that depend on cart_counter