import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:fluttertoast/fluttertoast.dart';

void showToast(context,bool check,stringTrue,stringFalse,Widget widgetTrue,Widget widgetFalse){
  FToast fToast = FToast();
  fToast.init(context);
  fToast.showToast(
    toastDuration: const Duration(seconds: 1),
    child: Container(
      decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.circular(6.r)
      ),
      padding: EdgeInsets.symmetric(horizontal: 4.w,vertical: 8.h),
      child: Row(
        children: [
          check?widgetTrue:widgetFalse,
          Text(
            check?" $stringTrue":" $stringFalse",
            style:  TextStyle(color: Colors.black87, fontSize: 14.sp),
          )
        ],
      ),
    ),
    gravity: ToastGravity.BOTTOM,
  );
}