diff --git a/example/ios/Flutter/.last_build_id b/example/ios/Flutter/.last_build_id index 5d3809be..8aba7787 100644 --- a/example/ios/Flutter/.last_build_id +++ b/example/ios/Flutter/.last_build_id @@ -1 +1 @@ -bdf1751976c4ee1e2ef7638eabcfd1ea \ No newline at end of file +bb5f9103d9045cd6244bcae1f5f343e5 \ No newline at end of file diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 842f471c..97971445 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,6 @@ name: example description: A new Flutter project. -version: 1.0.39+41 +version: 1.0.40+42 environment: sdk: ">=2.2.2 <3.0.0" diff --git a/lib/src/message_list_view.dart b/lib/src/message_list_view.dart index d2e1d972..6c23ea4b 100644 --- a/lib/src/message_list_view.dart +++ b/lib/src/message_list_view.dart @@ -107,8 +107,8 @@ class MessageListView extends StatefulWidget { this.onThreadTap, this.dateDividerBuilder, this.scrollPhysics = const AlwaysScrollableScrollPhysics(), - this.initialScrollIndex, - this.initialAlignment, + this.initialScrollIndex = 0, + this.initialAlignment = 0, this.scrollController, this.itemPositionListener, }) : super(key: key); @@ -608,8 +608,6 @@ class _MessageListViewState extends State { @override void initState() { - super.initState(); - _scrollController = widget.scrollController ?? ItemScrollController(); _itemPositionListener = widget.itemPositionListener ?? ItemPositionsListener.create(); @@ -644,6 +642,7 @@ class _MessageListViewState extends State { } _getOnThreadTap(); + super.initState(); } void _getOnThreadTap() {