dreampad/lib/app/modules/home/widgets/lantern_widget.dart

49 lines
1.2 KiB
Dart
Raw Normal View History

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) {
2023-11-30 17:12:13 +08:00
return ShowUp(
duration: const Duration(seconds: 2),
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
),
2023-11-30 16:36:14 +08:00
),
2023-11-30 00:08:39 +08:00
);
}
}