cobuy_sdk 3.0.1 copy "cobuy_sdk: ^3.0.1" to clipboard
cobuy_sdk: ^3.0.1 copied to clipboard

CoBuy Flutter SDK enables group-based purchasing where multiple users can join a group to buy products together. Once the required number of members joins, the group is completed and users receive dis [...]

example/lib/main.dart

import 'package:cobuy_sdk/cobuy_sdk.dart';
import 'package:cobuy_sdk_example/product/view/product_list_route.dart';
import 'package:flutter/material.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  /// Initialize the CoBuy SDK
  /// - Provide merchant key
  /// - Set SDK environment (staging/production)
  await CoBuySdk.initialize(
    merchantKey: 'cobuy_test_ABC123XYZ890',
    sdkEnvironment: SdkEnvironment.production,
  );

  runApp(const MyHome());
}

class MyHome extends StatefulWidget {
  const MyHome({super.key});

  @override
  State<MyHome> createState() => _MyHomeState();
}

class _MyHomeState extends State<MyHome> {
  @override
  void dispose() {
    /// Dispose SDK resources on app exit
    CoBuySdk.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,

      /// Use SDK navigator key to allow widgets inside SDK to show dialogs/snackbars
      navigatorKey: CoBuySdk.navigatorKey,

      /// Initial home screen of your app
      home: const ProductListScreen(),
    );
  }
}
0
likes
90
points
33
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

CoBuy Flutter SDK enables group-based purchasing where multiple users can join a group to buy products together. Once the required number of members joins, the group is completed and users receive discounted pricing benefits.

Repository (GitHub)

License

unknown (license)

Dependencies

bloc, connectivity_plus, flutter, flutter_bloc, flutter_screenutil, flutter_svg, fluttertoast, google_fonts, http, linear_progress_bar, plugin_platform_interface, share_plus, shared_preferences, shimmer, socket_io_client, url_launcher

More

Packages that depend on cobuy_sdk

Packages that implement cobuy_sdk