Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created March 31, 2020 13:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save vijayinyoutube/c7831ed7fb297b53b778ac8153ca18cb to your computer and use it in GitHub Desktop.
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