cardContainer method
Implementation
Widget cardContainer(double cardViewHeight) {
// if(isShowWebViewHalfSize) {
// return SizedBox(
// height: cardViewHeight,
// // child: widget.webView!,
// child: widget.webView!,
// );
// }
return Container(
color: bgColor,
child: Column(
children: [
Container(
height: 50,
// color: Colors.white,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Row(
children: [
SizedBox(width: 40),
Expanded(child:
widget.themeData?.titleWidget ?? Text(
'결제하기',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w500, color: textColor)
)
),
SizedBox(
width: 40,
child: Material(
color: Colors.transparent,
child: IconButton(
icon: Image.asset('images/close.png', package: 'bootpay_bio', color: textColor),
// icon: Image.asset('assets/close.png'),
iconSize: 20,
onPressed: () {
if (widget.onCancel != null) {
widget.onCancel!('{"action":"BootpayCancel","status":-100,"message":"사용자에 의한 취소"}');
}
bootpayClose();
// if (widget.onClose != null) {
// widget.onClose!();
// }
BootpayBio().dismiss(context);
// Navigator.of(context).pop();
},
),
)
),
],
),
),
),
Container(
height: 1,
color: Colors.black12
),
payInfoContainer(),
Obx(() =>
Container(
// color: Color(0xFFEDEDED),
color: cardBgColor,
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 0.0),
child: Container(
width: double.infinity,
height: cardViewHeight,
child: CarouselSlider(
options: CarouselOptions(
aspectRatio: 2.0,
enlargeCenterPage: true,
onPageChanged: (index, reason) {
if(mounted) {
setState(() {
currentCardIndex = index;
});
}
}
),
items: cardScrollChildrenWidget(),
),
),
),
),
),
isShowQuotaSelectBox ? Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 40.0, vertical: 15.0),
child: DropdownButtonFormField(
decoration: const InputDecoration(
border: OutlineInputBorder(),
),
isExpanded: true,
value: _selectedValue,
items: widget.c.cardQuotaList.map((e) => DropdownMenuItem(
value: e,
child: Text(e),
)).toList(),
onChanged: (e) {
_selectedValue = e.toString();
widget.c.setCardQuota(_selectedValue);
},
)
),
SizedBox(height: 60)
],
) : Container(),
Padding(
padding: const EdgeInsets.all(15.0),
child: Stack(
children: [
Container(
height: 50,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0),
color: buttonBgColor,
),
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: () {
clickCardButton();
},
child: Center(child: Text(cardButtonTitle(), style: TextStyle(color: buttonTextColor, fontWeight: FontWeight.w600, fontSize: 16.0)))
)
),
),
widget.c.isShowWebViewHalfSize.value == true ? SizedBox(
height: 50,
child: Opacity(
opacity: 0.2,
child: widget.webView
),
) : Container(),
widget.c.isShowWebViewHalfSize.value == true ? const Center(
child: Padding(
padding: EdgeInsets.only(top: 7.0),
child: CircularProgressIndicator(
color: Colors.white,
),
)
) : Container()
],
),
),
SizedBox(height: 20)
],
),
);
}