bottom: TabBar(
unselectedLabelColor: Colors.lightGreen,
indicatorSize: TabBarIndicatorSize.label,
indicator: BoxDecoration(
borderRadius: BorderRadius.circular(40),
color: Colors.lightGreen
),
tabs: [
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
border: Border.all(color: Colors.lightGreen, width: 1)),
child: Align(
alignment: Alignment.center,
child: Text("HOME"),
),
),
),
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
border: Border.all(color: Colors.lightGreen, width: 1)),
child: Align(
alignment: Alignment.center,
child: Text("SCHOOL"),
),
),
),
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
border: Border.all(color: Colors.lightGreen, width: 1)),
child: Align(
alignment: Alignment.center,
child: Text("MEMORY"),
),
),
),
]),
),
body: TabBarView(children: [
Icon(Icons.home,size: 30,),
Icon(Icons.school, size: 30,),
Icon(Icons.memory, size: 30,),
]),
import 'package:flutter/material.dart';
import 'package:gradient_bottom_navigation_bar/gradient_bottom_navigation_bar.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'App Design',
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
title: Text('Tabbar Design'),
backgroundColor: Colors.black,
elevation: 0,
bottom: TabBar(
unselectedLabelColor: Colors.lightGreen,
indicatorSize: TabBarIndicatorSize.label,
indicator: BoxDecoration(
borderRadius: BorderRadius.circular(40),
color: Colors.lightGreen),
tabs: [
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
border: Border.all(color: Colors.lightGreen, width: 1)),
child: Align(
alignment: Alignment.center,
child: Text("HOME"),
),
),
),
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
border: Border.all(color: Colors.lightGreen, width: 1)),
child: Align(
alignment: Alignment.center,
child: Text("SCHOOL"),
),
),
),
Tab(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
border: Border.all(color: Colors.lightGreen, width: 1)),
child: Align(
alignment: Alignment.center,
child: Text("MEMORY"),
),
),
),
]),
),
body: TabBarView(children: [
Icon(Icons.home,size: 30,),
Icon(Icons.school, size: 30,),
Icon(Icons.memory, size: 30,),
]),
),
);
}
}