CopyPastor

Detecting plagiarism made easy.

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

Possible Plagiarism

Plagiarized on 2020-09-20
by evan

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;

You can set some padding below or set container height for this. I edit your code setting some padding, please check it.
class MyApp extends StatelessWidget { void onPressed(BuildContext context) async { await showModalBottomSheet( context: context, builder: (context) => Padding( padding: EdgeInsets.fromLTRB(0, 0, 0, 60), child: Column( mainAxisSize: MainAxisSize.min, children: <Widget>[ ListTile( title: Text('Delete'), onTap: () => Navigator.of(context).pop('delete'), ), Divider(), ListTile( title: Text('Cancel'), onTap: () => Navigator.of(context).pop('cancel'), ) ], ), ), ); } @override Widget build(BuildContext context) { return MaterialApp( home: CupertinoTabScaffold( tabBar: CupertinoTabBar(items: [ BottomNavigationBarItem( icon: Icon(Icons.music_note), ), BottomNavigationBarItem( icon: Icon(Icons.settings), ), ]), tabBuilder: (context, index) { switch (index) { case 0: return CupertinoTabView( builder: (context) { return CupertinoPageScaffold( child: FlatButton( child: Text('button'), onPressed: () => onPressed(context), ), ); }, ); case 1: return CupertinoTabView( builder: (context) { return CupertinoPageScaffold( child: Text('tab 2'), ); }, ); } return Container(); })); } }
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;