使用定位小部件时 氩气按钮仅从底部工作(argon colors)

当按钮被按下时,按钮工作的底部只有一半,我正在投票栏,我在顶部使用堆栈并使用两个氩气按钮,一个是屏幕的左侧,一个是屏幕的右侧,两个按钮都是半裁剪的,所以当我点击按钮时,它没有反应,看起来不是 wokring,但是当我们点击 Argon 按钮的底部时,它的工作这里是Screenshot

当按钮被按下时,按钮工作的底部只有一半,我正在投票栏,我在顶部使用堆栈并使用两个氩气按钮,一个是屏幕的左侧,一个是屏幕的右侧,两个按钮都是半裁剪的,所以当我点击按钮时,它没有反应,看起来不是 wokring,但是当我们点击 Argon 按钮的底部时,它的工作这里是Screenshot

return Stack(
  overflow: Overflow.visible,
  children: [
    Container(
           children: [
                Text(post.good.toString(),
                    style: GoogleFonts.poppins(
                        fontWeight: FontWeight.bold, color: Colors.white)),
                Padding(
                  padding: const EdgeInsets.only(right: 10, left: 10),
                  child: SvgPicture.asset(
                    'assets/angel.svg',
                    color: Colors.white,
                    height: 28,
                    width: 28,
                  ),
                )
              ],
            ),
          ),
          decoration: BoxDecoration(
              borderRadius: BorderRadius.only(
                  topRight: Radius.circular(15),
                  bottomRight: Radius.circular(15)),
              color: Colors.amber),
          width: MediaQuery.of(context).size.width,
          height: 30,
        ),
      ),
    
    //Bad BAR
    AnimatedPositioned(
      duration: Duration(milliseconds: 1500),
      curve: Curves.easeInOutBack,
      right: userBad ? goodBar : badBar = 0,
     
        child: Container(
          child: Center(
            child: Row(
              mainAxisAlignment: MainAxisAlignment.start,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Padding(
                  padding: const EdgeInsets.only(right: 10, left: 10),
                  child: SvgPicture.asset(
                    'assets/devil.svg',
                    color: Colors.white,
                    height: 20,
                    width: 20,
                  ),
                ),
                Text(post.bad.toString(),
                    style: GoogleFonts.poppins(
                        fontWeight: FontWeight.bold, color: Colors.white)),
              ],
            ),
    
          decoration: BoxDecoration(
              borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(15),
                  bottomLeft: Radius.circular(15)),
              color: Colors.amber),
          width: MediaQuery.of(context).size.width * badAns,
          height: 30,
        ),
      ),
    ),
    Positioned(
        top: -25,
        left: -65,
        child: ArgonButton(
          //Good Button
          onTap: (startLoading, stopLoading, btnState) async {
            if (post.goodList.contains(user.uid)) {
              Firestore.instance
                  .collection("Posts")
                  .document(post.id)
                  .updateData({
                "good": FieldValue.increment(-1),
                "goodList": FieldValue.arrayRemove([user.uid]),
              });
            } else {
              Firestore.instance
                  .collection("Posts")
                  .document(post.id)
                  .updateData({
                "good": FieldValue.increment(1),
                "goodList": FieldValue.arrayUnion([user.uid]),
              });
              if (post.badList.contains(user.uid)) {
                Firestore.instance
                    .collection("Posts")
                    .document(post.id)
                    .updateData({
                  "bad": FieldValue.increment(-1),
                  "badList": FieldValue.arrayRemove([user.uid]),
                });
              }
            }
          },
          color: Colors.white,
          height: 40,
          elevation: 5,
          hoverElevation: 10,
          width: 140,
          child: Container(
            margin: EdgeInsets.only(left: 45),
            child: Text(post.type == 'Mudda Post' ? 'SUPPORT' : 'HEEN',
                style: GoogleFonts.poppins(
                  fontSize: 10,
                  fontWeight: FontWeight.bold,
                  color: userGood ? Colors.amber : Colors.grey,
                )),
          ),
          borderRadius: 30,
        )),
    Positioned(
        top: -25,
        right: -65,
        child: ArgonButton(
          onTap: (startLoading, stopLoading, btnState) async {
            //FirstPart of checking
            if (post.badList.contains(user.uid)) {
              Firestore.instance
                  .collection("Posts")
                  .document(post.id)
                  .updateData({
                "bad": FieldValue.increment(-1),
                "badList": FieldValue.arrayRemove([user.uid]),
              });
            } else {
              Firestore.instance
                  .collection("Posts")
                  .document(post.id)
                  .updateData({
                "bad": FieldValue.increment(1),
                "badList": FieldValue.arrayUnion([user.uid]),
              });
              if (post.goodList.contains(user.uid)) {
                Firestore.instance
                    .collection("Posts")
                    .document(post.id)
                    .updateData({
                  "good": FieldValue.increment(-1),
                  "goodList": FieldValue.arrayRemove([user.uid]),
                });
              }
            }
          },
          color: Colors.white,
          height: 40,
          elevation: 5,
          width: 140,
          child: Container(
            margin: EdgeInsets.only(right: 65),
            child: Text(
              post.type == 'Mudda Post' ? 'NOT SUPPORT' : 'HELL',
              style: GoogleFonts.poppins(
                  fontSize: 10,
                  fontWeight: FontWeight.bold,
                  color: userBad ? Colors.amber : Color(0xff958B8B)),
              textAlign: TextAlign.right,
            ),
          ),
          borderRadius: 30,
        )),
  ],
);

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(734)
计算函数的逆--库(inverse of equation calculator)
上一篇
在iOS上调用“fetch”时 Javascript“TypeError:已取消”错误
下一篇

