CopyPastor

Detecting plagiarism made easy.

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

Possible Plagiarism

Plagiarized on 2022-06-30
by Tushar Lathiya

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;

As i under stand you want to add `PageView` in side `ListView`. So your `ListView` scroll in vertical direction and your `PageView` scroll in horizontal direction. If i am not wrong then below is my code to do the same things.
I have made my `List` which contain multiple `List` like below.
var modelListOne = ["model_1_1.png", "model_1_2.png",]; var modelListTwo = ["model_2_1.png", "model_2_2.png",];
var modelList = [modelListOne, modelListTwo,];
ListView.builder( itemCount: modelList.length, itemBuilder: (context, index) { return InkWell( onTap: () { Navigator.push( context, MaterialPageRoute( builder: (context) => pageList[index])); }, child: Card( child: Padding( padding: const EdgeInsets.all(16.0), child: Container( height: 350, width: double.maxFinite, child: PageView.builder( itemCount: modelList[index].length, scrollDirection: Axis.horizontal, itemBuilder: (context, pageIndex) { return Container( height: 300, width: double.maxFinite, decoration: BoxDecoration( image: DecorationImage( image: AssetImage( "assets/images/${modelList[index][pageIndex]}", ), fit: BoxFit.cover)), ); }), )), ), ); });
Make changes regarding to your requirements. Thanks.
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;