// ignore_for_file: public_member_api_docs, sort_constructors_first import 'package:flutter/material.dart'; import 'package:qadirneyriz/widgets/custom_button.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; class EmptyStateWidget extends StatelessWidget { final IconData icon; final double size; final bool isBack; final Color color; final String? text; final Function()? onPressed; const EmptyStateWidget( {super.key, this.icon = Icons.info_outline, this.size = 40.0, this.isBack = false, this.color = Colors.grey, this.onPressed, this.text}); @override Widget build(BuildContext context) { return Center( child: Column( mainAxisSize: MainAxisSize.min, children: [ Icon( icon, size: size, color: color, ), const SizedBox(height: 8.0), Text( text ?? AppLocalizations.of(context)!.empty, style: TextStyle( fontSize: 12.0, color: color, ), ), const SizedBox(height: 8.0), isBack == true ? CustomButton( hieght: 50, fontSize: 12, text: AppLocalizations.of(context)!.back, onPressed: onPressed) : Container() ], ), ); } }