Coder Social home page Coder Social logo

get_photo's Introduction

get_photo

Pub

A new photo selection plug-in UI, packaged with the photo_manager interface, supports IOS, Android, macOS; only supports selection of pictures.

一款新的照片选择插件UI,使用photo_manager 接口封装,支持IOS, Android, macOS;仅支持选择图片。

Screenshots

lineopts example screenshot

Example

Uint8List? _image;

GetPhoto(
  crossAxisCount: 4,
  lang: {
    'Recent': '所有图片',
    'Camera': '相机',
    'WeiXin': '微信',
  },
  onTap: (v) async {
    _image = await v.originBytes;
    //print((await v.titleAsync));
    //setState(() {});
  },
),

Customization

Here is a list of properties available to customize your widget:

Name Type Description
crossAxisCount int Display quantity in one line
onTap ValueChanged Choose to call back a parameter of type AssetEntity
lang Map Replace the default album name
showAlbumsList bool Show album list or all pictures by default
名称 类型 描述
crossAxisCount int 一行显示数量
onTap ValueChanged 选择回调一个AssetEntity类型的参数
lang Map 替换默认相册名称
showAlbumsList bool 默认显示相册列表还是全部图片

FAQ

使用glide 在/android/build.gradle 增加

rootProject.allprojects {

    subprojects {
        project.configurations.all {
            resolutionStrategy.eachDependency { details ->
                if (details.requested.group == 'com.github.bumptech.glide'
                        && details.requested.name.contains('glide')) {
                    details.useVersion '4.11.0'
                }
            }
        }
    }
}

在/android/app/build.gradle 增加

+ apply plugin: 'kotlin-kapt'

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
   + implementation 'com.github.bumptech.glide:glide:4.11.0'
   + kapt 'com.github.bumptech.glide:compiler:4.11.0'
}

在/android/app/src/main/kotlin/com/xx/xx/

新建 AppGlideModule.kt 拷贝以下内容保存

package com.example.getphoto

import com.bumptech.glide.annotation.GlideModule
import com.bumptech.glide.module.AppGlideModule
@GlideModule
class MyAppGlideModule : AppGlideModule(){
}

get_photo's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.