showRankAlert static method

dynamic showRankAlert(
  1. BuildContext context,
  2. dynamic onTap()?
)

榜单隐身-弹框

Implementation

static showRankAlert(BuildContext context, Function()? onTap) {
  JJDialogController(
      position: JJDialogPosition.center,
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
      dialogContainer: JJDialogContainer(
        clipBehavior: Clip.antiAlias,
        type: JJDialogType.custom,
        decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(16)),
        height: 220,
        width: 280,
        custom: Stack(
          children: [
            Positioned(
                top: 0,
                right: 0,
                child: JJBaseWidgetBuilder.imageButton(
                    width: 40,
                    height: 40,
                    onTap: () {
                      Navigator.pop(context);
                    },
                    normalImage: const AssetImage('assets/image/wallet/icon_close_black.png', package: LiveSdkManager.package))),
            Column(
              mainAxisSize: MainAxisSize.max,
              children: [
                const SizedBox(height: 25),
                Container(
                  height: 58,
                  width: 53,
                  clipBehavior: Clip.antiAlias,
                  decoration: const BoxDecoration(
                      image: DecorationImage(
                    image: AssetImage('assets/image/rank/icon_hidden@3x.png', package: LiveSdkManager.package),
                    fit: BoxFit.cover,
                  )),
                ),

                const SizedBox(height: 20),
                Text(Strings.homeRankMysteryInfo.tr,
                    style: const TextStyle(fontSize: 20, color: Color(0xFFA059FF), fontWeight: FontWeight.w600), textAlign: TextAlign.center),
                //const SizedBox(height: 12),
                Expanded(
                  child: RichText(
                      text: TextSpan(children: [
                    TextSpan(text: Strings.homeRankHidden.tr, style: const TextStyle(color: Color(0xff37383B), fontSize: 16, fontWeight: FontWeight.w600)),
                    TextSpan(text: Strings.homeRankDuke.tr, style: const TextStyle(color: Color(0xffA059FF), fontSize: 16, fontWeight: FontWeight.w600)),
                    TextSpan(text: Strings.homeRankEnable.tr, style: const TextStyle(color: Color(0xff37383B), fontSize: 16, fontWeight: FontWeight.w600)),
                  ])),
                ),
                const SizedBox(height: 13),
                Container(
                  height: 0.5,
                  decoration: BoxDecoration(
                      //color: Color(0xffe5e5e5),
                      gradient: LinearGradient(
                          colors: [const Color(0xffFBE33E).withAlpha(0), const Color(0xffC7902D), const Color(0xffFFAE22).withAlpha(0)],
                          begin: Alignment.centerLeft,
                          end: Alignment.centerRight)),
                ),
                JJBaseWidgetBuilder.textButton(
                    width: 200,
                    height: 49,
                    onTap: onTap,
                    title: Text(
                      Strings.openNoble.tr,
                      maxLines: 1,
                      style: const TextStyle(color: Color(0xffFF223B), fontSize: 16, fontWeight: FontWeight.w600),
                      textAlign: TextAlign.center,
                    )),
              ],
            )
          ],
        ),
      )).show(context);
}