Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 颤振结构设计_Flutter_User Interface - Fatal编程技术网

Flutter 颤振结构设计

Flutter 颤振结构设计,flutter,user-interface,Flutter,User Interface,我尝试了几种方法来创建如下元素: 但考虑到设计和响应性,我找不到正确的方法来实现它。我希望这里有人能给我一些建议或给我举个例子 首先需要导入Pubspec.yaml中的flatter\u neumorphic:^3.0.3包 然后复制下面给出的代码 我的代码 Container( width: 300, height: 100, child: Stack( children: [ Positioned(

我尝试了几种方法来创建如下元素:

但考虑到设计和响应性,我找不到正确的方法来实现它。我希望这里有人能给我一些建议或给我举个例子


首先需要导入Pubspec.yaml中的flatter\u neumorphic:^3.0.3

然后复制下面给出的代码

我的代码

Container(
      width: 300,
      height: 100,

      child: Stack(
        children: [
          Positioned(
              right: 0,
              top: 15,
              height: 70,
              width: 260,
              child: Neumorphic(
                padding: EdgeInsets.all(3),
                child: Neumorphic(
                  padding: EdgeInsets.only(left: 80),
                  child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        NeumorphicText(
                          '3 Videos',
                          style: NeumorphicStyle(depth: 7, color: Colors.white),
                          textStyle: NeumorphicTextStyle(
                            fontSize: 23,
                            fontWeight: FontWeight.bold,
                          ),
                        ),
                        NeumorphicText(
                          'E 0,99',
                          style: NeumorphicStyle(depth: 7, color: Colors.white),
                          textStyle: NeumorphicTextStyle(
                            fontSize: 13,
                            fontWeight: FontWeight.normal
                            ,
                          ),
                        ),
                      ]),
                  style: NeumorphicStyle(
                      shape: NeumorphicShape.convex,
                      depth: 6,
                      boxShape:
                      NeumorphicBoxShape.roundRect(BorderRadius.circular(18)),
                      color: Colors.purple),
                ),
                style: NeumorphicStyle(
                    shape: NeumorphicShape.convex,
                    depth: 6,
                    boxShape:
                        NeumorphicBoxShape.roundRect(BorderRadius.circular(20)),
                    color: Colors.white),
              )),
          Positioned(
              left: 0,
              top: 5,
              height: 90,
              width: 120,
              child: Neumorphic(
                padding: EdgeInsets.all(5),
                child: Neumorphic(
                  child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: [
                    NeumorphicText(
                      '10',
                      style: NeumorphicStyle(depth: 7, color: Colors.white),
                      textStyle: NeumorphicTextStyle(
                        fontSize: 23,
                        fontWeight: FontWeight.bold,
                      ),
                    ),
                    NeumorphicText(
                      'Coins',
                      style: NeumorphicStyle(depth: 7, color: Colors.white),
                      textStyle: NeumorphicTextStyle(
                        fontSize: 14,
                        fontWeight: FontWeight.normal
                        ,
                      ),
                    ),
                  ]),
                  style: NeumorphicStyle(
                      shape: NeumorphicShape.concave,
                      depth: 6,
                      boxShape: NeumorphicBoxShape.circle(),
                      color: Colors.orange),
                ),
                style: NeumorphicStyle(
                    shape: NeumorphicShape.concave,
                    depth: 6,
                    boxShape: NeumorphicBoxShape.circle(),
                    color: Colors.orangeAccent),
              )),
        ],
      ),
    );