Merhaba arkadaşlar, projemde bir yerde takıldım yardımcı olabilecek varsa çok sevinirim. Ekteki resimde de görüleceği üzere bir satır yapmak istiyorum. Ancak iconu container box ile oluşturdum. Oluşturduğum containerı resimdeki gibi satırın üzerine çıkartmam ve gölgeleme yapmam gerek gölgelemede sıkıntı yok ama satır üstüne çıkaramıyorum haliyle satırda onunla birlikte büyüyor.

  • Flutter and mayhemious like this.
  • mayhemious

    Söyle birsey size tasariminiz icin fikir verebilir.

    
    class Deneme extends StatefulWidget {
      @override
      _DenemeState createState() => _DenemeState();
    }
    
    class _DenemeState extends State<Deneme> {
      @override
      Widget build(BuildContext context) {
        return Scaffold(
            appBar: AppBar(),
            backgroundColor: Colors.amber,
            body: Stack(
              children: <Widget>[
                Column(
                  children: <Widget>[
                    Expanded(
                      child: Center(
                        child: Text('icerik'),
                      ),
                    ),
                    Container(
                      padding: const EdgeInsets.only(right: 150.0),
                      width: double.infinity,
                      color: Colors.white,
                      child: Padding(
                        padding: const EdgeInsets.all(8.0),
                        child: TextField(
                          textAlign: TextAlign.left,
                          decoration: InputDecoration(
                            hintText: 'yaziniz',
                            hintStyle: TextStyle(
                              color: Colors.grey,
                              fontFamily: 'OpenSans',
                            ),
                          ),
                        ),
                      ),
                    ),
                  ],
                ),
                Positioned(
                  bottom: 20,
                  right: 25,
                  child: Container(
                    width: 75,
                    height: 75,
                    decoration: BoxDecoration(
                      color: Colors.white,
                      shape: BoxShape.circle,
                    ),
                    child: Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: Container(
                        height: 50,
                        width: 50,
                        decoration: BoxDecoration(
                          shape: BoxShape.circle,
                          color: Colors.blue,
                        ),
                        child: Icon(Icons.send),
                      ),
                    ),
                  ),
                ),
              ],
            ));
      }
    }

stack widget’ i arastirmanizi öneririm. suan deneme imkanım olmadigindan kod paylasamiyorum.
stack widget içerisine TextField ve buton Container i yerleştirin.
container i positioned widget i ile konumlandırın.
asagidaki yapı gibi olacaktır. container renkleri ayni olacak

stack
-container
    --textfield
-positioned
    --container
        ---button

Bende şöyle birşey yaptım

Row(
                mainAxisAlignment: MainAxisAlignment.start,
                children: <Widget>[
                  
Flexible( fit: FlexFit.tight, flex: 6, child: Padding( padding: const EdgeInsets.all(8.0), child: TextField( controller: isaret, style: TextStyle(fontSize: 24), textAlign: TextAlign.start, decoration: InputDecoration( border: OutlineInputBorder( borderSide: BorderSide( color: Colors.blue, width: 25, ), borderRadius: BorderRadius.all(Radius.circular(10)), ), ), ), ), ), Flexible( fit: FlexFit.loose, flex: 1, child: Padding( padding: const EdgeInsets.all(8.0), child: CircleAvatar( child: Icon(Icons.near_me,color: Colors.white,size: 46,),backgroundColor: Colors.green,radius:46, ), ), ), ], ), ``

mayhemious

Söyle birsey size tasariminiz icin fikir verebilir.


class Deneme extends StatefulWidget {
  @override
  _DenemeState createState() => _DenemeState();
}

class _DenemeState extends State<Deneme> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(),
        backgroundColor: Colors.amber,
        body: Stack(
          children: <Widget>[
            Column(
              children: <Widget>[
                Expanded(
                  child: Center(
                    child: Text('icerik'),
                  ),
                ),
                Container(
                  padding: const EdgeInsets.only(right: 150.0),
                  width: double.infinity,
                  color: Colors.white,
                  child: Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: TextField(
                      textAlign: TextAlign.left,
                      decoration: InputDecoration(
                        hintText: 'yaziniz',
                        hintStyle: TextStyle(
                          color: Colors.grey,
                          fontFamily: 'OpenSans',
                        ),
                      ),
                    ),
                  ),
                ),
              ],
            ),
            Positioned(
              bottom: 20,
              right: 25,
              child: Container(
                width: 75,
                height: 75,
                decoration: BoxDecoration(
                  color: Colors.white,
                  shape: BoxShape.circle,
                ),
                child: Padding(
                  padding: const EdgeInsets.all(8.0),
                  child: Container(
                    height: 50,
                    width: 50,
                    decoration: BoxDecoration(
                      shape: BoxShape.circle,
                      color: Colors.blue,
                    ),
                    child: Icon(Icons.send),
                  ),
                ),
              ),
            ),
          ],
        ));
  }
}
5 months later
Write a Reply...