00.flutter:03.dart言語
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| 00.flutter:03.dart言語 [2020/03/29] – [Dartのコンストラクタ] adash333 | 00.flutter:03.dart言語 [2021/05/23] (現在) – [Sound null safety] adash333 | ||
|---|---|---|---|
| 行 2: | 行 2: | ||
| {{tag> | {{tag> | ||
| | | ||
| + | |||
| + | [[00.flutter: | ||
| Flutterでは、Dart言語というものを用いて記載します。 | Flutterでは、Dart言語というものを用いて記載します。 | ||
| 行 48: | 行 50: | ||
| Flutterのコードに、よく、 superとか、@overrideとか出てきます。 | Flutterのコードに、よく、 superとか、@overrideとか出てきます。 | ||
| - | + | [[https:// | |
| - | https:// | + | |
| コンストラクタ(英:constructor)とは | コンストラクタ(英:constructor)とは | ||
| オブジェクト指向プログラミング言語において、クラスからインスタンスを作成したタイミングで実行されるメソッドのこと | オブジェクト指向プログラミング言語において、クラスからインスタンスを作成したタイミングで実行されるメソッドのこと | ||
| - | だそうです。 | + | だそうです。つまり、 |
| クラスをnewした瞬間に実行される関数のこと | クラスをnewした瞬間に実行される関数のこと | ||
| 行 60: | 行 61: | ||
| だそうです。 | だそうです。 | ||
| - | [[https:// | + | クラス、プロパティ、メソッド、オブジェクトについては、[[00.javascript: |
| + | |||
| + | Dartでクラスを定義するときに、以下のように記載します。 | ||
| + | 引用元:[[https:// | ||
| + | |||
| + | < | ||
| + | // Dataクラスの定義 | ||
| + | class Data { | ||
| + | // _priceプロパティと_nameプロパティを定義 | ||
| + | int _price; | ||
| + | String _name; | ||
| + | |||
| + | // コンストラクタ、つまり、 | ||
| + | // Dataクラスがnewされて、 | ||
| + | // Dataクラスのインスタンスが作成されるときに | ||
| + | // 実行したい関数を記載 | ||
| + | Data(this._name, | ||
| + | |||
| + | |||
| + | @override | ||
| + | String toString() { | ||
| + | return _name + ':' | ||
| + | } | ||
| + | |||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | https:// | ||
| コンストラクタ(英:constructor)とは | コンストラクタ(英:constructor)とは | ||
| 行 66: | 行 96: | ||
| Dartでfinalなメンバ変数を初期化する方法のまとめ | Dartでfinalなメンバ変数を初期化する方法のまとめ | ||
| 2018/12/12 | 2018/12/12 | ||
| + | |||
| + | |||
| + | ===== Dartの文字列操作 ===== | ||
| + | https:// | ||
| + | Top 10 String utility methods you should know (Dart) | ||
| + | Jermaine Oppong | ||
| + | Aug 22, 2018 | ||
| + | |||
| + | |||
| + | https:// | ||
| + | String class | ||
| + | |||
| + | |||
| + | https:// | ||
| + | 文字列 – Dart逆引きリファレンス | ||
| + | 稲毛 透 | ||
| + | 2012.03.16 | ||
| + | →Dart1だけど参考になる | ||
| + | |||
| + | https:// | ||
| + | substring()関数 | ||
| + | < | ||
| + | var string = ' | ||
| + | string.substring(1); | ||
| + | string.substring(1, | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Sound null safety ===== | ||
| + | 2021年3月に、DartとFlutterがnull safetyに対応しましたが、依存している「全て」のパッケージがnull safetyに対応しないと、移行は困難です。 | ||
| + | |||
| + | https:// | ||
| + | Dart の Sound null safety を試してみる | ||
| + | 2020.11.20 | ||
| + | |||
| + | |||
| 行 79: | 行 145: | ||
| https:// | https:// | ||
| {{: | {{: | ||
| + | |||
| + | ===== Dart2入門のリンク ===== | ||
| + | https:// | ||
| + | 【Dart入門】基礎文法とサンプルコード集 | ||
| + | |||
| + | https:// | ||
| + | Chapter 02 | ||
| + | Day1: Dartの基礎1(変数・四則演算等) | ||
| + | fastriver | ||
| + | →具体的で分かりやすい | ||
| + | |||
| + | https:// | ||
| + | Chapter 06 | ||
| + | チュートリアル編4: | ||
| + | kazutxt | ||
| + | →どのような言語か概観の説明 | ||
| + | |||
00.flutter/03.dart言語.1585508442.txt.gz · 最終更新: 2020/03/29 by adash333
