part of 'pages.dart';

class ToastPage extends StatefulWidget {
  const ToastPage({ Key? key }) : super(key: key);
  static const routeName = '/toast_page';

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

class _ToastPageState extends State<ToastPage> {
  bool showFloatingToast = true;
  bool showblurness = true;
  Duration autoTimerDuration = Duration(milliseconds: 400);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: LLSColors.PRIMARY,
        leading: InkWell(
          onTap: () {
            Navigator.pop(context);
          },
          child: Icon(
            CupertinoIcons.back,
            color: LLSColors.WHITE,
          ),
        ),
        title: const Text(
          'Toast',
          style: TextStyle(fontSize: 17),
        ),
        centerTitle: true,
      ),
      body: ListView(
        physics: const ScrollPhysics(),
        children: <Widget>[
          const Padding(
            padding: EdgeInsets.only(left: 15, top: 30, bottom: 10),
            child: LLSLabel(
              text: 'Animated Toasts (Auto Dismissable)',
              type: LLSLabelType.typo5,
              dividerWidth: 25,
              dividerColor: LLSColors.SECONDARY,
            ),
          ),
          LLSToast(
            text: 'Auto Dismissable after the given duration !',
            button: LLSButton(
              onPressed: () {},
              text: 'OK',
              type: LLSButtonType.transparent,
              color: LLSColors.SUCCESS,
            ),
            autoDismiss: true,
            duration: const Duration(seconds: 1),
          ),
          const SizedBox(
            height: 15,
          ),
          const LLSToast(
            text: 'Pass true to autoDismiss property to use this effect!',
            autoDismiss: true,
            duration: Duration(seconds: 2),
          ),
          const Padding(
            padding: EdgeInsets.only(left: 15, top: 30, bottom: 10),
            child: LLSLabel(
              text: 'Basic Toasts',
              type: LLSLabelType.typo5,
              dividerWidth: 25,
              dividerColor: LLSColors.SECONDARY,
            ),
          ),
          LLSToast(
            text: 'Paired Succesfully !',
            button: LLSButton(
              onPressed: () {},
              text: 'OK',
              type: LLSButtonType.transparent,
              color: LLSColors.SUCCESS,
            ),
            autoDismiss: false,
            duration: const Duration(milliseconds: 300),
            alignment: Alignment.topLeft,
          ),
          const SizedBox(
            height: 15,
          ),
          LLSToast(
            text:
                'This item already has the label “travel”. You can add  new label. !',
            button: LLSButton(
              onPressed: () {},
              text: 'OK',
              type: LLSButtonType.transparent,
              color: LLSColors.SUCCESS,
            ),
            autoDismiss: false,
          ),
          const Padding(
            padding: EdgeInsets.only(left: 15, top: 30, bottom: 10),
            child: LLSLabel(
              text: 'Rounded Toasts',
              type: LLSLabelType.typo5,
              dividerWidth: 25,
              dividerColor: LLSColors.SECONDARY,
            ),
          ),
          LLSToast(
            text: 'Paired Succesfully !',
            button: LLSButton(
              onPressed: () {},
              text: 'OK',
              type: LLSButtonType.transparent,
              color: LLSColors.SUCCESS,
            ),
            type: LLSToastType.rounded,
            autoDismiss: false,
            alignment: Alignment.topLeft,
          ),
          const SizedBox(
            height: 15,
          ),
          LLSToast(
            text:
                'This item already has the label “travel”. You can add a new label. !',
            button: LLSButton(
              onPressed: () {},
              text: 'OK',
              type: LLSButtonType.transparent,
              color: LLSColors.SUCCESS,
            ),
            autoDismiss: false,
            type: LLSToastType.rounded,
            alignment: Alignment.topLeft,
          ),
          const Padding(
            padding: EdgeInsets.only(left: 15, top: 30, bottom: 10),
            child: LLSLabel(
              text: 'Full Width Toasts',
              type: LLSLabelType.typo5,
              dividerWidth: 25,
              dividerColor: LLSColors.SECONDARY,
            ),
          ),
          LLSToast(
            text: 'Paired Succesfully !',
            button: LLSButton(
              onPressed: () {},
              text: 'OK',
              type: LLSButtonType.transparent,
              color: LLSColors.SUCCESS,
            ),
            type: LLSToastType.fullWidth,
            autoDismiss: false,
          ),
          const SizedBox(
            height: 15,
          ),
          LLSToast(
            text:
                'This item already has the label “travel”. You can add a new label.!',
            button: LLSButton(
              onPressed: () {},
              text: 'OK',
              type: LLSButtonType.transparent,
              color: LLSColors.SUCCESS,
            ),
            autoDismiss: false,
            type: LLSToastType.fullWidth,
          ),
          const SizedBox(
            height: 20,
          ),
        ],
      ),
    );
  }
}