mirror of
https://github.com/haorendashu/nowser.git
synced 2025-12-17 09:54:19 +01:00
check somebugs and change ui
This commit is contained in:
@@ -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<AppTypeComponent> {
|
||||
@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<AppTypeComponent> {
|
||||
bottom: 4,
|
||||
),
|
||||
child: Text(
|
||||
"WEB",
|
||||
typeName,
|
||||
style: TextStyle(
|
||||
fontSize: themeData.textTheme.bodySmall!.fontSize,
|
||||
color: themeData.hintColor,
|
||||
|
||||
@@ -24,25 +24,29 @@ class _MeRouterAppItemComponent extends State<MeRouterAppItemComponent> {
|
||||
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<MeRouterAppItemComponent> {
|
||||
child: Row(
|
||||
children: [
|
||||
imageWidget,
|
||||
titleWidget,
|
||||
Expanded(child: titleWidget),
|
||||
typeWidget,
|
||||
Expanded(child: Container()),
|
||||
rightIconWidget,
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user