RpcRemoved class

Marks an inherited RPC method as removed in this contract version.

The generator produces a @Deprecated + throw UnsupportedError implementation so callers get a compile-time warning and a clear runtime error if the method is still invoked.

Usage:

@RpcService(name: 'MyService.v4')
abstract class IMyServiceV4 implements IMyServiceV3 {
  @RpcRemoved('Use newMethod() instead')
  @override
  Future<OldResponse> oldMethod(OldRequest request, {RpcContext? context});
}

Constructors

RpcRemoved([String message = 'This method has been removed.'])
Creates an RpcRemoved annotation with an optional message.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
message → String
Explanation shown in the deprecation warning and runtime error.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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