part of 'pages.dart';

class TilesPage extends StatefulWidget {
  static const routeName = '/tiles_page';

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

class _TilesPageState extends State<TilesPage> {
  @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(
          'Tiles',
          style: TextStyle(fontSize: 17),
        ),
        centerTitle: true,
      ),
      body: ListView(
        children: <Widget>[
          const Padding(
            padding: EdgeInsets.only(left: 15, top: 30),
            child: LLSLabel(
              text: 'With Label',
              type: LLSLabelType.typo5,
              dividerWidth: 25,
              dividerColor: LLSColors.SECONDARY,
            ),
          ),
          LLSCard(
            content: LLSListTile(
              titleText: 'Title',
              subTitleText: 'Open source UI library',
              icon: Icon(Icons.favorite),
            ),
          ),
          LLSCard(
            padding: EdgeInsets.zero,
            content: LLSListTile(
              avatar: Icon(Icons.favorite),
              titleText: 'Title',
              icon: const Text('Caption'),
            ),
          ),
          const Padding(
            padding: EdgeInsets.only(left: 15, top: 5),
            child: LLSLabel(
              text: 'With Avatar',
              type: LLSLabelType.typo5,
              dividerWidth: 25,
              dividerColor: LLSColors.SECONDARY,
            ),
          ),
          const LLSCard(
            padding: EdgeInsets.zero,
            content: LLSListTile(
              avatar: LLSAvatar(
                backgroundImage: AssetImage('assets/images/avatar.png'),
                shape: LLSAvatarShape.circle,
              ),
              titleText: 'Title',
              subTitleText: 'Open source UI library',
            ),
          ),
          const LLSCard(
            padding: EdgeInsets.zero,
            content: LLSListTile(
              avatar: LLSAvatar(
                shape: LLSAvatarShape.rounded,
                backgroundImage: AssetImage('assets/images/avatar.png'),
              ),
              titleText: 'Title',
              icon: Text('Caption'),
            ),
          ),
        ]
      )
    );
  }
}