1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-01-17 13:38:38 +01:00

Merge pull request #3878 from Hiyorimi/patch-1

[dart/en-en] Updated example 8
This commit is contained in:
Max Schumacher 2020-07-07 15:34:25 +02:00 committed by GitHub
commit 9f622b2479
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,7 +198,7 @@ class GenericExample<T>{
/// or outside of class have to be constant. Strings and numbers are constant
/// by default. But arrays and maps are not. They can be made constant by
/// declaring them "const". Kind of similar to Javascript's Object.freeze()
const example8List = ["Example8 const array"],
const example8List = ["Example8 const array"];
const example8Map = {"someKey": "Example8 const map"};
/// Declare List or Maps as Objects.
List<String> explicitList = new List<String>();
@ -206,7 +206,6 @@ const example8Map = {"someKey": "Example8 const map"};
explicitList.add("SomeArray");
example8() {
print(example8Array[0]);
print(example8Map["someKey"]);
print(explicitList[0]);
}