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:flutter/material.dart';
|
||||||
|
import 'package:nowser/const/app_type.dart';
|
||||||
|
|
||||||
import '../../const/base.dart';
|
import '../../const/base.dart';
|
||||||
|
|
||||||
@@ -17,6 +18,12 @@ class _AppTypeComponent extends State<AppTypeComponent> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var themeData = Theme.of(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(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -30,7 +37,7 @@ class _AppTypeComponent extends State<AppTypeComponent> {
|
|||||||
bottom: 4,
|
bottom: 4,
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
"WEB",
|
typeName,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: themeData.textTheme.bodySmall!.fontSize,
|
fontSize: themeData.textTheme.bodySmall!.fontSize,
|
||||||
color: themeData.hintColor,
|
color: themeData.hintColor,
|
||||||
|
|||||||
@@ -24,25 +24,29 @@ class _MeRouterAppItemComponent extends State<MeRouterAppItemComponent> {
|
|||||||
var imageWidget = Container(
|
var imageWidget = Container(
|
||||||
margin: const EdgeInsets.only(
|
margin: const EdgeInsets.only(
|
||||||
left: Base.BASE_PADDING_HALF,
|
left: Base.BASE_PADDING_HALF,
|
||||||
right: Base.BASE_PADDING,
|
right: Base.BASE_PADDING_HALF,
|
||||||
),
|
),
|
||||||
child: StringUtil.isBlank(widget.app.image)
|
child: StringUtil.isBlank(widget.app.image)
|
||||||
? const Icon(Icons.image)
|
? const Icon(Icons.image)
|
||||||
: ImageComponent(
|
: ImageComponent(
|
||||||
imageUrl: widget.app.image!,
|
imageUrl: widget.app.image!,
|
||||||
width: 40,
|
width: 30,
|
||||||
height: 40,
|
height: 30,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
var appName = widget.app.name;
|
var appName = widget.app.name;
|
||||||
if (StringUtil.isBlank(widget.app.code)) {
|
if (StringUtil.isBlank(appName)) {
|
||||||
appName = widget.app.code;
|
appName = widget.app.code;
|
||||||
}
|
}
|
||||||
|
|
||||||
var titleWidget = Container(
|
var titleWidget = Container(
|
||||||
margin: const EdgeInsets.only(right: Base.BASE_PADDING),
|
margin: const EdgeInsets.only(right: Base.BASE_PADDING_HALF),
|
||||||
child: Text(appName!),
|
child: Text(
|
||||||
|
appName!,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
var typeWidget = Container(
|
var typeWidget = Container(
|
||||||
@@ -57,9 +61,8 @@ class _MeRouterAppItemComponent extends State<MeRouterAppItemComponent> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
imageWidget,
|
imageWidget,
|
||||||
titleWidget,
|
Expanded(child: titleWidget),
|
||||||
typeWidget,
|
typeWidget,
|
||||||
Expanded(child: Container()),
|
|
||||||
rightIconWidget,
|
rightIconWidget,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user