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.
25 lines
798 B
25 lines
798 B
import 'package:flutter/foundation.dart'; |
|
|
|
bool isMobile([TargetPlatform? targetPlatform]) { |
|
targetPlatform ??= defaultTargetPlatform; |
|
return {TargetPlatform.iOS, TargetPlatform.android}.contains(targetPlatform); |
|
} |
|
|
|
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); |
|
}
|
|
|