Created
June 22, 2021 12:44
-
-
Save enginebai/c64bb75e45dd2247e2d8fd76db2e98c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Question extends StatelessWidget { | |
final String questionText; | |
Question(this.questionText); // 1. normal constructor | |
Question({this.questionText}); // 2. normal constuctor with named argument | |
Question.text(this.questionText); // 3. named constructor | |
Question.create({this.questionText}); // 4. named constructor with named argument | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment