69 lines
2.0 KiB
Dart
69 lines
2.0 KiB
Dart
|
import 'package:dreampad/app/shared/shared.dart';
|
|||
|
import 'package:flutter/material.dart';
|
|||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||
|
import 'package:get/get.dart';
|
|||
|
|
|||
|
class ExploreWidget extends GetView {
|
|||
|
const ExploreWidget({
|
|||
|
super.key,
|
|||
|
required this.explored,
|
|||
|
required this.exploreCount,
|
|||
|
});
|
|||
|
final bool explored;
|
|||
|
final int exploreCount;
|
|||
|
|
|||
|
@override
|
|||
|
Widget build(BuildContext context) {
|
|||
|
return Container(
|
|||
|
height: 67.h,
|
|||
|
width: 201.w,
|
|||
|
decoration: BoxDecoration(
|
|||
|
image: DecorationImage(
|
|||
|
image: explored ? Images.homeExplorePre : Images.homeExploreDefault,
|
|||
|
fit: BoxFit.fill,
|
|||
|
),
|
|||
|
),
|
|||
|
child: Row(
|
|||
|
children: [
|
|||
|
const RSizedBox(width: 10.0),
|
|||
|
GestureDetector(
|
|||
|
onTap: () {
|
|||
|
if (explored) {}
|
|||
|
},
|
|||
|
child: explored ? Images.homeExploreBegin : Images.homeBeginGray,
|
|||
|
),
|
|||
|
Column(
|
|||
|
mainAxisAlignment: MainAxisAlignment.center,
|
|||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|||
|
children: [
|
|||
|
Text(
|
|||
|
'自由探索',
|
|||
|
style: explored
|
|||
|
? TextStyles.boldWhiteShadow22_101
|
|||
|
: TextStyles.boldWhiteShadow22_100,
|
|||
|
),
|
|||
|
const RSizedBox(height: 4.0),
|
|||
|
explored
|
|||
|
? Text(
|
|||
|
'剩余时间:45:00',
|
|||
|
style: TextStyles.mediumWhiteShadow14_101,
|
|||
|
)
|
|||
|
: Row(
|
|||
|
children: [
|
|||
|
exploreCount == 0
|
|||
|
? Images.homeProgressBar
|
|||
|
: Images.homeProgressBarIn,
|
|||
|
const RSizedBox(width: 1.0),
|
|||
|
exploreCount >= 2
|
|||
|
? Images.homeProgressBarIn
|
|||
|
: Images.homeProgressBar,
|
|||
|
],
|
|||
|
),
|
|||
|
],
|
|||
|
),
|
|||
|
],
|
|||
|
),
|
|||
|
);
|
|||
|
}
|
|||
|
}
|