CopyPastor

Detecting plagiarism made easy.

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

Possible Plagiarism

Plagiarized on 2020-03-17
by Lucky Dog

Original Post

Original - Posted on 2019-10-09
by 97loser



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

Is this what you want?

class TestWidget extends StatefulWidget { @override _TestWidgetState createState() => _TestWidgetState(); } class _TestWidgetState extends State<TestWidget> with SingleTickerProviderStateMixin { bool isAbsorbing = false; TabController _primaryTC; final List<Tab> tabs = [ Tab( text: "tab1", ), Tab( text: "tab2", ), Tab( text: "tab3", ) ]; @override void initState() { super.initState(); _primaryTC = TabController(length: tabs.length, vsync: this); _primaryTC.index = tabs.length - 1; } @override Widget build(BuildContext context) { return Scaffold( body: Container( child: NestedScrollView( headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { return []..add(SliverAppBar( flexibleSpace: FlexibleSpaceBar( title: Text(""), ), expandedHeight: 500, pinned: true, floating: true, snap: false, )); }, body: Container( child: Column( children: <Widget>[ TabBar( tabs: tabs, controller: _primaryTC, ), Expanded(flex:1,child: TabBarView( controller: _primaryTC, children: tabs .map((tab) => Container( child: ListView.builder( itemCount: 30, itemBuilder: (context, index) { return Container(height: 50,alignment: Alignment.center,child: Text("test"),); }), width: double.infinity, height: double.infinity, alignment: Alignment.center, )) .toList())) ], ), )), ), ); } }

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;