Android server_page.dart fix verificationMethod onSelected color & follow lint
This commit is contained in:
parent
6f92edca5c
commit
e0302de808
@ -12,51 +12,50 @@ class ServerPage extends StatefulWidget implements PageShape {
|
|||||||
final title = translate("Share Screen");
|
final title = translate("Share Screen");
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final icon = Icon(Icons.mobile_screen_share);
|
final icon = const Icon(Icons.mobile_screen_share);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final appBarActions = [
|
final appBarActions = [
|
||||||
PopupMenuButton<String>(
|
PopupMenuButton<String>(
|
||||||
icon: Icon(Icons.more_vert),
|
icon: const Icon(Icons.more_vert),
|
||||||
itemBuilder: (context) {
|
itemBuilder: (context) {
|
||||||
return [
|
return [
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
child: Text(translate("Change ID")),
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.0),
|
|
||||||
value: "changeID",
|
value: "changeID",
|
||||||
enabled: false,
|
enabled: false,
|
||||||
|
child: Text(translate("Change ID")),
|
||||||
),
|
),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
child: Text(translate("Set permanent password")),
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.0),
|
|
||||||
value: "setPermanentPassword",
|
value: "setPermanentPassword",
|
||||||
enabled:
|
enabled:
|
||||||
gFFI.serverModel.verificationMethod != kUseTemporaryPassword,
|
gFFI.serverModel.verificationMethod != kUseTemporaryPassword,
|
||||||
|
child: Text(translate("Set permanent password")),
|
||||||
),
|
),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
child: Text(translate("Set temporary password length")),
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.0),
|
|
||||||
value: "setTemporaryPasswordLength",
|
value: "setTemporaryPasswordLength",
|
||||||
enabled:
|
enabled:
|
||||||
gFFI.serverModel.verificationMethod != kUsePermanentPassword,
|
gFFI.serverModel.verificationMethod != kUsePermanentPassword,
|
||||||
|
child: Text(translate("Set temporary password length")),
|
||||||
),
|
),
|
||||||
const PopupMenuDivider(),
|
const PopupMenuDivider(),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 0.0),
|
padding: const EdgeInsets.symmetric(horizontal: 0.0),
|
||||||
value: kUseTemporaryPassword,
|
value: kUseTemporaryPassword,
|
||||||
child: Container(
|
child: ListTile(
|
||||||
child: ListTile(
|
title: Text(translate("Use temporary password")),
|
||||||
title: Text(translate("Use temporary password")),
|
trailing: Icon(
|
||||||
trailing: Icon(
|
Icons.check,
|
||||||
Icons.check,
|
color: gFFI.serverModel.verificationMethod ==
|
||||||
color: gFFI.serverModel.verificationMethod ==
|
kUseTemporaryPassword
|
||||||
kUseTemporaryPassword
|
? null
|
||||||
? null
|
: Colors.transparent,
|
||||||
: Color(0xFFFFFFFF),
|
)),
|
||||||
))),
|
|
||||||
),
|
),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 0.0),
|
padding: const EdgeInsets.symmetric(horizontal: 0.0),
|
||||||
value: kUsePermanentPassword,
|
value: kUsePermanentPassword,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
title: Text(translate("Use permanent password")),
|
title: Text(translate("Use permanent password")),
|
||||||
@ -65,11 +64,11 @@ class ServerPage extends StatefulWidget implements PageShape {
|
|||||||
color: gFFI.serverModel.verificationMethod ==
|
color: gFFI.serverModel.verificationMethod ==
|
||||||
kUsePermanentPassword
|
kUsePermanentPassword
|
||||||
? null
|
? null
|
||||||
: Color(0xFFFFFFFF),
|
: Colors.transparent,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 0.0),
|
padding: const EdgeInsets.symmetric(horizontal: 0.0),
|
||||||
value: kUseBothPasswords,
|
value: kUseBothPasswords,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
title: Text(translate("Use both passwords")),
|
title: Text(translate("Use both passwords")),
|
||||||
@ -80,7 +79,7 @@ class ServerPage extends StatefulWidget implements PageShape {
|
|||||||
gFFI.serverModel.verificationMethod !=
|
gFFI.serverModel.verificationMethod !=
|
||||||
kUsePermanentPassword
|
kUsePermanentPassword
|
||||||
? null
|
? null
|
||||||
: Color(0xFFFFFFFF),
|
: Colors.transparent,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
@ -101,6 +100,8 @@ class ServerPage extends StatefulWidget implements PageShape {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
ServerPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<StatefulWidget> createState() => _ServerPageState();
|
State<StatefulWidget> createState() => _ServerPageState();
|
||||||
}
|
}
|
||||||
@ -125,9 +126,9 @@ class _ServerPageState extends State<ServerPage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
ServerInfo(),
|
ServerInfo(),
|
||||||
PermissionChecker(),
|
const PermissionChecker(),
|
||||||
ConnectionManager(),
|
const ConnectionManager(),
|
||||||
SizedBox.fromSize(size: Size(0, 15.0)),
|
SizedBox.fromSize(size: const Size(0, 15.0)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -148,6 +149,8 @@ class ServerInfo extends StatelessWidget {
|
|||||||
final model = gFFI.serverModel;
|
final model = gFFI.serverModel;
|
||||||
final emptyController = TextEditingController(text: "-");
|
final emptyController = TextEditingController(text: "-");
|
||||||
|
|
||||||
|
ServerInfo({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final isPermanent = model.verificationMethod == kUsePermanentPassword;
|
final isPermanent = model.verificationMethod == kUsePermanentPassword;
|
||||||
@ -158,7 +161,7 @@ class ServerInfo extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
TextFormField(
|
TextFormField(
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 25.0,
|
fontSize: 25.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: MyTheme.accent),
|
color: MyTheme.accent),
|
||||||
@ -166,14 +169,14 @@ class ServerInfo extends StatelessWidget {
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: const Icon(Icons.perm_identity),
|
icon: const Icon(Icons.perm_identity),
|
||||||
labelText: translate("ID"),
|
labelText: translate("ID"),
|
||||||
labelStyle: TextStyle(
|
labelStyle: const TextStyle(
|
||||||
fontWeight: FontWeight.bold, color: MyTheme.accent50),
|
fontWeight: FontWeight.bold, color: MyTheme.accent50),
|
||||||
),
|
),
|
||||||
onSaved: (String? value) {},
|
onSaved: (String? value) {},
|
||||||
),
|
),
|
||||||
TextFormField(
|
TextFormField(
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 25.0,
|
fontSize: 25.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: MyTheme.accent),
|
color: MyTheme.accent),
|
||||||
@ -181,7 +184,7 @@ class ServerInfo extends StatelessWidget {
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: const Icon(Icons.lock),
|
icon: const Icon(Icons.lock),
|
||||||
labelText: translate("Password"),
|
labelText: translate("Password"),
|
||||||
labelStyle: TextStyle(
|
labelStyle: const TextStyle(
|
||||||
fontWeight: FontWeight.bold, color: MyTheme.accent50),
|
fontWeight: FontWeight.bold, color: MyTheme.accent50),
|
||||||
suffix: isPermanent
|
suffix: isPermanent
|
||||||
? null
|
? null
|
||||||
@ -200,13 +203,13 @@ class ServerInfo extends StatelessWidget {
|
|||||||
Center(
|
Center(
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.warning_amber_sharp,
|
const Icon(Icons.warning_amber_sharp,
|
||||||
color: Colors.redAccent, size: 24),
|
color: Colors.redAccent, size: 24),
|
||||||
SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
translate("Service is not running"),
|
translate("Service is not running"),
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'WorkSans',
|
fontFamily: 'WorkSans',
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
@ -215,11 +218,11 @@ class ServerInfo extends StatelessWidget {
|
|||||||
))
|
))
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
SizedBox(height: 5),
|
const SizedBox(height: 5),
|
||||||
Center(
|
Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
translate("android_start_service_tip"),
|
translate("android_start_service_tip"),
|
||||||
style: TextStyle(fontSize: 12, color: MyTheme.darkGray),
|
style: const TextStyle(fontSize: 12, color: MyTheme.darkGray),
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
@ -227,8 +230,10 @@ class ServerInfo extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class PermissionChecker extends StatefulWidget {
|
class PermissionChecker extends StatefulWidget {
|
||||||
|
const PermissionChecker({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_PermissionCheckerState createState() => _PermissionCheckerState();
|
State<PermissionChecker> createState() => _PermissionCheckerState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _PermissionCheckerState extends State<PermissionChecker> {
|
class _PermissionCheckerState extends State<PermissionChecker> {
|
||||||
@ -236,7 +241,7 @@ class _PermissionCheckerState extends State<PermissionChecker> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final serverModel = Provider.of<ServerModel>(context);
|
final serverModel = Provider.of<ServerModel>(context);
|
||||||
final hasAudioPermission = androidVersion >= 30;
|
final hasAudioPermission = androidVersion >= 30;
|
||||||
final status;
|
final String status;
|
||||||
if (serverModel.connectStatus == -1) {
|
if (serverModel.connectStatus == -1) {
|
||||||
status = 'not_ready_status';
|
status = 'not_ready_status';
|
||||||
} else if (serverModel.connectStatus == 0) {
|
} else if (serverModel.connectStatus == 0) {
|
||||||
@ -260,9 +265,9 @@ class _PermissionCheckerState extends State<PermissionChecker> {
|
|||||||
serverModel.toggleAudio)
|
serverModel.toggleAudio)
|
||||||
: Text(
|
: Text(
|
||||||
"* ${translate("android_version_audio_tip")}",
|
"* ${translate("android_version_audio_tip")}",
|
||||||
style: TextStyle(color: MyTheme.darkGray),
|
style: const TextStyle(color: MyTheme.darkGray),
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@ -273,11 +278,11 @@ class _PermissionCheckerState extends State<PermissionChecker> {
|
|||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
MaterialStateProperty.all(Colors.red)),
|
MaterialStateProperty.all(Colors.red)),
|
||||||
icon: Icon(Icons.stop),
|
icon: const Icon(Icons.stop),
|
||||||
onPressed: serverModel.toggleService,
|
onPressed: serverModel.toggleService,
|
||||||
label: Text(translate("Stop service")))
|
label: Text(translate("Stop service")))
|
||||||
: ElevatedButton.icon(
|
: ElevatedButton.icon(
|
||||||
icon: Icon(Icons.play_arrow),
|
icon: const Icon(Icons.play_arrow),
|
||||||
onPressed: serverModel.toggleService,
|
onPressed: serverModel.toggleService,
|
||||||
label: Text(translate("Start Service")))),
|
label: Text(translate("Start Service")))),
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -287,8 +292,8 @@ class _PermissionCheckerState extends State<PermissionChecker> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
flex: 0,
|
flex: 0,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsets.only(
|
||||||
EdgeInsets.only(left: 20, right: 5),
|
left: 20, right: 5),
|
||||||
child: Icon(Icons.circle,
|
child: Icon(Icons.circle,
|
||||||
color: serverModel.connectStatus > 0
|
color: serverModel.connectStatus > 0
|
||||||
? Colors.greenAccent
|
? Colors.greenAccent
|
||||||
@ -297,12 +302,12 @@ class _PermissionCheckerState extends State<PermissionChecker> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: Text(translate(status),
|
child: Text(translate(status),
|
||||||
softWrap: true,
|
softWrap: true,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
color: MyTheme.accent50)))
|
color: MyTheme.accent50)))
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: SizedBox.shrink())
|
: const SizedBox.shrink())
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -311,7 +316,8 @@ class _PermissionCheckerState extends State<PermissionChecker> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class PermissionRow extends StatelessWidget {
|
class PermissionRow extends StatelessWidget {
|
||||||
PermissionRow(this.name, this.isOk, this.onPressed);
|
const PermissionRow(this.name, this.isOk, this.onPressed, {Key? key})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
final String name;
|
final String name;
|
||||||
final bool isOk;
|
final bool isOk;
|
||||||
@ -327,8 +333,8 @@ class PermissionRow extends StatelessWidget {
|
|||||||
fit: BoxFit.scaleDown,
|
fit: BoxFit.scaleDown,
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(name,
|
child: Text(name,
|
||||||
style:
|
style: const TextStyle(
|
||||||
TextStyle(fontSize: 16.0, color: MyTheme.accent50)))),
|
fontSize: 16.0, color: MyTheme.accent50)))),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 2,
|
||||||
child: FittedBox(
|
child: FittedBox(
|
||||||
@ -347,7 +353,7 @@ class PermissionRow extends StatelessWidget {
|
|||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
child: Text(
|
child: Text(
|
||||||
translate(isOk ? "CLOSE" : "OPEN"),
|
translate(isOk ? "CLOSE" : "OPEN"),
|
||||||
style: TextStyle(fontWeight: FontWeight.bold),
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
)))),
|
)))),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -355,6 +361,8 @@ class PermissionRow extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class ConnectionManager extends StatelessWidget {
|
class ConnectionManager extends StatelessWidget {
|
||||||
|
const ConnectionManager({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final serverModel = Provider.of<ServerModel>(context);
|
final serverModel = Provider.of<ServerModel>(context);
|
||||||
@ -377,7 +385,7 @@ class ConnectionManager extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
flex: -1,
|
flex: -1,
|
||||||
child: client.isFileTransfer || !client.authorized
|
child: client.isFileTransfer || !client.authorized
|
||||||
? SizedBox.shrink()
|
? const SizedBox.shrink()
|
||||||
: IconButton(
|
: IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
gFFI.chatModel.changeCurrentID(client.id);
|
gFFI.chatModel.changeCurrentID(client.id);
|
||||||
@ -388,24 +396,24 @@ class ConnectionManager extends StatelessWidget {
|
|||||||
bar.onTap!(1);
|
bar.onTap!(1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: const Icon(
|
||||||
Icons.chat,
|
Icons.chat,
|
||||||
color: MyTheme.accent80,
|
color: MyTheme.accent80,
|
||||||
)))
|
)))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
client.authorized
|
client.authorized
|
||||||
? SizedBox.shrink()
|
? const SizedBox.shrink()
|
||||||
: Text(
|
: Text(
|
||||||
translate("android_new_connection_tip"),
|
translate("android_new_connection_tip"),
|
||||||
style: TextStyle(color: Colors.black54),
|
style: const TextStyle(color: Colors.black54),
|
||||||
),
|
),
|
||||||
client.authorized
|
client.authorized
|
||||||
? ElevatedButton.icon(
|
? ElevatedButton.icon(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
MaterialStateProperty.all(Colors.red)),
|
MaterialStateProperty.all(Colors.red)),
|
||||||
icon: Icon(Icons.close),
|
icon: const Icon(Icons.close),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
bind.cmCloseConnection(connId: client.id);
|
bind.cmCloseConnection(connId: client.id);
|
||||||
gFFI.invokeMethod(
|
gFFI.invokeMethod(
|
||||||
@ -418,7 +426,7 @@ class ConnectionManager extends StatelessWidget {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
serverModel.sendLoginResponse(client, false);
|
serverModel.sendLoginResponse(client, false);
|
||||||
}),
|
}),
|
||||||
SizedBox(width: 20),
|
const SizedBox(width: 20),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
child: Text(translate("Accept")),
|
child: Text(translate("Accept")),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@ -432,7 +440,8 @@ class ConnectionManager extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class PaddingCard extends StatelessWidget {
|
class PaddingCard extends StatelessWidget {
|
||||||
PaddingCard({required this.child, this.title, this.titleIcon});
|
const PaddingCard({Key? key, required this.child, this.title, this.titleIcon})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
final String? title;
|
final String? title;
|
||||||
final IconData? titleIcon;
|
final IconData? titleIcon;
|
||||||
@ -445,18 +454,18 @@ class PaddingCard extends StatelessWidget {
|
|||||||
children.insert(
|
children.insert(
|
||||||
0,
|
0,
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.0),
|
padding: const EdgeInsets.symmetric(vertical: 5.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
titleIcon != null
|
titleIcon != null
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: EdgeInsets.only(right: 10),
|
padding: const EdgeInsets.only(right: 10),
|
||||||
child: Icon(titleIcon,
|
child: Icon(titleIcon,
|
||||||
color: MyTheme.accent80, size: 30))
|
color: MyTheme.accent80, size: 30))
|
||||||
: SizedBox.shrink(),
|
: const SizedBox.shrink(),
|
||||||
Text(
|
Text(
|
||||||
title!,
|
title!,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'WorkSans',
|
fontFamily: 'WorkSans',
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
@ -466,12 +475,13 @@ class PaddingCard extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
return Container(
|
return SizedBox(
|
||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
child: Card(
|
child: Card(
|
||||||
margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0),
|
margin: const EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 15.0, horizontal: 30.0),
|
padding:
|
||||||
|
const EdgeInsets.symmetric(vertical: 15.0, horizontal: 30.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: children,
|
children: children,
|
||||||
@ -483,27 +493,29 @@ class PaddingCard extends StatelessWidget {
|
|||||||
|
|
||||||
Widget clientInfo(Client client) {
|
Widget clientInfo(Client client) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 8),
|
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||||
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: -1,
|
flex: -1,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(right: 12),
|
padding: const EdgeInsets.only(right: 12),
|
||||||
child: CircleAvatar(
|
child: CircleAvatar(
|
||||||
child: Text(client.name[0]),
|
backgroundColor: MyTheme.border,
|
||||||
backgroundColor: MyTheme.border))),
|
child: Text(client.name[0])))),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(client.name,
|
Text(client.name,
|
||||||
style: TextStyle(color: MyTheme.idColor, fontSize: 18)),
|
style: const TextStyle(
|
||||||
SizedBox(width: 8),
|
color: MyTheme.idColor, fontSize: 18)),
|
||||||
|
const SizedBox(width: 8),
|
||||||
Text(client.peerId,
|
Text(client.peerId,
|
||||||
style: TextStyle(color: MyTheme.idColor, fontSize: 10))
|
style:
|
||||||
|
const TextStyle(color: MyTheme.idColor, fontSize: 10))
|
||||||
]))
|
]))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user