/// /// Flutter Mobile Developer /// "Conditional member access" or "null safe" operator /// Still actual but keep in the mind /// https://nullsafety.dartpad.dev/ ///
class Address { String postalCode; }
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: MyHomePage(), | |
); |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: MyHomePage(), | |
); |
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(), |
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(), |
// 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()); |
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 |
Попробуйте задать явным образом тип коллбек-функции с использованием typedef. | |
Во вкладке solution мы можете увидеть решение проблемы с неявно заданной сигнатурой коллбек функции. |
Подумайте, как можно было бы упростить метод build()? | |
Попробуйте самостоятельно или посмотрите solution |
/// /// Flutter Mobile Developer /// "Conditional member access" or "null safe" operator /// Still actual but keep in the mind /// https://nullsafety.dartpad.dev/ ///
class Address { String postalCode; }
/// | |
/// 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); |