asSafeType<T> method

T? asSafeType<T>()

检查类型并强转或返回空

Implementation

T? asSafeType<T>() => this is T ? this as T? : null;