Advertisement
rajath_pai

flutter 2

Jul 17th, 2021
989
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.59 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() => runApp(MyApp());
  4.  
  5. class MyApp extends StatelessWidget{
  6.   @override
  7.   Widget build(BuildContext context){
  8.     return MaterialApp(
  9.       // theme : ThemeData(
  10.       //   brightness: Brightness.dark,
  11.       //   primaryColor: Colors.black
  12.       // ),
  13.       // home : Scaffold(
  14.       //   appBar: AppBar(
  15.       //     title: const Text('Home'),
  16.       //     centerTitle: true,
  17.       //     actions: <Widget>[
  18.       //       IconButton(
  19.       //           icon: Icon(Icons.comment),
  20.       //           tooltip: 'Comment icon',
  21.       //           onPressed: () {},
  22.       //         ),
  23.       //       IconButton(
  24.       //         icon: Icon(Icons.settings),
  25.       //         tooltip: 'Settings icon',
  26.       //         onPressed: (){},
  27.       //       ),
  28.       //     ],
  29.       //     // elevation : 50.0,
  30.       //     leading: IconButton(  //this just creates a dummy button, comment this if you are using drawer
  31.       //       icon : Icon(Icons.menu),
  32.       //       tooltip: 'Menu icon',
  33.       //       onPressed: (){},
  34.       //     ),
  35.       //     //brightness: Brightness.dark, //Not sure what this did, it didn't change much
  36.       //     //backgroundColor: Colors.red,
  37.       //     //shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(360)),
  38.       //   ),
  39.       //   body: const Center(
  40.       //     child: Text(
  41.       //       "Rajath",
  42.       //       style: TextStyle(fontSize: 24),
  43.       //     ),
  44.       //   ),
  45.       // ),
  46.       home : DefaultTabController(
  47.         length: 5,
  48.         child: Scaffold(
  49.           appBar: AppBar(
  50.             title: const Text('Home'),
  51.             centerTitle: true,
  52.             backgroundColor: Colors.white,
  53.             bottom: TabBar(
  54.               tabs: [
  55.                 Tab(icon : Icon(Icons.music_note, color : Colors.green)),
  56.                 Tab(icon : Icon(Icons.music_video, color: Colors.amber)),
  57.                 Tab(icon : Icon(Icons.camera_alt, color : Colors.black)),
  58.                 Tab(icon : Icon(Icons.grade, color : Colors.pinkAccent)),
  59.                 Tab(icon : Icon(Icons.email, color : Colors.red)),
  60.               ],
  61.             ),
  62.           ),
  63.           body: TabBarView(
  64.             children: [
  65.               Text(
  66.                 'Lyrics',
  67.                 textAlign: TextAlign.center,
  68.               ),
  69.               Icon(Icons.music_video),
  70.               Icon(Icons.camera_alt),
  71.               Icon(Icons.grade),
  72.               Icon(Icons.email),
  73.             ],
  74.           ),
  75.         )
  76.       ),
  77.       debugShowCheckedModeBanner: false,
  78.     );
  79.   }
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement