Created
March 31, 2020 13:26
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: MyPage(), | |
); | |
} | |
} | |
class MyPage extends StatefulWidget { | |
@override | |
_MyPageState createState() => _MyPageState(); | |
} | |
class _MyPageState extends State<MyPage> { | |
@override | |
Widget build(BuildContext context) { | |
return new DefaultTabController( | |
length: 3, | |
child: new Scaffold( | |
appBar: new AppBar( | |
centerTitle: false, | |
title: new Text( | |
'Vijay Creations', | |
style: TextStyle(fontSize: 35, fontWeight: FontWeight.bold), | |
), | |
actions: <Widget>[ | |
IconButton( | |
icon: Icon( | |
Icons.settings, | |
color: Colors.white, | |
), | |
onPressed: () { | |
// do something | |
}, | |
) | |
], | |
flexibleSpace: Container( | |
decoration: BoxDecoration( | |
boxShadow: [new BoxShadow(blurRadius: 15.0)], | |
gradient: LinearGradient( | |
begin: Alignment.topLeft, | |
end: Alignment.bottomRight, | |
colors: <Color>[Color(0xFFFF1000), Color(0xFF2508FF)])), | |
), | |
bottom: new PreferredSize( | |
preferredSize: new Size(75.0, 75.0), | |
child: new Container( | |
width: 350.0, | |
child: new TabBar( | |
tabs: [ | |
new Container( | |
height: 55.0, | |
child: new Tab(text: 'Category'), | |
), | |
new Container( | |
height: 55.0, | |
child: new Tab(text: 'Markets'), | |
), | |
new Container( | |
height: 55.0, | |
child: new Tab(text: 'Exports'), | |
), | |
], | |
), | |
), | |
), | |
), | |
// body: ... | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment