import 'package:flutter/material.dart';
import 'package:rasadyar_core/core.dart';

class EmptyWidget extends StatelessWidget {
  const EmptyWidget({super.key, this.onRefresh});

  final RefreshCallback? onRefresh;

  @override
  Widget build(BuildContext context) {
    return RefreshIndicator(
      onRefresh: onRefresh ?? () async {},
      child: SingleChildScrollView(
        physics: AlwaysScrollableScrollPhysics(),
        child: SizedBox(
          height: MediaQuery.of(context).size.height / 1.5,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Row(),
              Assets.vec.emptySvg.svg(height: 190.h),
              Text(
                'داده ای یافت نشد!',
                style: AppFonts.yekan20.copyWith(color: AppColor.textColor),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
