diff --git a/lib/component/app/app_type_component.dart b/lib/component/app/app_type_component.dart index 275ceb3..49328b0 100644 --- a/lib/component/app/app_type_component.dart +++ b/lib/component/app/app_type_component.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:nowser/const/app_type.dart'; import '../../const/base.dart'; @@ -17,6 +18,12 @@ class _AppTypeComponent extends State { @override Widget build(BuildContext context) { var themeData = Theme.of(context); + String typeName = "WEB"; + if (widget.appType == AppType.ANDROID_APP) { + typeName = "Android"; + } else if (widget.appType == AppType.REMOTE) { + typeName = "Remote"; + } return Container( decoration: BoxDecoration( @@ -30,7 +37,7 @@ class _AppTypeComponent extends State { bottom: 4, ), child: Text( - "WEB", + typeName, style: TextStyle( fontSize: themeData.textTheme.bodySmall!.fontSize, color: themeData.hintColor, diff --git a/lib/router/me/me_router_app_item_component.dart b/lib/router/me/me_router_app_item_component.dart index 12d9762..2437851 100644 --- a/lib/router/me/me_router_app_item_component.dart +++ b/lib/router/me/me_router_app_item_component.dart @@ -24,25 +24,29 @@ class _MeRouterAppItemComponent extends State { var imageWidget = Container( margin: const EdgeInsets.only( left: Base.BASE_PADDING_HALF, - right: Base.BASE_PADDING, + right: Base.BASE_PADDING_HALF, ), child: StringUtil.isBlank(widget.app.image) ? const Icon(Icons.image) : ImageComponent( imageUrl: widget.app.image!, - width: 40, - height: 40, + width: 30, + height: 30, ), ); var appName = widget.app.name; - if (StringUtil.isBlank(widget.app.code)) { + if (StringUtil.isBlank(appName)) { appName = widget.app.code; } var titleWidget = Container( - margin: const EdgeInsets.only(right: Base.BASE_PADDING), - child: Text(appName!), + margin: const EdgeInsets.only(right: Base.BASE_PADDING_HALF), + child: Text( + appName!, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), ); var typeWidget = Container( @@ -57,9 +61,8 @@ class _MeRouterAppItemComponent extends State { child: Row( children: [ imageWidget, - titleWidget, + Expanded(child: titleWidget), typeWidget, - Expanded(child: Container()), rightIconWidget, ], ),