dreampad/lib/app/modules/home/widgets/lantern_widget.dart
2023-11-30 00:09:22 +08:00

50 lines
1.2 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 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,
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(),
],
),
),
);
}
}