mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: add image block on mobile (#4230)
This commit is contained in:
@ -103,6 +103,7 @@ class FlowyRunner {
|
||||
// there's a flag named _enable in memory_leak_detector.dart. If it's false, the task will be ignored.
|
||||
MemoryLeakDetectorTask(),
|
||||
const DebugTask(),
|
||||
const DeviceInfoTask(),
|
||||
// localization
|
||||
const InitLocalizationTask(),
|
||||
// init the app window
|
||||
|
@ -0,0 +1,23 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
|
||||
import '../startup.dart';
|
||||
|
||||
class DeviceInfoTask extends LaunchTask {
|
||||
const DeviceInfoTask();
|
||||
|
||||
static int androidSDKVersion = -1;
|
||||
|
||||
@override
|
||||
Future<void> initialize(LaunchContext context) async {
|
||||
final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
||||
if (Platform.isAndroid) {
|
||||
final androidInfo = await deviceInfoPlugin.androidInfo;
|
||||
androidSDKVersion = androidInfo.version.sdkInt;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> dispose() async {}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
export 'app_widget.dart';
|
||||
export 'appflowy_cloud_task.dart';
|
||||
export 'debug_task.dart';
|
||||
export 'device_info_task.dart';
|
||||
export 'generate_router.dart';
|
||||
export 'hot_key.dart';
|
||||
export 'load_plugin.dart';
|
||||
|
Reference in New Issue
Block a user