CopyPastor

Detecting plagiarism made easy.

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

Possible Plagiarism

Plagiarized on 2022-08-22
by Mansoor Malik

Original Post

Original - Posted on 2020-08-26
by ajs.sonawane



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

Here is the idea how can you achieve your goal. The rest you can customize according to your.
You can use `tabbar` inside `column`
Step 1: Change `ListView` to `Column`
Step 2: Use `Expanded` and `mainAxisSize: MainAxisSize.min`
Full code:
return Scaffold( appBar: AppBar( automaticallyImplyLeading: true, title: Row( mainAxisAlignment: MainAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end, children: [ Text('Account Analysis'), ], ), ), body: Column( children: [ Expanded( child: Column( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('Hello World'), Expanded( child: DefaultTabController( length: 3, child: Column( mainAxisSize: MainAxisSize.min, children: <Widget>[ Container( color: Colors.blue, constraints: BoxConstraints.expand(height: 50), child: TabBar(tabs: [ Tab(text: "Home"), Tab(text: "Articles"), Tab(text: "User"), ]), ), Expanded( child: TabBarView(children: [ Container( child: Text("Home Body"), ), Container( child: Text("Articles Body"), ), Container( child: Text("User Body"), ), ]), ) ], ), ), ), Divider(color: Colors.black87), ], ), ), ], ), ); } } void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, ), home: Home144(), ); } }
you can use bottomNavigationBar
``` class _MyHomePageState extends State<MyHomePage> {
var selectedIndex = 0;
void onItemTapped(int index) { setState(() { selectedIndex = index; }); }
@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text("data"), backgroundColor: Colors.blueGrey.shade900, actions: <Widget>[Icon(Icons.notifications)], ), drawer: Drawer(), bottomNavigationBar: BottomNavigationBar( backgroundColor: Colors.amber, elevation: 12.0, type: BottomNavigationBarType.shifting, items: <BottomNavigationBarItem>[ BottomNavigationBarItem(icon: Icon(Icons.store), title: Text('Home')), BottomNavigationBarItem( icon: Icon(Icons.warning), title: Text('Warning')), ], showUnselectedLabels: true, currentIndex: selectedIndex, unselectedItemColor: Colors.white, fixedColor: Colors.teal, onTap: onItemTapped, ), body: SingleChildScrollView( child: Column( children: [ Container( color: Colors.blueGrey.shade900, width: double.infinity, height: MediaQuery.of(context).size.height * 0.15, child: Column( children: [ Padding( padding: const EdgeInsets.all(8.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Text( "Available Balance ₹ 10050", style: TextStyle( color: Colors.white, fontSize: 18, ), ), ], ), ), Padding( padding: const EdgeInsets.all(8.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ RaisedButton( onPressed: () {}, color: Colors.teal, child: Text( "Recharge", style: TextStyle(color: Colors.white), ), ), RaisedButton( onPressed: () {}, color: Colors.teal, child: Text( "Read Rule", style: TextStyle(color: Colors.white), ), ), Icon( Icons.refresh, color: Colors.white, ) ], ), ), SizedBox( height: 5, ), // I need to insert the tabBarHere ], ), ), ], ), ), ); }
```

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