part of '../pages.dart';

class TabsPage extends StatefulWidget {
  static const routeName = '/tabs_page/tabs_page';

  @override
  _TabsPageState createState() => _TabsPageState();
}

class _TabsPageState extends State<TabsPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: LLSColors.PRIMARY,
        leading: InkWell(
          onTap: () {
            Navigator.of(context).pop();
          },
          child: Container(
            child: Icon(
              CupertinoIcons.back,
              color: LLSColors.WHITE,
            ),
          ),
        ),
        title: const Text(
          'Tabs',
          style: TextStyle(fontSize: 17),
        ),
        centerTitle: true,
      ),
      body: ListView(
        children: <Widget>[
          const SizedBox(
            height: 20,
          ),
          GestureDetector(
            onTap: () {
              Navigator.of(context).pushNamed(
                SegmentedTabPage.routeName
              );
            },
            child: Container(
              margin: const EdgeInsets.only(left: 15, right: 15, top: 20),
              padding: const EdgeInsets.all(5),
              decoration: BoxDecoration(
                borderRadius: const BorderRadius.all(Radius.circular(7)),
                color: LLSColors.SECONDARY,
                boxShadow: [
                  BoxShadow(
                    color: Colors.black.withOpacity(0.40),
                    blurRadius: 5
                  )
                ]
              ),
              child: LLSListTile(
                color: LLSColors.SECONDARY,
                title: const Text(
                  'Segmented Tab',
                  style: TextStyle(color: LLSColors.WHITE),
                ),
                icon: Icon(
                  CupertinoIcons.forward,
                  color: LLSColors.WHITE,
                )
              ),
            )
          ),
          GestureDetector(
            onTap: () {
              Navigator.of(context).pushNamed(
                IconTabPage.routeName
              );
            },
            child: Container(
              margin: const EdgeInsets.only(left: 15, right: 15, top: 20),
              padding: const EdgeInsets.all(5),
              decoration: BoxDecoration(
                borderRadius: const BorderRadius.all(Radius.circular(7)),
                color: LLSColors.SECONDARY,
                boxShadow: [
                  BoxShadow(
                    color: Colors.black.withOpacity(0.40),
                    blurRadius: 5
                  )
                ]
              ),
              child: LLSListTile(
                color: LLSColors.SECONDARY,
                title: const Text(
                  'Icon Tab',
                  style: TextStyle(color: LLSColors.WHITE),
                ),
                icon: Icon(
                  CupertinoIcons.forward,
                  color: LLSColors.WHITE,
                )
              ),
            )
          ),
          GestureDetector(
            onTap: () {
              Navigator.of(context).pushNamed(
                LabeledTabPage.routeName
              );
            },
            child: Container(
              margin: const EdgeInsets.only(left: 15, right: 15, top: 20),
              padding: const EdgeInsets.all(5),
              decoration: BoxDecoration(
                borderRadius: const BorderRadius.all(Radius.circular(7)),
                color: LLSColors.SECONDARY,
                boxShadow: [
                  BoxShadow(
                    color: Colors.black.withOpacity(0.40),
                    blurRadius: 5
                  )
                ]
              ),
              child: LLSListTile(
                color: LLSColors.SECONDARY,
                title: const Text(
                  'Labeled Tab',
                  style: TextStyle(color: LLSColors.WHITE),
                ),
                icon: Icon(
                  CupertinoIcons.forward,
                  color: LLSColors.WHITE,
                )
              ),
            )
          ),
          GestureDetector(
            onTap: () {
              Navigator.of(context).pushNamed(
                BottomIconTabPage.routeName
              );
            },
            child: Container(
              margin: const EdgeInsets.only(left: 15, right: 15, top: 20),
              padding: const EdgeInsets.all(5),
              decoration: BoxDecoration(
                borderRadius: const BorderRadius.all(Radius.circular(7)),
                color: LLSColors.SECONDARY,
                boxShadow: [
                  BoxShadow(
                    color: Colors.black.withOpacity(0.40),
                    blurRadius: 5
                  )
                ]
              ),
              child: LLSListTile(
                color: LLSColors.SECONDARY,
                title: const Text(
                  'Bottom Icon Tab',
                  style: TextStyle(color: LLSColors.WHITE),
                ),
                icon: Icon(
                  CupertinoIcons.forward,
                  color: LLSColors.WHITE,
                )
              ),
            )
          ),
          GestureDetector(
            onTap: () {
              Navigator.of(context).pushNamed(
                BottomLabeledTabPage.routeName
              );
            },
            child: Container(
              margin: const EdgeInsets.only(left: 15, right: 15, top: 20),
              padding: const EdgeInsets.all(5),
              decoration: BoxDecoration(
                borderRadius: const BorderRadius.all(Radius.circular(7)),
                color: LLSColors.SECONDARY,
                boxShadow: [
                  BoxShadow(
                    color: Colors.black.withOpacity(0.40),
                    blurRadius: 5
                  )
                ]
              ),
              child: LLSListTile(
                color: LLSColors.SECONDARY,
                title: const Text(
                  'Bottom Labeled Tab',
                  style: TextStyle(color: LLSColors.WHITE),
                ),
                icon: Icon(
                  CupertinoIcons.forward,
                  color: LLSColors.WHITE,
                )
              ),
            )
          ),
        ]
      )
    );
  }
}