Flutter uses the two-colored warning Containers when a Renderflex is overflowing. However is it possible to color the border of a Container in that way in my flutter app?
Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.yellow .... Colors.black) <--- somehow (?)
),
child: Text('My border')
}
You can do this with Gradient or Custom Paint. There is an example like that
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.