part of '../pages.dart';

class RoundedButtonPage extends StatefulWidget {
  static const routeName = '/buttons_page/rounded_button_page';

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

class _RoundedButtonPageState extends State<RoundedButtonPage> with SingleTickerProviderStateMixin {
  TabController? tabController;
  
  @override
  void initState() {
    super.initState();
    tabController = TabController(length: 2, vsync: this);
  }

  @override
  void dispose() {
    tabController!.dispose();
    super.dispose();
  }

  @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(
          'Rounded Buttons',
          style: TextStyle(fontSize: 17),
        ),
        centerTitle: true,
      ),
      body: ListView(
        children: [
          Container(
            width: double.infinity,
            height: 45,
            margin: EdgeInsets.only(top: 20, left: 25, right: 25),
            padding: EdgeInsets.zero,
            child: LLSSegmentTabs(
              tabController: tabController,
              width: double.infinity,
              length: 2,
              tabs: <Widget>[
                Tab(
                  child: Text(
                    'Solid',
                    style: TextStyle(fontSize: 15),
                  ),
                ),
                Tab(
                  child: Text(
                    'Outline',
                    style: TextStyle(fontSize: 15),
                  ),
                ),
              ],
              tabBarColor: LLSColors.LIGHT,
              indicatorSize: TabBarIndicatorSize.tab,
              labelColor: LLSColors.WHITE,
              unselectedLabelColor: LLSColors.DARK,
              indicator: BoxDecoration(
                color: LLSColors.SECONDARY,
                border: Border(
                  bottom: BorderSide(
                    color: LLSColors.SUCCESS,
                    width: 4,
                  ),
                ),
              ),
              indicatorWeight: 2,
              border: Border.all(color: Colors.white, width: 2),
            ),
          ),
          Container(
            height: MediaQuery.of(context).size.height - 140,
            child: LLSTabBarView(
              controller: tabController,
              physics: BouncingScrollPhysics(),
              children: <Widget>[
                Container(
                  child: ListView(
                    children: <Widget>[
                      const Padding(
                        padding: EdgeInsets.only(left: 15, top: 30),
                        child: LLSLabel(
                          text: 'Default',
                          type: LLSLabelType.typo5,
                          dividerWidth: 25,
                          dividerColor: LLSColors.SECONDARY,
                        ),
                      ),
                      LLSCard(
                        content: Column(
                          mainAxisAlignment: MainAxisAlignment.start,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: <Widget>[
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                LLSButton(
                                  onPressed: () {},
                                  shape: LLSButtonShape.rounded,
                                  child: const Text(
                                    'Primary',
                                  ),
                                  color: LLSColors.PRIMARY,
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  text: 'Secondary',
                                  color: LLSColors.SECONDARY,
                                  shape: LLSButtonShape.rounded,
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Success'),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.SUCCESS,
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Warning'),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.WARNING,
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Danger'),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.DANGER,
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Info'),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.INFO,
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Light'),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.LIGHT,
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Dark'),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.DARK,
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: Text(
                                    'Link',
                                    style: TextStyle(
                                      color: LLSColors.SECONDARY
                                    )
                                  ),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.TRANSPARENT,
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Orange'),
                                  color: LLSColors.TERTIARY,
                                  shape: LLSButtonShape.rounded
                                ),
                              ]
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                          ],
                        ),
                      ),
                      const Padding(
                        padding: EdgeInsets.only(left: 15, top: 10),
                        child: LLSLabel(
                          text: 'Disabled State',
                          type: LLSLabelType.typo5,
                          dividerWidth: 25,
                          dividerColor: LLSColors.SECONDARY,
                        ),
                      ),
                      LLSCard(
                        content: Column(
                          mainAxisAlignment: MainAxisAlignment.start,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: <Widget>[
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: const <Widget>[
                                LLSButton(
                                  onPressed: null,
                                  shape: LLSButtonShape.rounded,
                                  child: Text(
                                    'Primary',
                                  ),
                                  color: LLSColors.PRIMARY,
                                ),
                                LLSButton(
                                  onPressed: null,
                                  child: Text(
                                    'Secondary',
                                  ),
                                  color: LLSColors.SECONDARY,
                                  shape: LLSButtonShape.rounded,
                                ),
                                LLSButton(
                                  onPressed: null,
                                  child: Text('Success'),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.SUCCESS,
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: const <Widget>[
                                LLSButton(
                                  onPressed: null,
                                  child: Text('Warning'),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.WARNING,
                                ),
                                LLSButton(
                                  onPressed: null,
                                  child: Text('Danger'),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.DANGER,
                                ),
                                LLSButton(
                                  onPressed: null,
                                  child: Text('Info'),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.INFO,
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                const LLSButton(
                                  onPressed: null,
                                  child: Text('Light'),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.LIGHT,
                                ),
                                const LLSButton(
                                  onPressed: null,
                                  child: Text('Dark'),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.DARK,
                                ),
                                LLSButton(
                                  type: LLSButtonType.transparent,
                                  onPressed: null,
                                  child: Text(
                                    'Link',
                                    style: TextStyle(
                                      color: LLSColors.SECONDARY
                                    )
                                  ),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.TRANSPARENT,
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                LLSButton(
                                  onPressed: null,
                                  child: const Text('Orange'),
                                  color: LLSColors.TERTIARY,
                                  shape: LLSButtonShape.rounded
                                ),
                              ]
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                          ],
                        ),
                      ),
                      const Padding(
                        padding: EdgeInsets.only(left: 15, top: 10),
                        child: LLSLabel(
                          text: 'Button Sizes',
                          type: LLSLabelType.typo5,
                          dividerWidth: 25,
                          dividerColor: LLSColors.SECONDARY,
                        ),
                      ),
                      LLSCard(
                        content: Column(
                          mainAxisAlignment: MainAxisAlignment.start,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: <Widget>[
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Large',
                                      style:
                                          TextStyle(color: LLSColors.WHITE)),
                                  color: LLSColors.PRIMARY,
                                  size: LLSSize.LARGE,
                                  shape: LLSButtonShape.rounded,
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Normal',
                                      style:
                                          TextStyle(color: LLSColors.WHITE)),
                                  color: LLSColors.PRIMARY,
                                  size: LLSSize.MEDIUM,
                                  shape: LLSButtonShape.rounded,
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Small',
                                      style:
                                          TextStyle(color: LLSColors.WHITE)),
                                  color: LLSColors.PRIMARY,
                                  size: LLSSize.SMALL,
                                  shape: LLSButtonShape.rounded,
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                          ],
                        ),
                      ),
                      const Padding(
                        padding: EdgeInsets.only(left: 15, top: 10),
                        child: LLSLabel(
                          text: 'Block Buttons',
                          type: LLSLabelType.typo5,
                          dividerWidth: 25,
                          dividerColor: LLSColors.SECONDARY,
                        ),
                      ),
                      LLSCard(
                        content: Column(
                          mainAxisAlignment: MainAxisAlignment.start,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: <Widget>[
                            const SizedBox(
                              height: 10,
                            ),
                            LLSButton(
                              onPressed: () {},
                              blockButton: true,
                              child: const Text('Large',
                                  style: TextStyle(color: LLSColors.WHITE)),
                              color: LLSColors.PRIMARY,
                              size: LLSSize.LARGE,
                              shape: LLSButtonShape.rounded,
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            LLSButton(
                              onPressed: () {},
                              blockButton: true,
                              child: const Text('Normal',
                                  style: TextStyle(color: LLSColors.WHITE)),
                              color: LLSColors.PRIMARY,
                              size: LLSSize.MEDIUM,
                              shape: LLSButtonShape.rounded,
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            LLSButton(
                              onPressed: () {},
                              blockButton: true,
                              child: const Text('Small',
                                  style: TextStyle(color: LLSColors.WHITE)),
                              color: LLSColors.PRIMARY,
                              size: LLSSize.SMALL,
                              shape: LLSButtonShape.rounded,
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                          ],
                        ),
                      ),
                    ],
                  ),
                ),
                Container(
                  child: ListView(
                    children: <Widget>[
                      const Padding(
                        padding: EdgeInsets.only(left: 15, top: 30),
                        child: LLSLabel(
                          text: 'Default',
                          type: LLSLabelType.typo5,
                          dividerWidth: 25,
                          dividerColor: LLSColors.SECONDARY,
                        ),
                      ),
                      LLSCard(
                        content: Column(
                          mainAxisAlignment: MainAxisAlignment.start,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: <Widget>[
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                LLSButton(
                                  onPressed: () {},
                                  shape: LLSButtonShape.rounded,
                                  child: const Text(
                                    'Primary',
                                  ),
                                  type: LLSButtonType.outline,
                                  color: LLSColors.PRIMARY,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text(
                                    'Secondary',
                                  ),
                                  color: LLSColors.SECONDARY,
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Success'),
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.SUCCESS,
                                  widthBorderOutline: 2.0
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Warning'),
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.WARNING,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Danger'),
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.DANGER,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Info'),
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.INFO,
                                  widthBorderOutline: 2.0
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Light'),
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.LIGHT,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Dark'),
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.DARK,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: Text(
                                    'Link',
                                    style: TextStyle(
                                      color: LLSColors.SECONDARY
                                    )
                                  ),
                                  color: LLSColors.TRANSPARENT,
                                  shape: LLSButtonShape.rounded,
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text('Orange'),
                                  color: LLSColors.TERTIARY,
                                  shape: LLSButtonShape.rounded,
                                  type: LLSButtonType.outline,
                                  widthBorderOutline: 2.0
                                ),
                              ]
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                          ],
                        ),
                      ),
                      const Padding(
                        padding: EdgeInsets.only(left: 15, top: 10),
                        child: LLSLabel(
                          text: 'Disabled State',
                          type: LLSLabelType.typo5,
                          dividerWidth: 25,
                          dividerColor: LLSColors.SECONDARY,
                        ),
                      ),
                      LLSCard(
                        content: Column(
                          mainAxisAlignment: MainAxisAlignment.start,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: <Widget>[
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: const <Widget>[
                                LLSButton(
                                  onPressed: null,
                                  shape: LLSButtonShape.rounded,
                                  child: Text(
                                    'Primary',
                                  ),
                                  type: LLSButtonType.outline,
                                  color: LLSColors.PRIMARY,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  onPressed: null,
                                  child: Text(
                                    'Secondary',
                                  ),
                                  color: LLSColors.SECONDARY,
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  onPressed: null,
                                  child: Text('Success'),
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.SUCCESS,
                                  widthBorderOutline: 2.0
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: const <Widget>[
                                LLSButton(
                                  onPressed: null,
                                  child: Text('Warning'),
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.WARNING,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  onPressed: null,
                                  child: Text('Danger'),
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.DANGER,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  onPressed: null,
                                  child: Text('Info'),
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.INFO,
                                  widthBorderOutline: 2.0
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                const LLSButton(
                                  onPressed: null,
                                  child: Text('Light'),
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.LIGHT,
                                  widthBorderOutline: 2.0
                                ),
                                const LLSButton(
                                  onPressed: null,
                                  child: Text('Dark'),
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.DARK,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  type: LLSButtonType.transparent,
                                  onPressed: null,
                                  child: Text(
                                    'Link',
                                    style: TextStyle(
                                      color: LLSColors.SECONDARY
                                    )
                                  ),
                                  shape: LLSButtonShape.rounded,
                                  color: LLSColors.TRANSPARENT,
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                LLSButton(
                                  onPressed: null,
                                  child: const Text('Orange'),
                                  color: LLSColors.TERTIARY,
                                  shape: LLSButtonShape.rounded,
                                  type: LLSButtonType.outline,
                                  widthBorderOutline: 2.0
                                ),
                              ]
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                          ],
                        ),
                      ),
                      const Padding(
                        padding: EdgeInsets.only(left: 15, top: 10),
                        child: LLSLabel(
                          text: 'Button Sizes',
                          type: LLSLabelType.typo5,
                          dividerWidth: 25,
                          dividerColor: LLSColors.SECONDARY,
                        ),
                      ),
                      LLSCard(
                        content: Column(
                          mainAxisAlignment: MainAxisAlignment.start,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: <Widget>[
                            const SizedBox(
                              height: 10,
                            ),
                            Row(
                              mainAxisAlignment:
                                  MainAxisAlignment.spaceBetween,
                              children: <Widget>[
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text(
                                    'Large',
                                  ),
                                  color: LLSColors.PRIMARY,
                                  size: LLSSize.LARGE,
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text(
                                    'Normal',
                                  ),
                                  color: LLSColors.PRIMARY,
                                  size: LLSSize.MEDIUM,
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  widthBorderOutline: 2.0
                                ),
                                LLSButton(
                                  onPressed: () {},
                                  child: const Text(
                                    'Small',
                                  ),
                                  color: LLSColors.PRIMARY,
                                  size: LLSSize.SMALL,
                                  type: LLSButtonType.outline,
                                  shape: LLSButtonShape.rounded,
                                  widthBorderOutline: 2.0
                                ),
                              ],
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                          ],
                        ),
                      ),
                      const Padding(
                        padding: EdgeInsets.only(left: 15, top: 20),
                        child: LLSLabel(
                          text: 'Block Buttons',
                          type: LLSLabelType.typo5,
                          dividerWidth: 25,
                          dividerColor: LLSColors.SECONDARY,
                        ),
                      ),
                      LLSCard(
                        content: Column(
                          mainAxisAlignment: MainAxisAlignment.start,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: <Widget>[
                            const SizedBox(
                              height: 10,
                            ),
                            LLSButton(
                              onPressed: () {},
                              blockButton: true,
                              child: const Text(
                                'Large',
                              ),
                              color: LLSColors.PRIMARY,
                              size: LLSSize.LARGE,
                              type: LLSButtonType.outline,
                              shape: LLSButtonShape.rounded,
                              widthBorderOutline: 2.0
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            LLSButton(
                              onPressed: () {},
                              blockButton: true,
                              child: const Text(
                                'Normal',
                              ),
                              color: LLSColors.PRIMARY,
                              size: LLSSize.MEDIUM,
                              type: LLSButtonType.outline,
                              shape: LLSButtonShape.rounded,
                              widthBorderOutline: 2.0
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                            LLSButton(
                              onPressed: () {},
                              blockButton: true,
                              child: const Text(
                                'Small',
                              ),
                              color: LLSColors.PRIMARY,
                              size: LLSSize.SMALL,
                              type: LLSButtonType.outline,
                              shape: LLSButtonShape.rounded,
                              widthBorderOutline: 2.0
                            ),
                            const SizedBox(
                              height: 10,
                            ),
                          ],
                        ),
                      ),
                    ],
                  ),
                ),
              ]
            ),
          )
        ]
      )
    );
  }
}