Commit 50ecef77 authored by 林生雨's avatar 林生雨

fix UI bug

parent 96d621ee
...@@ -539,59 +539,73 @@ class LevelOneItem extends StatelessWidget { ...@@ -539,59 +539,73 @@ class LevelOneItem extends StatelessWidget {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: AspectRatio( child: Stack(
aspectRatio: 1, children: <Widget>[
child: Container( Container(
decoration: BoxDecoration( width: diaryImageWidth,
height: diaryImageWidth,
child: ClipRRect(
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4),
image: DecorationImage( child: CachedNetworkImage(
fit: BoxFit.cover, imageUrl: cards.diary.images[0].imageHalf,
image: NetworkImage( fit: BoxFit.cover,
cards.diary.images[0].imageHalf))), ),
alignment: Alignment.bottomLeft, ),
child: Container(
width: 65.5,
height: 18,
decoration: BoxDecoration(
color: Color(0x4c000000),
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(4),
topRight: Radius.circular(2),
)),
alignment: Alignment.center,
child: baseText(
cards.diary.images[0].desc, 11, Colors.white),
), ),
), Positioned(
left: 0,
bottom: 0,
child: Container(
width: 65.5,
height: 18,
decoration: BoxDecoration(
color: Color(0x4c000000),
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(4),
topRight: Radius.circular(2),
)),
alignment: Alignment.center,
child: baseText(
cards.diary.images[0].desc, 11, Colors.white),
),
)
],
)), )),
Container( Container(
width: 9, width: 9,
), ),
Expanded( Expanded(
child: AspectRatio( child: Stack(
aspectRatio: 1, children: <Widget>[
child: Container( Container(
decoration: BoxDecoration( width: diaryImageWidth,
height: diaryImageWidth,
child: ClipRRect(
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4),
image: DecorationImage( child: CachedNetworkImage(
fit: BoxFit.cover, imageUrl: cards.diary.images[1].imageHalf,
image: NetworkImage( fit: BoxFit.cover,
cards.diary.images[1].imageHalf))), ),
alignment: Alignment.bottomLeft, ),
child: Container(
width: 65.5,
height: 18,
decoration: BoxDecoration(
color: Color(0x4c000000),
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(4),
topRight: Radius.circular(2),
)),
alignment: Alignment.center,
child: baseText(
cards.diary.images[1].desc, 11, Colors.white),
), ),
), Positioned(
left: 0,
bottom: 0,
child: Container(
width: 65.5,
height: 18,
decoration: BoxDecoration(
color: Color(0x4c000000),
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(4),
topRight: Radius.circular(2),
)),
alignment: Alignment.center,
child: baseText(
cards.diary.images[1].desc, 11, Colors.white),
),
)
],
)) ))
], ],
)), )),
......
...@@ -27,6 +27,7 @@ import 'package:gm_flutter/commonModel/base/BaseState.dart'; ...@@ -27,6 +27,7 @@ import 'package:gm_flutter/commonModel/base/BaseState.dart';
import 'package:gm_flutter/commonModel/bean/Pair.dart'; import 'package:gm_flutter/commonModel/bean/Pair.dart';
import 'package:gm_flutter/commonModel/cache/CacheManager.dart'; import 'package:gm_flutter/commonModel/cache/CacheManager.dart';
import 'package:gm_flutter/commonModel/eventbus/SimpleEventBus.dart'; import 'package:gm_flutter/commonModel/eventbus/SimpleEventBus.dart';
import 'package:gm_flutter/commonModel/util/DartUtil.dart';
import 'package:gm_flutter/commonModel/view/baseRefreshIndicator.dart'; import 'package:gm_flutter/commonModel/view/baseRefreshIndicator.dart';
import 'package:gm_flutter/main.mark.dart'; import 'package:gm_flutter/main.mark.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
...@@ -101,13 +102,13 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -101,13 +102,13 @@ class LevelOneState extends BaseState<LevelOnePage>
stateBarHeight = MediaQueryData.fromWindow(window).padding.top; stateBarHeight = MediaQueryData.fromWindow(window).padding.top;
oneList.clear(); oneList.clear();
oneList.add(good()); oneList.add(good().toActive());
oneList.add(rect()); oneList.add(rect().toActive());
oneList.add(explain()); oneList.add(explain().toActive());
oneList.add(Container( oneList.add(Container(
height: 5, height: 5,
color: Color(0xffF7F6FA), color: Color(0xffF7F6FA),
)); ).toActive());
screenWidth = MediaQuery.of(context).size.width; screenWidth = MediaQuery.of(context).size.width;
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
......
...@@ -23,6 +23,7 @@ import 'package:gm_flutter/commonModel/base/BaseState.dart'; ...@@ -23,6 +23,7 @@ import 'package:gm_flutter/commonModel/base/BaseState.dart';
import 'package:gm_flutter/commonModel/bean/Pair.dart'; import 'package:gm_flutter/commonModel/bean/Pair.dart';
import 'package:gm_flutter/commonModel/cache/CacheManager.dart'; import 'package:gm_flutter/commonModel/cache/CacheManager.dart';
import 'package:gm_flutter/commonModel/eventbus/SimpleEventBus.dart'; import 'package:gm_flutter/commonModel/eventbus/SimpleEventBus.dart';
import 'package:gm_flutter/commonModel/util/DartUtil.dart';
import 'package:gm_flutter/commonModel/view/baseRefreshIndicator.dart'; import 'package:gm_flutter/commonModel/view/baseRefreshIndicator.dart';
import 'package:gm_flutter/main.mark.dart'; import 'package:gm_flutter/main.mark.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
...@@ -90,13 +91,13 @@ class LevelTwoState extends BaseState<LevelTwoPage> ...@@ -90,13 +91,13 @@ class LevelTwoState extends BaseState<LevelTwoPage>
@override @override
Widget buildItem(BuildContext context) { Widget buildItem(BuildContext context) {
oneList.clear(); oneList.clear();
oneList.add(good()); oneList.add(good().toActive());
oneList.add(rect()); oneList.add(rect().toActive());
oneList.add(explain()); oneList.add(explain().toActive());
oneList.add(Container( oneList.add(Container(
height: 5, height: 5,
color: Color(0xffF7F6FA), color: Color(0xffF7F6FA),
)); ).toActive());
screenWidth = MediaQuery.of(context).size.width; screenWidth = MediaQuery.of(context).size.width;
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment