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 在颤振中使用堆栈时,内容重叠 导入“包装:颤振/材料.省道”; 进口“包装:颤振/喷漆.省道”; void main()=>runApp(MaterialApp( home:home(), ));`类Home扩展了无状态小部件{ @凌驾 小部件构建(构建上下文){ 返回脚手架( appBar:appBar( 标题:文本(“GigoClean”, 样式:TextStyle( fontFamily:“机器人”, ), ), 标题:对, 背景颜色:Colors.cyanAccent[400], ),`body:Center( 子:堆栈( 儿童:[ 容器( 装饰:新盒子装饰( 图片:new decoration图片(图片:new AssetImage(“assets/bg.png”),fit:BoxFit.cover,), ), ), 容器( 填充:从LTRB(0,90.0,0,0)开始的边缘设置, 子项:Image.asset('assets/intro.jpg'), ), 容器( 填充:从LTRB(15,40,15,0)开始的边缘设置, 孩子:文本(‘准备好让你的生活变得轻松,只需点击应用程序,你的清洁就会变得轻松。’, textAlign:textAlign.center,),_Flutter_Dart - Fatal编程技术网

Flutter 在颤振中使用堆栈时,内容重叠 导入“包装:颤振/材料.省道”; 进口“包装:颤振/喷漆.省道”; void main()=>runApp(MaterialApp( home:home(), ));`类Home扩展了无状态小部件{ @凌驾 小部件构建(构建上下文){ 返回脚手架( appBar:appBar( 标题:文本(“GigoClean”, 样式:TextStyle( fontFamily:“机器人”, ), ), 标题:对, 背景颜色:Colors.cyanAccent[400], ),`body:Center( 子:堆栈( 儿童:[ 容器( 装饰:新盒子装饰( 图片:new decoration图片(图片:new AssetImage(“assets/bg.png”),fit:BoxFit.cover,), ), ), 容器( 填充:从LTRB(0,90.0,0,0)开始的边缘设置, 子项:Image.asset('assets/intro.jpg'), ), 容器( 填充:从LTRB(15,40,15,0)开始的边缘设置, 孩子:文本(‘准备好让你的生活变得轻松,只需点击应用程序,你的清洁就会变得轻松。’, textAlign:textAlign.center,),

Flutter 在颤振中使用堆栈时,内容重叠 导入“包装:颤振/材料.省道”; 进口“包装:颤振/喷漆.省道”; void main()=>runApp(MaterialApp( home:home(), ));`类Home扩展了无状态小部件{ @凌驾 小部件构建(构建上下文){ 返回脚手架( appBar:appBar( 标题:文本(“GigoClean”, 样式:TextStyle( fontFamily:“机器人”, ), ), 标题:对, 背景颜色:Colors.cyanAccent[400], ),`body:Center( 子:堆栈( 儿童:[ 容器( 装饰:新盒子装饰( 图片:new decoration图片(图片:new AssetImage(“assets/bg.png”),fit:BoxFit.cover,), ), ), 容器( 填充:从LTRB(0,90.0,0,0)开始的边缘设置, 子项:Image.asset('assets/intro.jpg'), ), 容器( 填充:从LTRB(15,40,15,0)开始的边缘设置, 孩子:文本(‘准备好让你的生活变得轻松,只需点击应用程序,你的清洁就会变得轻松。’, textAlign:textAlign.center,),,flutter,dart,Flutter,Dart,我只想要一个背景图像,这就是为什么我使用堆栈,但它是重叠的其他内容以及。请帮助 您应该将另外两个容器放在一列或一行中,以避免重叠。下面是一个示例供您理解: import 'package:flutter/material.dart'; import 'package:flutter/painting.dart'; void main() => runApp(MaterialApp( home: Home(), ));`class Home extends StatelessWidge

我只想要一个背景图像,这就是为什么我使用堆栈,但它是重叠的其他内容以及。请帮助


您应该将另外两个容器放在一列或一行中,以避免重叠。下面是一个示例供您理解:

import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';

void main() => runApp(MaterialApp(
  home: Home(),
));`class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(

      appBar: AppBar(
        title: Text('GigoClean',
          style: TextStyle(
            fontFamily: 'Roboto',
          ),
        ),
        centerTitle: true,
        backgroundColor: Colors.cyanAccent[400],
      ),`body:  Center(
        child: Stack(
        children: <Widget>[
           Container(
            decoration: new BoxDecoration(
              image: new DecorationImage(image: new AssetImage("assets/bg.png"), fit: BoxFit.cover,),
            ),
          ),
          Container(
            padding: EdgeInsets.fromLTRB(0, 90.0, 0, 0),
            child: Image.asset('assets/intro.jpg'),
          ),
          Container(
              padding: EdgeInsets.fromLTRB(15, 40, 15, 0),
              child: Text('Get ready to make your life easy with single click of app, which makes your cleaning easy.' ,
              textAlign: TextAlign.center,),
小部件构建(构建上下文){
返回脚手架(
appBar:appBar(
标题:文本(“GigoClean”,
样式:TextStyle(
fontFamily:“机器人”,
),
),
标题:对,
背景颜色:Colors.cyanAccent[400],
),`body:Center(
子:堆栈(
儿童:[
容器(
装饰:新盒子装饰(
图片:new decoration图片(图片:new AssetImage(“assets/bg.png”),fit:BoxFit.cover,),
),
),
纵队(
儿童:[
容器(
填充:从LTRB(0,90.0,0,0)开始的边缘设置,
子项:Image.asset('assets/intro.jpg'),
),
容器(
填充:从LTRB(15,40,15,0)开始的边缘设置,
孩子:文本(‘准备好让你的生活变得轻松,只需点击应用程序,你的清洁就会变得轻松。’,
textAlign:textAlign.center,),

请通过突出显示您的问题来共享屏幕截图
Widget build(BuildContext context) {
return Scaffold(

  appBar: AppBar(
    title: Text('GigoClean',
      style: TextStyle(
        fontFamily: 'Roboto',
      ),
    ),
    centerTitle: true,
    backgroundColor: Colors.cyanAccent[400],
  ),`body:  Center(
    child: Stack(
    children: <Widget>[
       Container(
        decoration: new BoxDecoration(
          image: new DecorationImage(image: new AssetImage("assets/bg.png"), fit: BoxFit.cover,),
        ),
      ),
      Column(
        children: [
          Container(
            padding: EdgeInsets.fromLTRB(0, 90.0, 0, 0),
            child: Image.asset('assets/intro.jpg'),
          ),
          Container(
            padding: EdgeInsets.fromLTRB(15, 40, 15, 0),
            child: Text('Get ready to make your life easy with single click of app, which makes your cleaning easy.' ,
            textAlign: TextAlign.center,),