How can i center a widget between two column children? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!What is the relation between stateful and stateless widgets in Flutter?Flutter: how to traverse a Widget children?A column widget there all children match biggest widget widthStreamBuilder Widget is not rendered if nested in children: <Widget>[]In Flutter, how to balance the children of the Wrap widget?How to align single widgets in Flutter?How to remove space between widgets in Column in flutter?Flutter positioning widgets in ColumnHow to align center Y of widget to top edge of anotherFlutter: How to align widget to the topRight of column?

Why do the Z-fighters hide their power?

Does the main washing effect of soap come from foam?

Where and when has Thucydides been studied?

Is there night in Alpha Complex?

What does Sonny Burch mean by, "S.H.I.E.L.D. and HYDRA don't even exist anymore"?

Twin's vs. Twins'

How do I say "this must not happen"?

How to make an animal which can only breed for a certain number of generations?

An isoperimetric-type inequality inside a cube

Why can't fire hurt Daenerys but it did to Jon Snow in season 1?

French equivalents of おしゃれは足元から (Every good outfit starts with the shoes)

Searching extreme points of polyhedron

Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?

Does a random sequence of vectors span a Hilbert space?

Is the Mordenkainen's Sword spell underpowered?

Should man-made satellites feature an intelligent inverted "cow catcher"?

Vertical ranges of Column Plots in 12

Flight departed from the gate 5 min before scheduled departure time. Refund options

How to get a flat-head nail out of a piece of wood?

How do Java 8 default methods hеlp with lambdas?

New Order #6: Easter Egg

By what mechanism was the 2017 UK General Election called?

How to achieve cat-like agility?

The test team as an enemy of development? And how can this be avoided?



How can i center a widget between two column children?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!What is the relation between stateful and stateless widgets in Flutter?Flutter: how to traverse a Widget children?A column widget there all children match biggest widget widthStreamBuilder Widget is not rendered if nested in children: <Widget>[]In Flutter, how to balance the children of the Wrap widget?How to align single widgets in Flutter?How to remove space between widgets in Column in flutter?Flutter positioning widgets in ColumnHow to align center Y of widget to top edge of anotherFlutter: How to align widget to the topRight of column?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I have a column which contains 3 children.



How can i place a widget (red rectangle) on top of this column and center it between the second and the last child?



This is what i try to achieve:



enter image description here










share|improve this question






















  • What is the use-case? This is not something that you can naturally achieve using widgets

    – Rémi Rousselet
    Mar 22 at 13:40











  • 1-3 are buttons which lead to further functions. The red rectangle widget should be shown, when the user is not logged in (=overlay for buttons 2&3). Buttons 2&3 are in disabled state, but i also need this rectangle for a message box. I have achieved it with a Stack-widget and margin-value, but i prefer a solution with "real center" between those two widgets.

    – Jan Möller
    Mar 22 at 14:14

















1















I have a column which contains 3 children.



How can i place a widget (red rectangle) on top of this column and center it between the second and the last child?



This is what i try to achieve:



enter image description here










share|improve this question






















  • What is the use-case? This is not something that you can naturally achieve using widgets

    – Rémi Rousselet
    Mar 22 at 13:40











  • 1-3 are buttons which lead to further functions. The red rectangle widget should be shown, when the user is not logged in (=overlay for buttons 2&3). Buttons 2&3 are in disabled state, but i also need this rectangle for a message box. I have achieved it with a Stack-widget and margin-value, but i prefer a solution with "real center" between those two widgets.

    – Jan Möller
    Mar 22 at 14:14













1












1








1








I have a column which contains 3 children.



How can i place a widget (red rectangle) on top of this column and center it between the second and the last child?



This is what i try to achieve:



enter image description here










share|improve this question














I have a column which contains 3 children.



How can i place a widget (red rectangle) on top of this column and center it between the second and the last child?



This is what i try to achieve:



enter image description here







flutter






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 at 13:31









Jan MöllerJan Möller

134215




134215












  • What is the use-case? This is not something that you can naturally achieve using widgets

    – Rémi Rousselet
    Mar 22 at 13:40











  • 1-3 are buttons which lead to further functions. The red rectangle widget should be shown, when the user is not logged in (=overlay for buttons 2&3). Buttons 2&3 are in disabled state, but i also need this rectangle for a message box. I have achieved it with a Stack-widget and margin-value, but i prefer a solution with "real center" between those two widgets.

    – Jan Möller
    Mar 22 at 14:14

















  • What is the use-case? This is not something that you can naturally achieve using widgets

    – Rémi Rousselet
    Mar 22 at 13:40











  • 1-3 are buttons which lead to further functions. The red rectangle widget should be shown, when the user is not logged in (=overlay for buttons 2&3). Buttons 2&3 are in disabled state, but i also need this rectangle for a message box. I have achieved it with a Stack-widget and margin-value, but i prefer a solution with "real center" between those two widgets.

    – Jan Möller
    Mar 22 at 14:14
















What is the use-case? This is not something that you can naturally achieve using widgets

– Rémi Rousselet
Mar 22 at 13:40





What is the use-case? This is not something that you can naturally achieve using widgets

– Rémi Rousselet
Mar 22 at 13:40













1-3 are buttons which lead to further functions. The red rectangle widget should be shown, when the user is not logged in (=overlay for buttons 2&3). Buttons 2&3 are in disabled state, but i also need this rectangle for a message box. I have achieved it with a Stack-widget and margin-value, but i prefer a solution with "real center" between those two widgets.

– Jan Möller
Mar 22 at 14:14





