Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abstract class EditorPageState extends NavigationPageState {
- initState() {
- super.initState();
- var elements = widget.path.split('/');
- IconData icon;
- navigationTree.add(
- Positioned(
- left: 0.0,
- right: 0.0,
- top: 0.0,
- bottom: 0.0,
- child: Hero(
- tag: "NavBarBackground",
- child: Container(
- color: ThemeColors.black,
- ),
- ),
- ),
- );
- for (int i = 0; i < elements.length; i++) {
- switch (i) {
- case 0:
- icon = Icons.home;
- break;
- case 1:
- icon = Icons.book;
- break;
- case 2:
- icon = Icons.add_box;
- break;
- case 3:
- icon = Icons.pages;
- break;
- case 4:
- icon = Icons.list;
- break;
- case 5:
- icon = Icons.check;
- break;
- case 6:
- icon = Icons.note_add;
- break;
- case 7:
- icon = Icons.note;
- break;
- default:
- break;
- }
- navigationTree.add(
- Positioned(
- top: i * 50.0,
- child: Hero(
- tag: i,
- child: Material(
- child: SizedBox(
- height: 50.0,
- width: 50.0,
- child: InkWell(
- onTap: goBackTo(i),
- child: Icon(icon),
- ),
- ),
- ),
- ),
- ),
- );
- }
- navigationTree.add(
- Positioned(
- top: (elements.length * 50.0),
- left: 50.0,
- child: Hero(
- tag: elements.length,
- child: SizedBox(
- height: 50.0,
- width: 50.0,
- ),
- ),
- ),
- );
- navigationTree.add(
- Positioned(
- top: (elements.length - 1) * 50.0,
- child: Hero(
- tag: "CurrentNavigationPosition",
- child: Container(
- width: 50.0,
- height: 50.0,
- color: ThemeColors.primaryTransparent,
- ),
- ),
- ),
- );
- }
- }
Add Comment
Please, Sign In to add comment