TfActionSetting class

操作设置项:点击后执行 onTap,不对应任何偏好,例如“退出登录”“清除缓存”。

TfActionSetting(
  title: '清除缓存',
  icon: Icons.cleaning_services_outlined,
  onTap: (context) async {
    if (await showTfConfirm(context, title: '清除缓存?')) await cache.clear();
  },
)
Inheritance

Constructors

TfActionSetting({required void onTap(BuildContext context), required String title, String? subtitle, IconData? icon, Widget? trailing})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
icon → IconData?
左侧图标(可选)。
finalinherited
leading → Widget?
由 icon 生成的左侧图标。
no setterinherited
onTap → void Function(BuildContext context)
点击时执行。
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subtitle → String?
副标题(可选)。
finalinherited
subtitleWidget → Widget?
由 subtitle 生成的副标题。
no setterinherited
title → String
标题。
finalinherited
trailing → Widget?
右侧控件(可选)。
final

Methods

build(BuildContext context, TfPreferencesController preferences) → Widget
构建这一行的界面,会被放在 TfSection 中。
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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