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
fcc67b0234
commit
875630278c
6 changed files with 12 additions and 17 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue