Flutter Dart Add Single Line Multiple Line Comments Syntax Example

Comments are the way to explain code using simple text which cannot be readable by programming language compiler. We have seen comments in many programming languages and used by millions of programmers to make programming easier for himself and other programmers. For every programmer beginner or pro it is must to learn about comments. So in this tutorial we would learn about Flutter Dart Add Single Line Multiple Line Comments Syntax Android iOS Android Studio Visual Studio Code Example Tutorial.

Contents in this project Flutter Dart Add Single Line Multiple Line Comments Syntax Android iOS Android Studio Visual Studio Code Example:

1. Using Double Forward Slash ( // ) :- The First method to add comment in Flutter Dart is commenting single line only. So to make single line as comment we would use Double forward Slash at the beginning of that particular line.

Example:

2. Using Forward Sign with Asterisk Sign ( /* * / ) :- This is another method to add comments in dart flutter. Using forward slash and Asterisk sign we can comment multiple lines together in flutter dart. In below code the complete Container widget along with Raised Button widget will be written as comment.

Example:

 

Leave a Reply

Your email address will not be published. Required fields are marked *