Reputation: 977
I changed something in my implementations and I want to mark some classes deprecated, so that they will use the new implementations instead.
How can I mark a class as deprecated in dart? For now I only document it as deprecated without actually marking the class or crossing it out.
/// 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 {}
Upvotes: 20
Views: 7103
Reputation: 977
Found it. Deprecated Classes
@Deprecated('Use [ConflictException]')
class AlreadyExistsException implements Exception {}
Upvotes: 50