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