万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

  • ・資産運用おすすめ
    10万円は1000円くらい利益
    資産運用ブログ アセマネ
    • ・寄付お願いします
      YENTEN:YYzNPzdsZWqr5THWAdMrKDj7GT8ietDc2W
      BitZenny:ZfpUbVya8MWQkjjGJMjA7P9pPkqaLnwPWH
      c0ban:8KG95GXdEquNpPW8xJAJf7nn5kbimQ5wj1
      Skycoin:KMqcn7x8REwwzMHPi9fV9fbNwdofYAWKRo

    Flutterのエラー 実機ビルドで発生

    実機ビルドで発生 しかし、SimulatorではOKだった。

    以下のように@requiredだとエラーになる VSCode上の話

    class DatePickerComponent extends StatelessWidget {
      const DatePickerComponent({
        Key key,
        @required this.setMonth,
        @required this.setDate,
        @required this.setYear,
        @required this.themeData,
        @required this.scrollController,
      }) : super(key: key);
      final Function setMonth;

    同じ現象

    https://github.com/dart-lang/sdk/issues/27788

    ちなみにコンソール上はこれ。

        === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
        Building AOT snapshot in debug mode (ios)...
        compiler message: lib/date_picker.dart:22:6: Error: Getter not found: 'required'.
        compiler message:     @required this.setMonth,

    よく分からんが、単純に@requiredを取るとビルドは行けた ただし、以下のエラーがコンソール上に

    Traceback (most recent call last):
      File "<input>", line 1, in <module>
      File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 52, in <module>
        import weakref
      File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 14, in <module>
        from _weakref import (
    ImportError: cannot import name _remove_dead_weakref