どうも、ちょげ(@chogetarou)です。
Containerに点線の枠線をつける方法を紹介します。
方法

Containerに点線の枠線をつけるには、「dotted_border」パッケージを使います。
まず、「pubspec.yaml」でパッケージを追加します。
dependencies:
dotted_border: ^2.0.0+1
そして、該当ファイルでパッケージをインポートします。
import 'package:dotted_border/dotted_border.dart';
後は、ContainerをDottedBorderの引数「child」に指定するだけです。
DottedBorder(
child: Container(
width: 300,
height: 100,
),
),

これでContainerに点線の枠線をつけることが出来ます。
コメント