buttonOption method

dynamic buttonOption({
  1. required ThemeController themeCtr,
  2. required BuildContext context,
})

Implementation

buttonOption({required ThemeController themeCtr, required BuildContext context}) {
  return Container(
    alignment: Alignment.topLeft,
    padding: EdgeInsets.only(left: 8, right: 8, top: 8),
    decoration: BoxDecoration(
      color: Colors.white,
      borderRadius: BorderRadius.circular(5),
    ),
    child: Column(crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        if( title!=null )
          SectionTitle(text: title!.tr, hasViewAll: false, left: 0, top: 0, bottom: 2,),

        Text(description, style: TextStyle(color: Colors.black),),

        Row(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: [


            Tooltip(message: 'label_never_show'.tr,
              child: TextButton(
                  onPressed: (){
                    themeCtr.isShowCaseHomeEnable=false;
                    ShowCaseWidget.of(context).dismiss();
                  },
                  child: Text('label_never_show'.tr, style: viewAllStyle)
              ),
            ),

            if( !themeCtr.isShowCaseHome2Time )
              Tooltip(message: 'label_skip'.tr,
                child: TextButton(
                    onPressed: (){
                      ShowCaseWidget.of(context).dismiss();
                    },
                    child: Text('label_skip'.tr, style: viewAllStyle)
                ),
              ),
            IconButton(
                tooltip: 'skip previous',
                onPressed: (){
                  ShowCaseWidget.of(context).previous();
                },
                icon: Icon(Icons.skip_previous_outlined)
            ),
            // Tooltip(
            //   message: 'Indicator counter',
            //   child: Text('$indicatorCurrent/$countGlobalKeys', style: viewAllStyle),
            // ),
            IconButton(
                tooltip: 'skip next',
                onPressed: (){
                  ShowCaseWidget.of(context).next();
                },
                icon: Icon(Icons.skip_next_outlined)
            ),
          ],
        ),

      ],
    ),
  );
}