Link constructor

const Link({
  1. required String to,
  2. required Widget child,
  3. Map<String, String>? params,
  4. URLSearchParams? query,
  5. Object? state,
  6. bool replace = false,
  7. bool enabled = true,
  8. VoidCallback? onTap,
  9. HitTestBehavior behavior = HitTestBehavior.deferToChild,
  10. Key? key,
})

Creates a navigation link.

Set enabled to false to disable interaction while preserving child.

Implementation

const Link({
  required this.to,
  required this.child,
  this.params,
  this.query,
  this.state,
  this.replace = false,
  this.enabled = true,
  this.onTap,
  this.behavior = HitTestBehavior.deferToChild,
  super.key,
});