PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, June 29, 2022

[FIXED] How to link to another methods in dart comments

 June 29, 2022     comments, dart, documentation, flutter     No comments   

Issue

I was documenting my code and I wanted to link another method in the same file

I want to refer to that method in a comment so anyone reading my comment can directly jump to that method where my comment refers

Method where I am documenting and I want to link to a method named toggleFavorite in the same file

// To avoid code duplication in [toggleFavorite] method
  void _toogleFav(newStatus) {
    isFavorite = newStatus;
    notifyListeners();
  }

This is what my toggleFavorite returns in case you need it

Future<void> toggleFavorite() async {

What I want

Exactly I want this word in my comment [toggleFavorite] to work as a link when I press this I get redirected to this method wherever it is created or used


Solution

Use triple /// and [] around the method

  /// To avoid code duplication in [toggleFavorite] method
  void _toogleFav(newStatus) {
    isFavorite = newStatus;
    notifyListeners();
  }


Answered By - William Verhaeghe
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing