Mobile. Share Screen. Unify usage of card.title, avoid title overflow
This commit is contained in:
parent
1227d66871
commit
45d19a62f9
@ -171,27 +171,15 @@ class ServiceNotRunningNotification extends StatelessWidget {
|
|||||||
final serverModel = Provider.of<ServerModel>(context);
|
final serverModel = Provider.of<ServerModel>(context);
|
||||||
|
|
||||||
return PaddingCard(
|
return PaddingCard(
|
||||||
|
title: translate("Service is not running"),
|
||||||
|
titleIcon:
|
||||||
|
const Icon(Icons.warning_amber_sharp, color: Colors.redAccent),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
const Icon(Icons.warning_amber_sharp,
|
|
||||||
color: Colors.redAccent, size: 24),
|
|
||||||
const SizedBox(width: 10),
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
translate("Service is not running"),
|
|
||||||
style: const TextStyle(
|
|
||||||
fontFamily: 'WorkSans',
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 18,
|
|
||||||
),
|
|
||||||
))
|
|
||||||
],
|
|
||||||
).marginOnly(bottom: 8),
|
|
||||||
Text(translate("android_start_service_tip"),
|
Text(translate("android_start_service_tip"),
|
||||||
style: const TextStyle(fontSize: 12, color: MyTheme.darkGray))
|
style:
|
||||||
|
const TextStyle(fontSize: 12, color: MyTheme.darkGray))
|
||||||
.marginOnly(bottom: 8),
|
.marginOnly(bottom: 8),
|
||||||
ElevatedButton.icon(
|
ElevatedButton.icon(
|
||||||
icon: const Icon(Icons.play_arrow),
|
icon: const Icon(Icons.play_arrow),
|
||||||
@ -358,8 +346,8 @@ class ConnectionManager extends StatelessWidget {
|
|||||||
? "File Connection"
|
? "File Connection"
|
||||||
: "Screen Connection"),
|
: "Screen Connection"),
|
||||||
titleIcon: client.isFileTransfer
|
titleIcon: client.isFileTransfer
|
||||||
? Icons.folder_outlined
|
? Icon(Icons.folder_outlined)
|
||||||
: Icons.mobile_screen_share,
|
: Icon(Icons.mobile_screen_share),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -431,7 +419,7 @@ class PaddingCard extends StatelessWidget {
|
|||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
final String? title;
|
final String? title;
|
||||||
final IconData? titleIcon;
|
final Icon? titleIcon;
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -447,10 +435,10 @@ class PaddingCard extends StatelessWidget {
|
|||||||
titleIcon != null
|
titleIcon != null
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: const EdgeInsets.only(right: 10),
|
padding: const EdgeInsets.only(right: 10),
|
||||||
child:
|
child: titleIcon)
|
||||||
Icon(titleIcon, color: MyTheme.accent, size: 30))
|
|
||||||
: const SizedBox.shrink(),
|
: const SizedBox.shrink(),
|
||||||
Text(
|
Expanded(
|
||||||
|
child: Text(
|
||||||
title!,
|
title!,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'WorkSans',
|
fontFamily: 'WorkSans',
|
||||||
@ -458,6 +446,7 @@ class PaddingCard extends StatelessWidget {
|
|||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
color: MyTheme.accent,
|
color: MyTheme.accent,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)));
|
)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user