カスタム client-followup-detail (home.html 内) にクライアントをパラメーターとして送信し、その情報を "client_followup_detail.html" に表示しますが、"client_followup_detail.dart" からクライアント属性にアクセスしようとすると、例外が発生します。
home.html
<template repeat="{{index in extraTabsIndex}}">
<template if="{{activeTab == index}}">
<div class="tab-pane fade in active">
<p>
<client-followup-detail client="{{clientSelect}}"></client-followup-detail>
</p>
</div>
</template>
client_followup_detail.html
<td>{{client.state}}</td>
<td>{{client.cellphone}}</td>
<td>{{client.lastContactDate}}</td>
client_followup_detail.dart
@published Client client;
ClientFollowupDetail.created() : super.created() {
eventBus = getInstanceEventBus();
print(client.names); // client null
}
エラー:
Exception: The null object does not have a getter 'names'.
NoSuchMethodError : method not found: 'names'
Receiver: null
Arguments: []