Write the function repeatString that takes a String and an integer, and returns a String built by repeating the given String given number of times.
For example, one should be able to call
print(repeatString("*", 10));and get
| #!/bin/bash | |
| set -euo pipefail | |
| # Check for --skip-analyze flag | |
| SKIP_ANALYZE=false | |
| DO_RESTART=false | |
| for arg in "$@"; do | |
| case $arg in | |
| --skip-analyze) |
| // Adding this line so we can perform the variable assignment: num eachElement = 0; | |
| // ignore_for_file: unused_local_variable | |
| import 'dart:collection'; | |
| import 'dart:math'; | |
| void main(List<String> args) { | |
| final list = UnmodifiableListView( | |
| List<int>.generate(200000000, (index) => index), | |
| ); |
| import 'dart:async'; | |
| import 'package:async/async.dart'; | |
| import 'package:flutter/widgets.dart'; | |
| /* | |
| This class is a little bit different than the [ValueNotifier] class: | |
| - Setting the value ALWAYS notifies listeners, even if the value is the same. | |
| - It uses streams over [ValueListenableBuilder]'s setState approach to make it | |
| easier to use with other async code. |