2023-11-30 00:08:39 +08:00
|
|
|
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 LanternWidget extends GetView {
|
|
|
|
const LanternWidget({
|
|
|
|
super.key,
|
|
|
|
this.brightCount = 0,
|
|
|
|
});
|
|
|
|
final int? brightCount;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Positioned(
|
|
|
|
right: 60.w,
|
|
|
|
top: 346.h,
|
2023-11-30 12:34:48 +08:00
|
|
|
child: ShowUp(
|
|
|
|
child: Container(
|
|
|
|
height: 90.h,
|
|
|
|
width: 180.w,
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
image: DecorationImage(
|
|
|
|
image: Images.homeLantern,
|
|
|
|
fit: BoxFit.fill,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Stack(
|
|
|
|
clipBehavior: Clip.none,
|
|
|
|
children: [
|
|
|
|
brightCount! >= 1
|
|
|
|
? Positioned(
|
|
|
|
left: -9.w,
|
|
|
|
top: 36.h,
|
|
|
|
child: Images.homeLanternBright,
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
brightCount! >= 2
|
|
|
|
? Positioned(
|
|
|
|
left: 18.w,
|
|
|
|
top: 27.h,
|
|
|
|
child: Images.homeLanternBright,
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
],
|
2023-11-30 00:08:39 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|