Fix logo upload on macos
This commit is contained in:
parent
c44b0de760
commit
d869a007a1
|
|
@ -47,7 +47,7 @@ class CachedImage extends StatelessWidget {
|
|||
height: height,
|
||||
key: ValueKey(url),
|
||||
imageUrl: url,
|
||||
placeholder: (context, url) => CircularProgressIndicator(),
|
||||
placeholder: (context, url) => Center(child: CircularProgressIndicator()),
|
||||
errorWidget: (context, url, Object error) =>
|
||||
Image.asset('assets/images/icon.png', width: 32, height: 30),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -20,13 +20,7 @@ Future<MultipartFile> pickFile(
|
|||
{String fileIndex,
|
||||
FileType fileType,
|
||||
List<String> allowedExtensions}) async {
|
||||
if (kIsWeb) {
|
||||
return _pickFile(
|
||||
fileIndex: fileIndex,
|
||||
fileType: fileType,
|
||||
allowedExtensions: allowedExtensions,
|
||||
);
|
||||
} else if (isWindows()) {
|
||||
if (kIsWeb || isDesktopOS()) {
|
||||
return _pickFile(
|
||||
fileIndex: fileIndex,
|
||||
fileType: fileType,
|
||||
|
|
@ -34,8 +28,8 @@ Future<MultipartFile> pickFile(
|
|||
);
|
||||
} else {
|
||||
final permission = await (fileType == FileType.image && Platform.isIOS
|
||||
? Permission.photos.status
|
||||
: Permission.storage.status);
|
||||
? Permission.photos.request()
|
||||
: Permission.storage.request());
|
||||
|
||||
if (permission == PermissionStatus.granted) {
|
||||
return _pickFile(
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import bitsdojo_window_macos
|
||||
import device_info_plus_macos
|
||||
import native_pdf_renderer
|
||||
import package_info
|
||||
|
|
@ -17,7 +16,6 @@ import sqflite
|
|||
import url_launcher_macos
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
BitsdojoWindowPlugin.register(with: registry.registrar(forPlugin: "BitsdojoWindowPlugin"))
|
||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||
NativePdfRendererPlugin.register(with: registry.registrar(forPlugin: "NativePdfRendererPlugin"))
|
||||
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
PODS:
|
||||
- bitsdojo_window_macos (0.0.1):
|
||||
- FlutterMacOS
|
||||
- device_info_plus_macos (0.0.1):
|
||||
- FlutterMacOS
|
||||
- FlutterMacOS (1.0.0)
|
||||
|
|
@ -31,7 +29,6 @@ PODS:
|
|||
- FlutterMacOS
|
||||
|
||||
DEPENDENCIES:
|
||||
- bitsdojo_window_macos (from `Flutter/ephemeral/.symlinks/plugins/bitsdojo_window_macos/macos`)
|
||||
- device_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos`)
|
||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||
- native_pdf_renderer (from `Flutter/ephemeral/.symlinks/plugins/native_pdf_renderer/macos`)
|
||||
|
|
@ -49,8 +46,6 @@ SPEC REPOS:
|
|||
- Sentry
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
bitsdojo_window_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/bitsdojo_window_macos/macos
|
||||
device_info_plus_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/device_info_plus_macos/macos
|
||||
FlutterMacOS:
|
||||
|
|
@ -73,7 +68,6 @@ EXTERNAL SOURCES:
|
|||
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
bitsdojo_window_macos: 7e9b1bbb09bdce418d9657ead7fc9d824203ff0d
|
||||
device_info_plus_macos: 1ad388a1ef433505c4038e7dd9605aadd1e2e9c7
|
||||
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
|
||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||
|
|
|
|||
|
|
@ -420,13 +420,13 @@
|
|||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 70;
|
||||
CURRENT_PROJECT_VERSION = 75;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 5.0.72;
|
||||
MARKETING_VERSION = 5.0.75;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
|
|
@ -548,13 +548,13 @@
|
|||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 70;
|
||||
CURRENT_PROJECT_VERSION = 75;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 5.0.72;
|
||||
MARKETING_VERSION = 5.0.75;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
|
@ -570,13 +570,13 @@
|
|||
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 70;
|
||||
CURRENT_PROJECT_VERSION = 75;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 5.0.72;
|
||||
MARKETING_VERSION = 5.0.75;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue