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
// wrike.commons | |
class SymbolResolvedValue { | |
String name; | |
Symbol symbol; | |
SymbolResolvedValue(this.name, this.symbol); | |
} | |
I model<T, I extends T>(I model) => model; | |
SymbolResolvedValue resolve(dynamic resolved) => resolved as SymbolResolvedValue; | |
Symbol symbolOf(dynamic resolved) => (resolved as SymbolResolvedValue).symbol; |
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
String nameOf(dynamic model, dynamic resolved) => (resolved as SymbolResolvedValue).name; | |
SymbolResolvedValue resolve(dynamic model, dynamic resolved) => resolved as SymbolResolvedValue; | |
Symbol symbolOf(dynamic model, dynamic resolved) => (resolved as SymbolResolvedValue).symbol; | |
class SymbolResolvedValue { | |
String name; | |
Symbol symbol; | |
SymbolResolvedValue(this.name, this.symbol); |
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
import 'dart:async'; | |
import 'dart:io'; | |
import 'package:path/path.dart'; | |
main(List<String> arguments) async { | |
Stream<FileSystemEntity> entityList = Directory.current.list(recursive: true, followLinks: false); | |
Set types = new Set(); | |
await for (FileSystemEntity entity in entityList) { | |
FileSystemEntityType type = await FileSystemEntity.type(entity.path); |
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
import 'package:flutter/material.dart'; | |
import 'dart:math'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: MyHomePage(), |
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
import 'package:flutter/material.dart'; | |
import 'dart:async'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: MyHomePage(), |
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
// Copyright 2019 The Flutter team. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); |
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
import 'package:flutter/material.dart'; | |
// Copyright 2019-present the Flutter authors. All Rights Reserved. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software |
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. | |
Во вкладке solution мы можете увидеть решение проблемы с неявно заданной сигнатурой коллбек функции. |
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
Подумайте, как можно было бы упростить метод build()? | |
Попробуйте самостоятельно или посмотрите solution |
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
/// | |
/// Flutter Mobile Developer | |
/// Strings | |
/// https://api.dart.dev/stable/2.10.1/dart-core/String-class.html | |
void main() { | |
// что насчет объявления строк? | |
final currentDateString = 'Current Date is ' + DateTime.now().toString(); | |
print(currentDateString); |
OlderNewer