This file contains 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() { | |
final entity = Entity(); | |
print(entity is Disposable); | |
print(entity is Clonable); | |
print(entity is Comparable); | |
print(entity is BaseEntity); | |
// entity. | |
} |
This file contains 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() { | |
final CustomStorage storage = SqlCustomStorage(Engine()); | |
print(storage.runtimeType); | |
storage.foo(); | |
} | |
class CustomStorage { | |
final Engine engine; |
This file contains 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() { | |
final CustomStorage storage = CustomStorage(); | |
print(storage.runtimeType); | |
} | |
class CustomStorage { | |
Engine engine; | |
// todo: |
This file contains 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() { | |
var tommorrow = new DateTime(2021, 02, 25).add( | |
new Duration(days: 1), | |
); | |
print(tommorrow); | |
/// альтернативный вариант | |
tommorrow = DateTime(2021, 02, 25).add( | |
Duration(days: 1), |
This file contains 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() { | |
final myList = [1, 2, 3]; | |
final myMap = {'key': 10}; | |
print(myList is Iterable); | |
print(myMap.entries is Iterable); | |
for (var i = 0; i < myList.length; i++) { | |
print(myList[i]); | |
} |
This file contains 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() { | |
// for (final current in 'Hello World!') { | |
// print(current); | |
// } | |
// for (final current in StringIterable('Hello World!')) { | |
// print(current); | |
// } | |
} |
This file contains 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() { | |
final myList = [1, 2, 3]; | |
final myEmptyList = []; | |
print(myList.runtimeType); | |
print(myEmptyList.runtimeType); | |
final myMap = {'key': 10}; | |
final myEmptyMap = {}; | |
print(myMap.runtimeType); | |
print(myEmptyMap.runtimeType); |
This file contains 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() { | |
var someVariable = 365; | |
someVariable = 366; | |
const pi = 3.14159168; | |
pi = 3.14; | |
} |
This file contains 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
typedef LoggerFunction = void Function(String messaghe); | |
void main(List<String> arguments) { | |
void loggerFunction(String message) { | |
print(message); | |
} | |
loggerFunction('Hello World!!!'); | |
if (loggerFunction is Function) { |
This file contains 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(List<String> arguments) { | |
void loggerFunction(String message) { | |
print(message); | |
} | |
loggerFunction('Hello World!!!'); | |
if (loggerFunction is Function) { | |
print('mmm, loggerFunction is function'); |