[英]How to right Side Border to a Container in flutter
How can one add right Side Border to a Container in flutter?.如何在 flutter 中为容器添加右侧边框?
Since you have not provided us with any code and any clear explanation on what you want, so I am going to assume you just want a right border of a container to be visible.由于您没有向我们提供任何代码和任何关于您想要什么的明确解释,所以我假设您只希望容器的右边框可见。
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Container(
height: 100,
width: 100,
decoration: BoxDecoration(
border: Border(
right: BorderSide( // <--- right side
color: Colors.black,
width: 3.0,
),
)
),
child: Center(
child: Text("TEXT")
)
)
),
);
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.