1-3 are buttons which lead to further functions. The red rectangle widget should be shown, when the user is not logged in (=overlay for buttons 2&3). Buttons 2&3 are in disabled state, but i also need this rectangle for a message box. I have achieved it with a Stack-widget and margin-value, but i prefer a solution with "real center" between those two widgets.

– Jan Möller
Mar 22 at 14:14












2 Answers
2






active

oldest

votes


















0














You can wrap Widget 2 & 3 in a Stack, then in that Stack have a Center Widget with the Red Widget inside of it.



This would only work if 2 & 3 are the same size though...






share|improve this answer






























    0














    You can create something like this,



    Column(
    mainAxisAlignment: MainAxisAlignment.center,
    children: <Widget>[
    RaisedButton(
    onPressed: null,
    child: Text("ONE"),
    ),
    Stack(
    alignment: Alignment.center,
    children: [
    Column(
    children: <Widget>[
    RaisedButton(
    onPressed: null,
    child: Text("TWO"),
    ),
    RaisedButton(
    onPressed: null,
    child: Text("THREE"),
    ),
    ],
    ),
    Align(
    alignment: Alignment.center,
    child: Container(
    color: Colors.red,
    height: 50,
    width: 50,
    ),
    )
    ],
    )
    ],
    ),


    • Column

      • Button

      • Stack

      • Column

        • Button

        • Button


      • Container(Red Area) Wrapped with Align Widget and Align by the center.






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55300738%2fhow-can-i-center-a-widget-between-two-column-children%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      You can wrap Widget 2 & 3 in a Stack, then in that Stack have a Center Widget with the Red Widget inside of it.



      This would only work if 2 & 3 are the same size though...






      share|improve this answer



























        0














        You can wrap Widget 2 & 3 in a Stack, then in that Stack have a Center Widget with the Red Widget inside of it.



        This would only work if 2 & 3 are the same size though...






        share|improve this answer

























          0












          0








          0







          You can wrap Widget 2 & 3 in a Stack, then in that Stack have a Center Widget with the Red Widget inside of it.



          This would only work if 2 & 3 are the same size though...






          share|improve this answer













          You can wrap Widget 2 & 3 in a Stack, then in that Stack have a Center Widget with the Red Widget inside of it.



          This would only work if 2 & 3 are the same size though...







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 22 at 17:56









          01leo01leo

          581115




          581115























              0














              You can create something like this,



              Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
              RaisedButton(
              onPressed: null,
              child: Text("ONE"),
              ),
              Stack(
              alignment: Alignment.center,
              children: [
              Column(
              children: <Widget>[
              RaisedButton(
              onPressed: null,
              child: Text("TWO"),
              ),
              RaisedButton(
              onPressed: null,
              child: Text("THREE"),
              ),
              ],
              ),
              Align(
              alignment: Alignment.center,
              child: Container(
              color: Colors.red,
              height: 50,
              width: 50,
              ),
              )
              ],
              )
              ],
              ),


              • Column

                • Button

                • Stack

                • Column

                  • Button

                  • Button


                • Container(Red Area) Wrapped with Align Widget and Align by the center.






              share|improve this answer



























                0














                You can create something like this,



                Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                RaisedButton(
                onPressed: null,
                child: Text("ONE"),
                ),
                Stack(
                alignment: Alignment.center,
                children: [
                Column(
                children: <Widget>[
                RaisedButton(
                onPressed: null,
                child: Text("TWO"),
                ),
                RaisedButton(
                onPressed: null,
                child: Text("THREE"),
                ),
                ],
                ),
                Align(
                alignment: Alignment.center,
                child: Container(
                color: Colors.red,
                height: 50,
                width: 50,
                ),
                )
                ],
                )
                ],
                ),


                • Column

                  • Button

                  • Stack

                  • Column

                    • Button

                    • Button


                  • Container(Red Area) Wrapped with Align Widget and Align by the center.






                share|improve this answer

























                  0












                  0








                  0







                  You can create something like this,



                  Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                  RaisedButton(
                  onPressed: null,
                  child: Text("ONE"),
                  ),
                  Stack(
                  alignment: Alignment.center,
                  children: [
                  Column(
                  children: <Widget>[
                  RaisedButton(
                  onPressed: null,
                  child: Text("TWO"),
                  ),
                  RaisedButton(
                  onPressed: null,
                  child: Text("THREE"),
                  ),
                  ],
                  ),
                  Align(
                  alignment: Alignment.center,
                  child: Container(
                  color: Colors.red,
                  height: 50,
                  width: 50,
                  ),
                  )
                  ],
                  )
                  ],
                  ),


                  • Column

                    • Button

                    • Stack

                    • Column

                      • Button

                      • Button


                    • Container(Red Area) Wrapped with Align Widget and Align by the center.






                  share|improve this answer













                  You can create something like this,



                  Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                  RaisedButton(
                  onPressed: null,
                  child: Text("ONE"),
                  ),
                  Stack(
                  alignment: Alignment.center,
                  children: [
                  Column(
                  children: <Widget>[
                  RaisedButton(
                  onPressed: null,
                  child: Text("TWO"),
                  ),
                  RaisedButton(
                  onPressed: null,
                  child: Text("THREE"),
                  ),
                  ],
                  ),
                  Align(
                  alignment: Alignment.center,
                  child: Container(
                  color: Colors.red,
                  height: 50,
                  width: 50,
                  ),
                  )
                  ],
                  )
                  ],
                  ),


                  • Column

                    • Button

                    • Stack

                    • Column

                      • Button

                      • Button


                    • Container(Red Area) Wrapped with Align Widget and Align by the center.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 22 at 18:11









                  ibhavikmakwanaibhavikmakwana

                  6811318




                  6811318



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55300738%2fhow-can-i-center-a-widget-between-two-column-children%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                      SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                      은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현