CopyPastor

Detecting plagiarism made easy.

Score: 0.8170475959777832; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2022-01-24
by Devindi

Original Post

Original - Posted on 2019-10-09
by Sonu Saini



            
Present in both answers; Present only in the new answer; Present only in the old answer;

this is how I arranged my code. still, I was unable to get both the green box and search bar parallel. how can I arrange this properly?
[![enter image description here][1]][1]
body: ListView( children: [ Row( children: [ Padding( padding: const EdgeInsets.fromLTRB(20, 50, 0, 0), child: Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(20.0), color: Color(0xffCAEC93), ), height: 60, width: 60, ) ), ], ), ), buildSearchInput(), Widget buildSearchInput() => Padding( padding: const EdgeInsets.fromLTRB(150, 0, 20, 0), child: Container( decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(14)), child: Padding( padding: const EdgeInsets.only(left: 20.0, right: 20), child: Row( children: [ Icon( Icons.search, size: 30, color: Colors.grey.shade400, ), Flexible( child: TextField( decoration: InputDecoration(border: InputBorder.none), ), ), ], ), ), ), );
[1]: https://i.stack.imgur.com/pOv1C.png
You can add `Container` and `ListView` in `Column`.
```dart import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); }
class _MyAppState extends State<MyApp> { @override void initState() { // TODO: implement initState super.initState(); }
@override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( appBar: AppBar( title: Text("Demo App1"), ), body: Column( children: <Widget>[ Container( height: 40.0, child: Row( children: <Widget>[ Container( padding: EdgeInsets.all(4.0), width: 100.0, child: Text( "Name", style: TextStyle(fontSize: 18), )), Container( padding: EdgeInsets.all(4.0), width: 100.0, child: Text( "Age", style: TextStyle(fontSize: 18), )), ], ), ), Expanded( child: ListView.builder( itemCount: 100, itemBuilder: (BuildContext context, int index) { return Row( children: <Widget>[ Container( padding: EdgeInsets.all(4.0), width: 100.0, child: Text( "Name $index", style: TextStyle(fontSize: 18), )), Container( padding: EdgeInsets.all(4.0), width: 100.0, child: Text( "Age $index", style: TextStyle(fontSize: 18), ), ) ], ); }, ), ), ], ), ), ); } } ```

        
Present in both answers; Present only in the new answer; Present only in the old answer;