refactor: File selector just use default FileType
and remove not working zip selector
This commit is contained in:
parent
803602e3c5
commit
53af09227f
7 changed files with 18 additions and 116 deletions
|
|
@ -3,6 +3,7 @@ import 'dart:async';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:http/http.dart' hide Client;
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
|
|
@ -296,7 +297,7 @@ class EmotesSettingsController extends State<EmotesSettings> {
|
|||
void createStickers() async {
|
||||
final pickedFiles = await selectFiles(
|
||||
context,
|
||||
type: FileSelectorType.images,
|
||||
type: FileType.image,
|
||||
allowMultiple: true,
|
||||
);
|
||||
if (pickedFiles.isEmpty) return;
|
||||
|
|
@ -355,7 +356,7 @@ class EmotesSettingsController extends State<EmotesSettings> {
|
|||
}
|
||||
|
||||
Future<void> importEmojiZip() async {
|
||||
final result = await selectFiles(context, type: FileSelectorType.zip);
|
||||
final result = await selectFiles(context, type: FileType.any);
|
||||
|
||||
if (result.isEmpty) return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue