dartlangeditorflutterflutter-appsflutter-examplesflutter-packageflutter-widgetquillquill-deltaquilljsreactquillrich-textrich-text-editorwysiwygwysiwyg-editor
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
798 B
26 lines
798 B
3 years ago
|
import 'package:flutter/foundation.dart';
|
||
3 years ago
|
|
||
3 years ago
|
bool isMobile([TargetPlatform? targetPlatform]) {
|
||
|
targetPlatform ??= defaultTargetPlatform;
|
||
|
return {TargetPlatform.iOS, TargetPlatform.android}.contains(targetPlatform);
|
||
|
}
|
||
|
|
||
3 years ago
|
bool isDesktop([TargetPlatform? targetPlatform]) {
|
||
|
targetPlatform ??= defaultTargetPlatform;
|
||
|
return {TargetPlatform.macOS, TargetPlatform.linux, TargetPlatform.windows}
|
||
|
.contains(targetPlatform);
|
||
|
}
|
||
|
|
||
|
bool isKeyboardOS([TargetPlatform? targetPlatform]) {
|
||
|
targetPlatform ??= defaultTargetPlatform;
|
||
|
return isDesktop(targetPlatform) || targetPlatform == TargetPlatform.fuchsia;
|
||
|
}
|
||
|
|
||
|
bool isAppleOS([TargetPlatform? targetPlatform]) {
|
||
|
targetPlatform ??= defaultTargetPlatform;
|
||
|
return {
|
||
|
TargetPlatform.macOS,
|
||
|
TargetPlatform.iOS,
|
||
|
}.contains(targetPlatform);
|
||
|
}
|