Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kimmanwky committed Jul 26, 2021
1 parent 042d9e2 commit 3f8facb
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A beautiful animated widget for your Flutter apps

### v0.1.x animation preview

![MotionTabBar Gif](https://github.com/therezacuet/Motion-Tab-Bar/blob/master/motiontabbar.gif?raw=true)
![MotionTabBar Gif](https://github.com/kimmanwky/Motion-Tab-Bar/blob/master/motiontabbar.gif?raw=true)

<br>

Expand Down Expand Up @@ -42,7 +42,11 @@ import 'package:motion_tab_bar_v2/motion-badge.widget.dart';
@override
void initState() {
super.initState();
_tabController = new TabController(initialIndex:1,vsync: this);
_tabController = TabController(
initialIndex: 1,
length: 4,
vsync: this,
);
}
@override
Expand Down Expand Up @@ -113,5 +117,27 @@ import 'package:motion_tab_bar_v2/motion-badge.widget.dart';
_tabController!.index = value;
});
},
)
),
```

### add TabBarView to Scaffold body

```dart
body: TabBarView(
controller: _tabController,
children: <Widget>[
const Center(
child: Text("Dashboard"),
),
const Center(
child: Text("Home"),
),
const Center(
child: Text("Profile"),
),
const Center(
child: Text("Settings"),
),
],
),
```

0 comments on commit 3f8facb

Please sign in to comment.