CkShareButton.builder constructor

const CkShareButton.builder({
  1. Key? key,
  2. required String title,
  3. required String deepLinkUrl,
  4. required Widget builder(
    1. BuildContext context,
    2. Future<void> share(),
    3. bool isLoading
    )?,
  5. String? imageUrl,
  6. ByteData? byteImage,
  7. VoidCallback? onShareStart,
  8. VoidCallback? onShareReady,
  9. VoidCallback? onShareSuccess,
  10. void onShareError(
    1. Object error
    )?,
})

Convenient constructor for builder mode.

Implementation

const CkShareButton.builder({
  super.key,
  required this.title,
  required this.deepLinkUrl,
  required this.builder,
  this.imageUrl,
  this.byteImage,
  this.onShareStart,
  this.onShareReady,
  this.onShareSuccess,
  this.onShareError,
}) : child = null,
     loaderStyle = CkShareLoaderStyle.adaptiveEdge,
     shape = null,
     borderRadius = null,
     strokeWidth = 2.5,
     strokeLengthFactor = 0.3,
     loaderColor = null,
     trackColor = null,
     paddingOffset = 0.0,
     animationDuration = const Duration(milliseconds: 1100),
     customLoader = null,
     onTap = null,
     assert(
       imageUrl != null || byteImage != null,
       'Either imageUrl or byteImage must be provided to CkShareButton.',
     );