diff --git a/README.md b/README.md
deleted file mode 100644
index 2b28a92..0000000
--- a/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-### Guide
-
-Fork this repo, and add/fix the missing code in [/bin/dart_application_1.dart](/bin/dart_application_1.dart)
-
-
-
diff --git a/bin/dart_application_1.dart b/bin/dart_application_1.dart
index 2404519..7574465 100644
--- a/bin/dart_application_1.dart
+++ b/bin/dart_application_1.dart
@@ -17,27 +17,36 @@ class View {
}
}
+class Text extends View {
+ String content;
+ Text(int id, this.content, {Color? color}) : super(id, color: color);
+}
+
void main() {
- /*
- 1) Create class named `Text` that extends/inherits `View` class,
- and has a `String content` property.
- Here is the Text constuctor:
- Text(int id, this.content, {Color? color}) : super(id, color: color)
- 2) Create new `Text` object with the following:
- var helloText = Text(, content: 'Hello' )
- */
+
int id = Random().nextInt(10000);
-
- print('hello: $helloText');
+ var helloText = Text(id, "hussain alyasiry");
+
+ print('Hello: $helloText');
+ //the output is Hello: 7303
+ // it changes with every run
+ task2();
+ // for printing the evennumbers
}
void task2() {
List numbers = List.generate(75, (index) => Random().nextInt(10000));
+ List evenNumbers = [];
- /*
- Separate even numbers from the above `numbers` list.
- List evenNumbers = ...
- */
+
+
+ for (final i in numbers) {
+ if (i.isEven) {
+ evenNumbers.add(i);
+ }
+ }
print('evenNumbers: $evenNumbers');
+ // the output is evenNumbers: [5846, 7814, 3402, 7126, 880, 5084, 2842, 9076, 2786, 6628, 6, 1666, 7590, 4504, 7796, 9400, 5784, 8048, 7962, 4236, 7318, 6112, 640, 5404, 9790, 9008, 1928, 388, 5942, 4250, 8156, 9284, 3154, 5408]
+ // and it changes with every run
}
diff --git a/errors_in_dart_application_1.dart.png b/errors_in_dart_application_1.dart.png
deleted file mode 100644
index bf239c7..0000000
Binary files a/errors_in_dart_application_1.dart.png and /dev/null differ