Merge branch 'bubu/image_picker_upstream' into 'main'

chore: switch image_picker back to upstream

See merge request famedly/fluffychat!483
This commit is contained in:
Krille Fear 2021-08-10 18:37:18 +00:00
commit bb9554b0e7
6 changed files with 12 additions and 17 deletions

View File

@ -294,7 +294,7 @@ class ChatController extends State<Chat> {
void openCameraAction() async { void openCameraAction() async {
// Make sure the textfield is unfocused before opening the camera // Make sure the textfield is unfocused before opening the camera
FocusScope.of(context).requestFocus(FocusNode()); FocusScope.of(context).requestFocus(FocusNode());
final file = await ImagePicker().getImage(source: ImageSource.camera); final file = await ImagePicker().pickImage(source: ImageSource.camera);
if (file == null) return; if (file == null) return;
final bytes = await file.readAsBytes(); final bytes = await file.readAsBytes();
await showDialog( await showDialog(

View File

@ -249,7 +249,7 @@ class ChatDetailsController extends State<ChatDetails> {
void setAvatarAction() async { void setAvatarAction() async {
MatrixFile file; MatrixFile file;
if (PlatformInfos.isMobile) { if (PlatformInfos.isMobile) {
final result = await ImagePicker().getImage( final result = await ImagePicker().pickImage(
source: ImageSource.gallery, source: ImageSource.gallery,
imageQuality: 50, imageQuality: 50,
maxWidth: 1600, maxWidth: 1600,

View File

@ -67,7 +67,7 @@ class SettingsController extends State<Settings> {
} }
MatrixFile file; MatrixFile file;
if (PlatformInfos.isMobile) { if (PlatformInfos.isMobile) {
final result = await ImagePicker().getImage( final result = await ImagePicker().pickImage(
source: ImageSource.gallery, source: ImageSource.gallery,
imageQuality: 50, imageQuality: 50,
maxWidth: 1600, maxWidth: 1600,

View File

@ -16,7 +16,8 @@ class SettingsStyle extends StatefulWidget {
class SettingsStyleController extends State<SettingsStyle> { class SettingsStyleController extends State<SettingsStyle> {
void setWallpaperAction() async { void setWallpaperAction() async {
final wallpaper = await ImagePicker().getImage(source: ImageSource.gallery); final wallpaper =
await ImagePicker().pickImage(source: ImageSource.gallery);
if (wallpaper == null) return; if (wallpaper == null) return;
Matrix.of(context).wallpaper = File(wallpaper.path); Matrix.of(context).wallpaper = File(wallpaper.path);
await Matrix.of(context) await Matrix.of(context)

View File

@ -621,26 +621,24 @@ packages:
image_picker: image_picker:
dependency: "direct main" dependency: "direct main"
description: description:
path: "packages/image_picker/image_picker" name: image_picker
ref: image_picker_camera_on_android11 url: "https://pub.dartlang.org"
resolved-ref: "6cfc8b8812a71e4eb3480110298d9487da75c560" source: hosted
url: "https://gitlab.com/famedly/company/frontend/flutter-plugins.git" version: "0.8.3+2"
source: git
version: "0.8.1+4"
image_picker_for_web: image_picker_for_web:
dependency: transitive dependency: transitive
description: description:
name: image_picker_for_web name: image_picker_for_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.1.2"
image_picker_platform_interface: image_picker_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: image_picker_platform_interface name: image_picker_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.2.0"
intl: intl:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@ -41,11 +41,7 @@ dependencies:
future_loading_dialog: ^0.2.1 future_loading_dialog: ^0.2.1
geolocator: ^7.4.0 geolocator: ^7.4.0
hive_flutter: ^1.1.0 hive_flutter: ^1.1.0
image_picker: image_picker: ^0.8.3+2
git:
url: https://gitlab.com/famedly/company/frontend/flutter-plugins.git
ref: image_picker_camera_on_android11
path: packages/image_picker/image_picker
intl: any intl: any
localstorage: ^4.0.0+1 localstorage: ^4.0.0+1
lottie: ^1.1.0 lottie: ^1.1.0