body method
Defines the actual body code. path
is passed relative to lib
, baseName
is the filename, and className
is the filename converted to Pascal case.
実際の本体コードを定義します。path
にlib
からの相対パス、baseName
にファイル名が渡され、className
にファイル名をパスカルケースに変換した値が渡されます。
Implementation
@override
String body(String baseName, String className) {
return """
`ModelSearch`は下記のように利用する。
## 概要
$excerpt
## 作成方法
- 検索リストを定義
```dart
ModelSearch(["tag1", "tag2", "tag3"]);
```
## 検索リストの取得
```dart
final searchList = modelSearch.value;
```
## Jsonへの変換
```dart
final json = modelSearch.toJson();
```
## Jsonからの変換
```dart
final modelSearch = ModelSearch.fromJson(json);
```
""";
}