mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
unify platform file name
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPlus/utils/platform_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// from Getx
|
||||
@@ -71,4 +72,10 @@ extension ContextExtensions on BuildContext {
|
||||
|
||||
/// True if the current device is Tablet
|
||||
bool get isTablet => isSmallTablet || isLargeTablet;
|
||||
|
||||
String get platformName => PlatformUtils.isDesktop
|
||||
? 'desktop'
|
||||
: isTablet
|
||||
? 'pad'
|
||||
: 'phone';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user