mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-29 01:22:37 +01:00
chore: switch image_picker back to upstream
https://github.com/flutter/plugins/pull/3194 has finally been merged. Also update to non-deprecated pick* methods.
This commit is contained in:
parent
5bb070b318
commit
5707120fc1
@ -294,7 +294,7 @@ class ChatController extends State<Chat> {
|
||||
void openCameraAction() async {
|
||||
// Make sure the textfield is unfocused before opening the camera
|
||||
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;
|
||||
final bytes = await file.readAsBytes();
|
||||
await showDialog(
|
||||
|
@ -249,7 +249,7 @@ class ChatDetailsController extends State<ChatDetails> {
|
||||
void setAvatarAction() async {
|
||||
MatrixFile file;
|
||||
if (PlatformInfos.isMobile) {
|
||||
final result = await ImagePicker().getImage(
|
||||
final result = await ImagePicker().pickImage(
|
||||
source: ImageSource.gallery,
|
||||
imageQuality: 50,
|
||||
maxWidth: 1600,
|
||||
|
@ -67,7 +67,7 @@ class SettingsController extends State<Settings> {
|
||||
}
|
||||
MatrixFile file;
|
||||
if (PlatformInfos.isMobile) {
|
||||
final result = await ImagePicker().getImage(
|
||||
final result = await ImagePicker().pickImage(
|
||||
source: ImageSource.gallery,
|
||||
imageQuality: 50,
|
||||
maxWidth: 1600,
|
||||
|
@ -16,7 +16,8 @@ class SettingsStyle extends StatefulWidget {
|
||||
|
||||
class SettingsStyleController extends State<SettingsStyle> {
|
||||
void setWallpaperAction() async {
|
||||
final wallpaper = await ImagePicker().getImage(source: ImageSource.gallery);
|
||||
final wallpaper =
|
||||
await ImagePicker().pickImage(source: ImageSource.gallery);
|
||||
if (wallpaper == null) return;
|
||||
Matrix.of(context).wallpaper = File(wallpaper.path);
|
||||
await Matrix.of(context)
|
||||
|
14
pubspec.lock
14
pubspec.lock
@ -621,26 +621,24 @@ packages:
|
||||
image_picker:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "packages/image_picker/image_picker"
|
||||
ref: image_picker_camera_on_android11
|
||||
resolved-ref: "6cfc8b8812a71e4eb3480110298d9487da75c560"
|
||||
url: "https://gitlab.com/famedly/company/frontend/flutter-plugins.git"
|
||||
source: git
|
||||
version: "0.8.1+4"
|
||||
name: image_picker
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.8.3+2"
|
||||
image_picker_for_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image_picker_for_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.1.2"
|
||||
image_picker_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image_picker_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.2.0"
|
||||
intl:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -41,11 +41,7 @@ dependencies:
|
||||
future_loading_dialog: ^0.2.1
|
||||
geolocator: ^7.4.0
|
||||
hive_flutter: ^1.1.0
|
||||
image_picker:
|
||||
git:
|
||||
url: https://gitlab.com/famedly/company/frontend/flutter-plugins.git
|
||||
ref: image_picker_camera_on_android11
|
||||
path: packages/image_picker/image_picker
|
||||
image_picker: ^0.8.3+2
|
||||
intl: any
|
||||
localstorage: ^4.0.0+1
|
||||
lottie: ^1.1.0
|
||||
|
Loading…
Reference in New Issue
Block a user