wechat_camera_picker_plus 1.0.3 copy "wechat_camera_picker_plus: ^1.0.3" to clipboard
wechat_camera_picker_plus: ^1.0.3 copied to clipboard

A camera picker for Flutter projects based on WeChat's UI, which is also a separate runnable extension to the wechat_assets_picker_plus.

Flutter WeChat Camera Picker #

MIT License pub dart

A camera picker based on WeChat's UI which is a separate runnable extension to wechat_assets_picker_plus. The package based on camera for camera functions and photo_manager for asset implementation.

📷 Screenshots #

1 2 3 4 5

Features ✨ #

  • â™ģī¸ Fully implementable with States override
  • 💚 99% similar to WeChat style
  • 📷 Picture taking support
  • đŸŽĨ Video recording support
    • ⏱ Duration limitation support
    • 🔍 Scale when recording support
  • â˜€ī¸ Exposure adjust support
  • đŸ”ī¸ Scale with pinch support
  • 💱 i18n support
    • âĒ RTL language support
  • 🎏 Fully customizable theme
  • 🖾 Foreground custom widget builder support
  • đŸ•šī¸ Intercept saving with custom process

đŸ“Ļ Installation #

Add the package to your pubspec.yaml:

dependencies:
  wechat_camera_picker_plus: ^latest_version
dependencies:
  flutter pub get

Setup #

Android 13 (API 33) permissions

If you don't need to take photos or videos, consider removing relevant permission in your apps, more specifically:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.your.app">
    <!-- Add this if you need to take photos. -->
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
    <!-- Add this if you need to take videos. -->
    <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
</manifest>

🚀 Usage #

Import the package:

import 'package:wechat_camera_picker_plus/wechat_camera_picker_plus.dart';

Usage 📖 #

Record Video:

  final entity = await CameraPicker.pickFromCamera(
      Get.context!,
      pickerConfig: CameraPickerConfig(
        enableRecording: true,
        onlyEnableRecording: true,
        resolutionPreset: ResolutionPreset.high,
        maximumRecordingDuration: const Duration(seconds: 60),
        minimumRecordingDuration: const Duration(seconds: 7),
        enableTapRecording: true,
        permissionRequestOption: PermissionRequestOption(
          androidPermission:
              AndroidPermission(type: RequestType.all, mediaLocation: true),
        ),
        textDelegate: EnglishCameraPickerTextDelegate(),
        onMinimumRecordDurationNotMet: () {
          'Minimum recording duration is 7 seconds'.errorToast();
        },
      ),
    );

  final file = await entity?.file;

Take Picture:

  final entity = await CameraPicker.pickFromCamera(
      Get.context!,
      pickerConfig: CameraPickerConfig(
        enableRecording: false,
        resolutionPreset: ResolutionPreset.high,
        permissionRequestOption: PermissionRequestOption(
          androidPermission:
              AndroidPermission(type: RequestType.all, mediaLocation: true),
        ),
        textDelegate: EnglishCameraPickerTextDelegate(),
      ),
    );

  final file = await entity?.file;

💭 Frequently asked question #

Why the orientation behavior is strange on iOS? Currently, the preview is not correctly synced on the iOS. You can find more details in this issue: https://github.com/flutter/flutter/issues/89216 . Other than that, please submit issues to describe your question.

📄 License #

This project is licensed under the MIT License. See the LICENSE file for details.

Contributors ✨ #

Thank goes to these wonderful people (emoji key):


Alex Li

đŸ’ģ 🎨 📖 💡 🤔 🚧 đŸ’Ŧ 👀

Caijinglong

💡 🤔

Lael

📖

mjl0602

đŸ’ģ 🤔

AliasWang

đŸ’ģ 🤔

leftcoding

🐛

Luong The Vinh

đŸ’ģ

luomo-pro

ī¸ī¸ī¸ī¸â™ŋī¸ 🐛

LeonardoZhu

đŸ’ģ

This project follows the all-contributors specification. Contributions of any kind welcome!

🌐 Author #

Made with â¤ī¸ by Deepak.

0
likes
130
points
80
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

A camera picker for Flutter projects based on WeChat's UI, which is also a separate runnable extension to the wechat_assets_picker_plus.

Repository (GitHub)
View/report issues

Topics

#picker #camera #image #video #wechat

Documentation

API reference

License

MIT (license)

Dependencies

camera, camera_platform_interface, collection, flutter, meta, path, photo_manager, photo_manager_image_provider, sensors_plus, uuid, video_player, wechat_picker_library

More

Packages that depend on wechat_camera_picker_plus