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 {
// 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(

View File

@ -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,

View File

@ -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,

View File

@ -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)

View File

@ -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:

View File

@ -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