Generic constructor

const Generic(
  1. Type _type, [
  2. String? _uri
])

Creates a Generic annotation instance.

Parameters:

  • _type: The base generic type (e.g., List for List<T>)
  • _uri: Optional source URI for better debugging

Throws:

Example:

@Generic(DataPipe, 'dart:async')
class DataPipe<T> {
  Stream<T> get stream => _controller.stream;
}

Implementation

const Generic(this._type, [this._uri]);