万年素人からHackerへの道

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

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

    Flutterのアコーディオンのメモ

    configurable_expansion_tile

    https://pub.dev/packages/configurable_expansion_tile

      // アコーディオン
      Widget _accordionWidget(
          BuildContext context, bool isWorking, String title, String body) {
        return ConfigurableExpansionTile(
          // 開いたときのヘッダ
          headerExpanded: Flexible(
            child: Row(
              mainAxisAlignment: MainAxisAlignment.start,
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                ImageUtil.loadImage('locations/working_clock'),
                const SizedBox(
                  width: 14,
                ),
                Flexible(
                  child: TextStyles.normalStyle(
                    body,
                    color: ColorNames.grey2,
                    fontSize: 14,
                  ),
                ),
              ],
            ),
          ),
          // 閉じた時
          header: Flexible(
            child: Row(
              children: <Widget>[
                ImageUtil.loadImage('locations/working_clock'),
                const SizedBox(
                  width: 14,
                ),
                isWorking
                    ? TextStyles.boldStyle(
                        // 営業中
                        S.of(context).restaurantDetailOpen,
                        color: ColorNames.shopGreen,
                        fontSize: 14,
                      )
                    : TextStyles.boldStyle(
                        // 閉店中
                        S.of(context).restaurantDetailClose,
                        color: ColorNames.red,
                        fontSize: 14,
                      ),
                const SizedBox(
                  width: 8,
                ),
                Expanded(
                  child: TextStyles.normalStyle(
                    title,
                    color: ColorNames.grey2,
                    fontSize: 14,
                  ),
                ),
                // 開く下向き<
                ImageUtil.loadImage('locations/arrow_up'),
              ],
            ),
          ),
        );
      }