Apparence-io / CamerAwesome

📸 Embedding a camera experience within your own app shouldn't be that hard. A flutter plugin to integrate awesome Android / iOS camera experience.
https://ApparenceKit.dev
MIT License
949 stars 240 forks source link

Updated API, more customization and improved docs #162

Closed apalala-dev closed 1 year ago

apalala-dev commented 1 year ago

Description

This PR intends to provide a better documentation, fix bugs and provide an API easier to use. Among the things I changed, there are:

Checklist

Before creating any Pull Request, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).

Breaking Change

The constructor of CamerAwesome now takes a required AwesomeFileSaver as parameter instead of needing fields without requiring them.

Example:

CameraAwesomeBuilder.awesome(
  awesomeFileSaver: AwesomeFileSaver.imageAndVideo(
    imagePathBuilder: () => _path(CaptureModes.PHOTO),
    videoPathBuilder: () => _path(CaptureModes.VIDEO),
    initialCaptureMode: CaptureModes.PHOTO,
  ),
  onMediaTap: (mediaCapture) {
    OpenFile.open(mediaCapture.filePath);
  },
)

Several constructors exist depending on if one wants to save pictures, videos or both.

apalala-dev commented 1 year ago

Note: to see the updated docs, get the branch on your local environment and go to https://docs.page/preview