कैसे करने के लिए जगह 2 छवियों में एक ही स्थान पर स्पंदन

0

सवाल

मैं पूरी तरह से नया स्पंदन के लिए और मैं करने के लिए कुछ इस तरह करते हैं.

this

और दूसरे भाग के लिए, अपने सही छवि से बनाया गया है छोड़ दिया छवि और एक और छवि है कि रंग नीला है ।

भ्रमित मत होना! मैं जा रहा हूँ समझाने के लिए एक बेहतर तरीका में: सबसे पहले, मैं जगह करने के लिए इन 2 में छवियों एक पंक्ति(जैसे कुछ FrameLayout में एंड्रॉयड)

और सही छवि से किया गया है कि एक छवि है छोड़ दिया छवि और एक और छवि रंग(छवि है कि केवल 1 रंग)

मुझे आशा है कि तुम यह मिल गया

flutter flutter-layout image
2021-11-23 11:08:44
2

सबसे अच्छा जवाब

1

अगर आपकी समस्या है, के बारे में दो अतिव्यापी विगेट्स के साथ, आप का उपयोग कर सकते हैं Stack इसे संभाल करने के लिए.

2021-11-23 11:16:23

@AmirAndroidDeveloper आप का उपयोग कर सकते हैं तैनात बच्चे के रूप में एक बच्चों की हो चुकी है और सेट शीर्ष, सही, ...
M Karimi
1

आप का उपयोग कर सकते हैं Stack के साथ Positioned ऐसा करने के लिए: यहाँ उदाहरण है:माउस के साथ

class StackExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(),
      body:  new Container(
        padding: const EdgeInsets.all(8.0),
          height: 500.0,
          width: 500.0,
          // alignment: FractionalOffset.center,
          child: new Stack(
            //alignment:new Alignment(x, y)
            children: <Widget>[
              new Icon(Icons.notifications, size: 36.0, color: const Color.fromRGBO(218, 165, 32, 1.0)),
              new Positioned(
                left: 20.0,
                child: new Icon(Icons.notifications, size: 36.0, color: const Color.fromRGBO(218, 165, 32, 1.0)),
              ),
              new Positioned(
                left:40.0,
                child: new Icon(Icons.notifications, size: 36.0, color: const Color.fromRGBO(218, 165, 32, 1.0)),
              )

            ],
          ),
        ),
      )
    ;
  }
}


class StackExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(),
      body:  new Container(
        padding: const EdgeInsets.all(8.0),
          height: 500.0,
          width: 500.0,
          // alignment: FractionalOffset.center,
          child: new Stack(
            //alignment:new Alignment(x, y)
            children: <Widget>[
              new Container(
                decoration: new BoxDecoration(
                  borderRadius: BorderRadius.circular(25.0),
                  boxShadow: [
                    new BoxShadow(
                      blurRadius: 5.0,
                      offset: const Offset(3.0, 0.0),
                      color: Colors.grey,
                    )
                  ]
                ),
                child: new Icon(Icons.notifications, size: 36.0, color: const Color.fromRGBO(218, 165, 32, 1.0))),
              new Positioned(
                left: 20.0,
                child: new Container(
                  decoration: new BoxDecoration(
                  borderRadius: BorderRadius.circular(25.0),
                  boxShadow: [
                    new BoxShadow(
                      blurRadius: 5.0,
                      offset: const Offset(3.0, 0.0),
                      color: Colors.grey,
                    )
                  ]
                ),
                  child: new Icon(Icons.notifications, size: 36.0, color: const Color.fromRGBO(218, 165, 32, 1.0))),
              ),
              new Positioned(
                left:40.0,
                child: new Container(
                  decoration: new BoxDecoration(
                  borderRadius: BorderRadius.circular(25.0),
                  boxShadow: [
                    new BoxShadow(
                      blurRadius: 5.0,
                      offset: const Offset(3.0, 0.0),
                      color: Colors.grey,
                    )
                  ]
                )
                  ,child: new Icon(Icons.notifications, size: 36.0, color: const Color.fromRGBO(218, 165, 32, 1.0))),
              )

            ],
          ),
        ),
      )
    ;
  }
}
2021-11-23 11:28:32

अन्य भाषाओं में

यह पृष्ठ अन्य भाषाओं में है

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................

इस श्रेणी में लोकप्रिय

लोकप्रिय सवाल इस श्रेणी में