import 'package:flutter/material.dart';
import 'package:tanami_app/core/styles/app_color.dart';

class Loader {
  static loader(BuildContext context) {
    showDialog(
      context: context,
      barrierDismissible: false,
      builder: (BuildContext context) {
        return Dialog(
          elevation: 0,
          backgroundColor: Colors.transparent,
          child: WillPopScope(
            onWillPop: () async => false,
            child: const Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                CircularProgressIndicator(
                  color: AppColor.primaryColor,
                ),
              ],
            ),
          ),
        );
      },
    );
  }
}
