flutter_cart 0.0.9 copy "flutter_cart: ^0.0.9" to clipboard
flutter_cart: ^0.0.9 copied to clipboard

A flutter package for the cart management. This package helps you to perform basic cart operation like (Add to cart, Remove from cart, Get total count) etc.

example/lib/main.dart

import 'package:example/routes/routes.dart';
import 'package:flutter/material.dart';
import 'package:flutter_cart/flutter_cart.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  var cart = FlutterCart();
  await cart.initializeCart(isPersistenceSupportEnabled: true);
  runApp(const ProviderScope(child: MyApp()));
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      routerConfig: router,
      title: 'Example Cart',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
        appBarTheme: const AppBarTheme(
          color: Colors.deepPurple,
          titleTextStyle: TextStyle(
              color: Colors.white, fontWeight: FontWeight.w500, fontSize: 20),
        ),
      ),
      debugShowCheckedModeBanner: false,
    );
  }
}
85
likes
140
pub points
90%
popularity

Publisher

unverified uploader

A flutter package for the cart management. This package helps you to perform basic cart operation like (Add to cart, Remove from cart, Get total count) etc.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, freezed, freezed_annotation, shared_preferences

More

Packages that depend on flutter_cart