53 lines
1.6 KiB
Dart
53 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:skywood/main/lib_file.dart';
|
|
import 'package:skywood/utils/models/drama/skywood_drama.dart';
|
|
|
|
class MysteryBoxWidget extends StatelessWidget {
|
|
|
|
const MysteryBoxWidget({super.key,
|
|
required this.drama,
|
|
this.onTap,
|
|
});
|
|
|
|
final SkywoodDrama drama;
|
|
final Function()? onTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
width: AppScreen.screenWidth, height: 450,
|
|
child: Column(
|
|
children: [
|
|
HelpImg.asset(ConstImg.boxOpened, width: 179, height: 24),
|
|
const SizedBox(height: 20),
|
|
Stack(
|
|
children: [
|
|
HelpImg.asset(ConstImg.boxGift, width: AppScreen.screenWidth),
|
|
// 015 140 00EE02
|
|
Positioned(
|
|
top: 0, left: 135, right: 135,
|
|
child: Container(
|
|
width: 105.w, height: 140.w,
|
|
decoration: BoxDecoration(
|
|
border: Border.all(width: 1, color: CommonColor.withValue('00EE02'))
|
|
),
|
|
child: HelpImg.network(drama.imageUrl, width: 105.w, fit: BoxFit.fill),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
HelpImg.asset(ConstImg.boxBtn, width: 196).addInkWell(
|
|
onTap: () {
|
|
HelpNav.back();
|
|
onTap?.call();
|
|
}
|
|
),
|
|
const SizedBox(height: 12),
|
|
IconButton(onPressed: () {
|
|
HelpNav.back();
|
|
}, icon: HelpImg.asset(ConstImg.boxClose, width: 30))
|
|
],
|
|
),
|
|
);
|
|
}
|
|
} |