SystemUtils class

  • @Author: chuxiong
  • @Created at: 30-07-2025 17:47
  • @Email:
  • description

Constructors

SystemUtils.new()
factory

Properties

devicePixelRatio double
获取设备像素密度
no setter
hashCode int
The hash code for this object.
no setterinherited
获取导航栏高度
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenSize Size
获取屏幕尺寸
no setter
statusBarHeight double
获取状态栏高度
no setter

Methods

clearClientKeyboard() → void
清除数据
copyToClipboard(String text, {String? successMessage, String? errorMessage, BuildContext? context, Duration duration = const Duration(seconds: 1)}) Future<void>
拷贝文本内容到剪切板
getClipboardText() Future<String>
从剪贴板获取文本内容
hideKeyboard() → void
隐藏软键盘,具体可看:TextInputChannel
hideSystemUI() Future<void>
隐藏状态栏和导航栏
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAllOrientations() → void
允许所有屏幕方向
setLandscapeMode() → void
设置应用为横屏模式
setPortraitMode() → void
设置应用为竖屏模式
setSystemUIOverlayStyle({SystemUiOverlayStyle? style, Color? statusBarColor, Brightness? statusBarIconBrightness, Brightness? systemNavigationBarIconBrightness}) → void
设置状态栏和导航栏样式
showKeyboard() → void
展示软键盘,具体可看:TextInputChannel
showSystemUI() Future<void>
显示状态栏和导航栏
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited