【发布时间】:2020-06-27 17:07:58
【问题描述】:
我在我的实现中更改了一些内容,我想将一些类标记为已弃用,以便它们将使用新的实现。
如何在 dart 中将一个类标记为已弃用?目前,我只将其记录为已弃用,而没有实际标记该类或将其划掉。
/// Throws a BadRequestException - 400
class BadRequestException implements Exception {}
/// Throws a NotFoundException - 404
class NotFoundException implements Exception {}
/// Throws a ConflictException - 409
class ConflictException implements Exception {}
/// [DEPRECATED]
/// Don't use this anymore, this is deprecated.
class AlreadyExistsException implements Exception {}
【问题讨论】: