Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.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/1/dart/3.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 颤振中的singleScrollChildView不工作,屏幕没有响应_Flutter_Dart - Fatal编程技术网

Flutter 颤振中的singleScrollChildView不工作,屏幕没有响应

Flutter 颤振中的singleScrollChildView不工作,屏幕没有响应,flutter,dart,Flutter,Dart,请检查我使用堆栈和定位小部件的图像,但结果没有响应。。 附加的图像来自两个d/f模拟器。请帮忙 请检查我使用堆栈和定位小部件的图像,但结果没有响应。。 附加的图像来自两个d/f模拟器。请帮忙 import'包装:flift/cupertino.dart'; 进口“包装:颤振/材料.省道”; 导入“包:flifter/services.dart”; 进口“包装:颤振摆动/颤振摆动摆动.省道”; 导入“包装:imnci/credintials/contact_info.dart”; 导入“包:百

请检查我使用堆栈和定位小部件的图像,但结果没有响应。。 附加的图像来自两个d/f模拟器。请帮忙

请检查我使用堆栈和定位小部件的图像,但结果没有响应。。 附加的图像来自两个d/f模拟器。请帮忙

import'包装:flift/cupertino.dart';
进口“包装:颤振/材料.省道”;
导入“包:flifter/services.dart”;
进口“包装:颤振摆动/颤振摆动摆动.省道”;
导入“包装:imnci/credintials/contact_info.dart”;
导入“包:百分比指示器/百分比指示器.dart”;
类DemoPage扩展了StatefulWidget{
@凌驾
_DemoPageState createState();
}
类_DemoPageState扩展状态{
@凌驾
小部件构建(构建上下文){
返回脚手架(
背景颜色:颜色。来自RGBO(244245249,1),
正文:SingleChildScrollView(
子:堆栈(
//溢出:溢出。可见,
儿童:[
定位(
高度:MediaQuery.of(context).size.height*0.2,
左:-5,
右:-5,
前-5名,
孩子:卡片(
颜色:颜色。来自RGBO(109,025,1.0),
标高:0.0,
形状:圆形矩形边框(
borderRadius:仅限borderRadius(
左下角:半径。圆形(40),
右下角:半径。圆形(40)),
),
),
),
定位(
左:330.0,
右:0.0,
高度:MediaQuery.of(context).size.height*0.1,
前15名,
孩子:我的钮扣(
颜色:颜色,白色,
图标:图标(图标。通知),
已按下:(){
打印(MediaQuery.of(context).size.width*0.19);
},
),
),
定位(
左:16.0,
右图:16.0,
高度:MediaQuery.of(上下文).size.height*0.33,
前70名,
孩子:卡片(
颜色:颜色,白色,
标高:0.0,
形状:圆形矩形边框(
边界半径:边界半径。圆形(16),
),
孩子:排(
crossAxisAlignment:crossAxisAlignment.start,
儿童:[
纵队(
crossAxisAlignment:crossAxisAlignment.start,
儿童:[
填充物(
填充:仅限边缘设置(左侧:40,顶部:50),
子:文本(
“嗨,沙阿”,
样式:TextStyle(
字体大小:20.0,
字母间距:3,
fontWeight:fontWeight.bold,
),
),
),
填充物(
填充:仅限边缘设置(左:40,顶:10),
子:文本(
“你今天想学什么?”,
样式:TextStyle(
字体大小:14.0,
字母间距:1,
fontWeight:fontWeight.normal,
),
),
),
],
),
填充物(
填充:仅限边缘设置(左:40),
儿童:中心(
子:循环指示器(
半径:70.0,
动画:没错,
动画持续时间:1200,
线宽:3.0,
百分之零点八,,
中心:新文本(
"75",
样式:新文本样式(
fontWeight:fontWeight.bold,fontSize:20.0),
),
circularStrokeCap:circularStrokeCap.butt,
背景颜色:颜色。灰色,
progressColor:Color.fromRGBO(109,025,1.0),
),
))
/*纵队(
crossAxisAlignment:crossAxisAlignment.start,
儿童:[
],
),*/
],
),
),
),
定位(
左:45.0,
宽度:MediaQuery.of(context).size.width*0.19,
高度:MediaQuery.of(context).size.height*0.1,
排名:35,
孩子:卡片(
海拔:16,
阴影颜色:颜色。黄色[700],
颜色:颜色。黄色[700],
形状:圆形矩形边框(
边:边框边(颜色:Colors.white70,宽度:0),
边界半径:边界半径。圆形(16),
),
子:Image.asset(
“assets/stetho.png”,
),
),
),
定位(
左:55.0,
身高:1,,
宽度:MediaQuery.of(context).size.width*0.81,
排名:215,
孩子:分割器(
厚度:1,
颜色:颜色。灰色,
)),
定位(
左:55.0,
右图:10.0,
高度:MediaQuery.of(context).size.height*0.1,
排名:230,
子:文本(
“5章| 4课”,
样式:TextStyle(
尺寸:12,
颜色:颜色。灰色,
fontWeight:fontWeight.bold),
)
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:imnci/credintials/contact_info.dart';
import 'package:percent_indicator/percent_indicator.dart';

class DemoPage extends StatefulWidget {
  @override
  _DemoPageState createState() => _DemoPageState();
}

class _DemoPageState extends State<DemoPage> {




  @override
  Widget build(BuildContext context) {


    return Scaffold(

      backgroundColor: Color.fromRGBO(244, 245, 249, 1),
      body: SingleChildScrollView(
      child: Stack(
       // overflow: Overflow.visible,
        children: <Widget>[

          Positioned(
            height:  MediaQuery.of(context).size.height * 0.2,
            left: -5,
            right: -5,
            top: -5,
            child: Card(
              color: Color.fromRGBO(109, 0, 252, 1.0),
              elevation: 0.0,
              shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.only(
                    bottomLeft: Radius.circular(40),
                    bottomRight: Radius.circular(40)),
              ),
            ),
          ),
          Positioned(
            left: 330.0,
            right: 0.0,
            height: MediaQuery.of(context).size.height * 0.1,
            top: 15,
            child: IconButton(
              color: Colors.white,
              icon: Icon(Icons.notifications),
              onPressed: () {
                print(MediaQuery.of(context).size.width * 0.19);
              },
            ),
          ),
          Positioned(
            left: 16.0,
            right: 16.0,
            height: MediaQuery.of(context).size.height * 0.33,
            top: 70,
            child: Card(
              color: Colors.white,
              elevation: 0.0,
              shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(16),
              ),
              child: Row(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Padding(
                        padding: EdgeInsets.only(left: 40, top: 50),
                        child: Text(
                          "Hi, Shah",
                          style: TextStyle(
                            fontSize: 20.0,
                            letterSpacing: 3,
                            fontWeight: FontWeight.bold,
                          ),
                        ),
                      ),
                      Padding(
                        padding: EdgeInsets.only(left: 40, top: 10),
                        child: Text(
                          "What tou like to learn \n\ntoday!",
                          style: TextStyle(
                            fontSize: 14.0,
                            letterSpacing: 1,
                            fontWeight: FontWeight.normal,
                          ),
                        ),
                      ),
                    ],
                  ),
                  Padding(
                      padding: EdgeInsets.only(left: 40),
                      child: Center(
                        child: CircularPercentIndicator(
                          radius: 70.0,
                          animation: true,
                          animationDuration: 1200,
                          lineWidth: 3.0,
                          percent: 0.8,
                          center: new Text(
                            "75",
                            style: new TextStyle(
                                fontWeight: FontWeight.bold, fontSize: 20.0),
                          ),
                          circularStrokeCap: CircularStrokeCap.butt,
                          backgroundColor: Colors.grey,
                          progressColor: Color.fromRGBO(109, 0, 252, 1.0),
                        ),
                      ))

                  /*  Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [

                    ],
                  ),*/
                ],
              ),
            ),
          ),
          Positioned(
            left: 45.0,
            width: MediaQuery.of(context).size.width * 0.19,
            height: MediaQuery.of(context).size.height * 0.1,
            top: 35,
            child: Card(
              elevation: 16,
              shadowColor: Colors.yellow[700],
              color: Colors.yellow[700],
              shape: RoundedRectangleBorder(
                side: BorderSide(color: Colors.white70, width: 0),
                borderRadius: BorderRadius.circular(16),
              ),
              child: Image.asset(
                "assets/stetho.png",
              ),
            ),
          ),
          Positioned(
              left: 55.0,
              height: 1,
              width: MediaQuery.of(context).size.width * 0.81,
              top: 215,
              child: Divider(
                thickness: 1,
                color: Colors.grey,
              )),
          Positioned(
              left: 55.0,
              right: 10.0,
              height: MediaQuery.of(context).size.height * 0.1,
              top: 230,
              child: Text(
                "5 CHAPTERS | 4 LESSONS",
                style: TextStyle(
                    fontSize: 12,
                    color: Colors.grey,
                    fontWeight: FontWeight.bold),
              )),
          Positioned(
              left: 30.0,
              right: 10.0,
              height: MediaQuery.of(context).size.height* 0.1,
              top: 280,
              child: Text(
                "Studying",
                style: TextStyle(
                    fontSize: 14,
                    color: Colors.grey[700],
                    fontWeight: FontWeight.bold),
              )),
          Padding(
            padding: EdgeInsets.only(left: 30, top: 295),
            child: SizedBox(
              height: MediaQuery.of(context).size.height* 0.4,
              child: new Swiper(
                  layout: SwiperLayout.CUSTOM,
                  customLayoutOption: new CustomLayoutOption(
                      startIndex: -1,
                      stateCount: 3
                  ).addRotate([
                    0.0/180,
                    00.0,
                    0.0/180
                  ]).addTranslate([
                    new Offset(-400.0, -0.0),
                    new Offset(-40.0, 0.0),
                    new Offset(270.0, -0.0)
                  ]),
                  itemWidth: MediaQuery.of(context).size.width* 0.75,
                  itemHeight: MediaQuery.of(context).size.height* 0.4,
                  itemBuilder: (context, index) {
                    return new Card(
                      elevation: 1,
                      shape: RoundedRectangleBorder(
                        side: BorderSide(color: Colors.white, width: 0),
                        borderRadius: BorderRadius.circular(24)
                      ),
                      color: Colors.white,
                      child: new Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          SizedBox(
                            height: MediaQuery.of(context).size.height* 0.2,
                            width: MediaQuery.of(context).size.width* 0.8,
                            child: Image.asset("assets/card_doc.png",
                            fit: BoxFit.cover,),
                          ),
                         Padding(padding: EdgeInsets.only(left: 18, top: 18),
                         child: Text("Day 1",style: TextStyle(
                           fontWeight: FontWeight.bold,
                           fontSize: 15,
                           color: Colors.grey[600],
                           letterSpacing: 1
                         ),)),
                          Padding(padding: EdgeInsets.only(left: 18, top: 10, bottom: 30),
                              child: Text("Chapter #1",style: TextStyle(
                                  fontWeight: FontWeight.normal,
                                  fontSize: 18,
                                  color: Colors.black,
                                  letterSpacing: 1
                              ),),
                          ),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.start, //Center Row contents horizontally,

                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: [
                              Padding(
                                padding: EdgeInsets.only(left: 18),
                                child: Text("5 OF 8 LESSONS",style: TextStyle(fontSize: 12,letterSpacing: 1),),
                              ),
                              Padding(
                                padding: EdgeInsets.only(left: 60),
                                child: SizedBox(
                                  height: MediaQuery.of(context).size.height* 0.02,
                                  width: MediaQuery.of(context).size.height* 0.1,
                                  child: Card(
                                    shape: RoundedRectangleBorder(
                                      side: BorderSide(color: Colors.lightGreenAccent, width: 1),
                                      borderRadius: BorderRadius.circular(60)),
                                    child: LinearProgressIndicator(
                                      backgroundColor: Colors.white,
                                      valueColor: AlwaysStoppedAnimation<Color>(Colors.lightGreenAccent,),
                                      value: 0.5,
                                    ),
                                  )
                                )
                              ),
                            ],
                          )
                        ],

                      ),
                    );
                  },
                  itemCount: 10,)
            ),
          ),
          Positioned(
              left: 24.0,
              right: 20.0,
              height: MediaQuery.of(context).size.height* 0.1,
              top: 620,
              child: Card(
                child: Row(
                  children: [
                    Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Padding(padding: EdgeInsets.only(left: 18, right: 18, top: 8),
                          child: Text("Jump to current chapter",style: TextStyle(letterSpacing: 1),),),
                        Padding(padding: EdgeInsets.only(left: 18,top: 8),
                          child: Text("Chapter #1",style: TextStyle(letterSpacing: 1, fontSize: 15,fontWeight: FontWeight.bold),),)
                      ],
                    ),
                    Column(
                      mainAxisAlignment: MainAxisAlignment.center, //Center Row contents horizontally,
                      crossAxisAlignment: CrossAxisAlignment.end,
                       children: [
                        Padding(padding: EdgeInsets.only(left: 66),
                          child: IconButton(icon: Icon(Icons.arrow_forward), onPressed: () {  },)),
                      ],
                    )
                    ],
                ),
              ),
          ),
        ],
      ),
    ),
    );
  }
}