相关推荐

  • colors of the wind歌词 Colors of the Wind

    Colors of the Wind 歌词:Verse…

    2023-05-02 05:13:01
    0 74 61
  • 为功率计生成红色和绿色之间的颜色 (colors that start with f)

    我正在写一个 Java 游戏,我想实现一个功率计,你将如何努力拍摄的东西。…

    2022-11-23 04:43:23
    0 11 13
  • cvt和自动挡哪个好提升驾驶体验的最佳选择

    CVT(可变转换器)是一种由传动带及传动轮组成的无级变速器,它可以在没有传动档位的情况下,根据驾驶者的驾驶习惯,自动调整传动轮之间的转速比,从而实现无级变速。自动挡是指车辆自动变速箱,它使用液力传动来实现变速,可以自动适应车辆的行驶状态,减少司机的疲劳,提高行车的舒适性。…

    2023-06-08 07:42:19
    0 86 46
  • cv一叶扁舟和清影轩阳:漫游在一叶扁舟和清影轩阳之间

    cv一叶扁舟是一款开源的计算机视觉库,用于图像处理、计算机视觉等。它提供了丰富的API,可以帮助开发者快速实现各种图像处理任务,如图像分割、目标检测、图像识别等。清影轩阳是一款开源的计算机视觉框架,用于图像处理、目标检测、分类等。它提供了丰富的API,可以帮助开发者快速实现各种图像处理任务,如图像分割、目标检测、图像识别等。…

    2023-08-05 07:06:20
    0 75 38
  • css设置滚动条宽度设置:This is a title

    CSS设置滚动条宽度的方法:使用CSS3的。-webkit-属性:…

    2023-06-06 10:53:01
    0 39 11
  • xl和xe汽车cvt:探索XL和XE汽车的CVT技术优势

    XL和XE汽车CVT是一种变速器,它使用液力变矩器代替传统的机械变速器,以达到更高的效率。它的工作原理是,当发动机输出功率时,液力变矩器就会将这些功率转换为液压能量,然后将能量传递到变速器的输出轴上,从而实现变速。…

    2023-04-09 00:41:04
    0 65 94
  • cordon bleu是什么意思:法式炸鸡卷——Cordon Bleu的经典之作

    Cordon Bleu是一种烹饪技术,其中肉片被置于奶酪和火腿之间,然后用面包屑裹上,最后煎炸或烤熟。这种技术通常用于制作鸡肉,但也可以用于制作其他类型的肉类,如牛肉或猪肉。…

    2024-01-27 15:13:30
    0 73 27
  • countif 非空:非空单元格的计数

    Countif 非空是指计算某个单元格不为空的数量。代码如下:…

    2023-04-22 15:54:15
    0 14 58

发表评论

登录 后才能评论

评论列表(21条)