実現したいこと
Containerの子にwrapを指定しているのですが、wrapの上部(添付した画像の「#鬼滅の刃」や「#ナルト」の上です)にだけなぞの余白が生まれます。(下部(「#ふたりエッチ」、「オヤジ拾いました」の下)には余白は生まれません。)
ありとあらゆるところに「padding: EdgeInsets.zero」をしていしたり、containerに「margin: EdgeInsets.zero」を指定してはいるのですが、全く変化ありません。
どうしたら上部にだけできた余白を消すことができるのでしょうか。
該当のソースコード
Dart
1Container( 2 color: Colors.amber, 3 alignment: Alignment.topCenter, //これも無駄でした 4 width: deviceWidth(context) * 0.98, //ここは無視してください 5 height: deviceHeight(context) * 0.2, //ここは無視してください 6 padding: EdgeInsets.zero, //無駄でした 7 child: Wrap( 8 spacing: deviceWidth(context) * 0.015, 9 runSpacing: -deviceHeight(context) * 0.0185, 10 clipBehavior: Clip.hardEdge, 11 children: [ 12 //ここより下でハッシュタグを生成しています 13 for (int index = 0; index < hashTagList.length; index++) ...{ 14 HashTagButton(key: UniqueKey(), hashTagText: hashTagList[index]), 15 } 16 ], 17 ), 18 );
補足情報(FW/ツールのバージョンなど)
[✓] Flutter (Channel stable, 3.7.10, on macOS 13.1 22C65 darwin-arm64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.73.0)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

回答1件
あなたの回答
tips
プレビュー