elmox0818 / flutter_firebase_cookbook

0 stars 0 forks source link

../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/modal_bottom_sheet-0.2.2/lib/src/bottom_sheet.dart:303:43: Error: Too few positional arguments: 1 required, 0 given. #1

Open seoul2015 opened 3 years ago

seoul2015 commented 3 years ago

Zennのテキストを買ってgithubのファイルをダウンロードしましたが、 ../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/modal_bottom_sheet-0.2.2/lib/src/bottom_sheet.dart:303:43: Error: Too few positional arguments: 1 required, 0 given.


_velocityTracker = VelocityTracker();


../../../Developer/flutter/packages/flutter/lib/src/gestures/velocity_tracker.dart:152:3: Context: Found this candidate, but the arguments don't match.


VelocityTracker(this.kind);


FAILURE: Build failed with an exception.

こういうエラーが発生しております。 どうすれば解決ができましょうか

elmox0818 commented 3 years ago

@seoul2015

ご購入いただきありがとうございます。エラーメッセージで調べてみたところflutterあるいはmodal_bottom_sheetのバージョンによるものだという記述を発見しました。

https://github.com/jamesblasco/modal_bottom_sheet/issues/69 https://github.com/jamesblasco/modal_bottom_sheet/issues/83

解決方法としては

①Flutter, modal_bottom_sheetのパッケージを書籍のものと合わせる(GitHubからダウンロードされたとのことなのでFlutter側バージョンの差異の可能性が高いです) ②どちらも最新のものにする(不具合が解消されていることを期待) ③modal_bottom_sheetを使うことを諦める(Firebaseと直接関係しないため。modalを表示するような別のパッケージを検討)

のあたりになるでしょうか。以上ご検討いただければ幸いです。