opt cm FittedBox
This commit is contained in:
parent
b9d1eb0dd1
commit
72655b528a
@ -109,6 +109,8 @@ class ConnectionManager extends StatelessWidget {
|
|||||||
Widget buildConnectionCard(MapEntry<int, Client> entry) {
|
Widget buildConnectionCard(MapEntry<int, Client> entry) {
|
||||||
final client = entry.value;
|
final client = entry.value;
|
||||||
return Column(
|
return Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
key: ValueKey(entry.key),
|
key: ValueKey(entry.key),
|
||||||
children: [
|
children: [
|
||||||
_CmHeader(client: client),
|
_CmHeader(client: client),
|
||||||
@ -212,14 +214,14 @@ class _CmHeaderState extends State<_CmHeader>
|
|||||||
children: [
|
children: [
|
||||||
// icon
|
// icon
|
||||||
Container(
|
Container(
|
||||||
width: 100,
|
width: 90,
|
||||||
height: 100,
|
height: 90,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(color: str2color(client.name)),
|
decoration: BoxDecoration(color: str2color(client.name)),
|
||||||
child: Text(
|
child: Text(
|
||||||
"${client.name[0]}",
|
"${client.name[0]}",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, color: Colors.white, fontSize: 75),
|
fontWeight: FontWeight.bold, color: Colors.white, fontSize: 65),
|
||||||
),
|
),
|
||||||
).marginOnly(left: 4.0, right: 8.0),
|
).marginOnly(left: 4.0, right: 8.0),
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -227,7 +229,8 @@ class _CmHeaderState extends State<_CmHeader>
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
FittedBox(
|
||||||
|
child: Text(
|
||||||
"${client.name}",
|
"${client.name}",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: MyTheme.cmIdColor,
|
color: MyTheme.cmIdColor,
|
||||||
@ -236,19 +239,22 @@ class _CmHeaderState extends State<_CmHeader>
|
|||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
),
|
)),
|
||||||
Text("(${client.peerId})",
|
FittedBox(
|
||||||
style: TextStyle(color: MyTheme.cmIdColor, fontSize: 14)),
|
child: Text("(${client.peerId})",
|
||||||
|
style:
|
||||||
|
TextStyle(color: MyTheme.cmIdColor, fontSize: 14))),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 16.0,
|
height: 16.0,
|
||||||
),
|
),
|
||||||
Row(
|
FittedBox(
|
||||||
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text("${translate("Connected")}").marginOnly(right: 8.0),
|
Text("${translate("Connected")}").marginOnly(right: 8.0),
|
||||||
Obx(() => Text(
|
Obx(() => Text(
|
||||||
"${formatDurationToTime(Duration(seconds: _time.value))}"))
|
"${formatDurationToTime(Duration(seconds: _time.value))}"))
|
||||||
],
|
],
|
||||||
)
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -315,7 +321,8 @@ class _PrivilegeBoardState extends State<_PrivilegeBoard> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 8.0,
|
height: 8.0,
|
||||||
),
|
),
|
||||||
Row(
|
FittedBox(
|
||||||
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
buildPermissionIcon(client.keyboard, iconKeyboard, (enabled) {
|
buildPermissionIcon(client.keyboard, iconKeyboard, (enabled) {
|
||||||
bind.cmSwitchPermission(
|
bind.cmSwitchPermission(
|
||||||
@ -353,7 +360,7 @@ class _PrivilegeBoardState extends State<_PrivilegeBoard> {
|
|||||||
});
|
});
|
||||||
}, null),
|
}, null),
|
||||||
],
|
],
|
||||||
),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user