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
| void main() { | |
| print(formatByDigits(10000)); | |
| print(formatByDigits(9999)); | |
| print(formatByDigits(12000)); | |
| print(formatByDigits(12000000)); | |
| } | |
| String formatByDigits(int number) { | |
| final s = number.toString().split(''); | |
| return s.reversed |
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
| import 'package:flutter/material.dart'; | |
| import 'dart:async'; | |
| import 'package:meta/meta.dart'; | |
| const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
| void main() { | |
| runApp( | |
| const MyApp(), | |
| ); |
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
| import 'package:meta/meta.dart'; | |
| void main() { | |
| // iterates only first element. | |
| gen().first; | |
| print('Iterated first item because of first\n'); | |
| // iterates each element | |
| gen().toList(); | |
| print('Iterated List\n'); | |
| gen().last; |
NewerOlder