選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

55 行
1.4 KiB

  1. // ignore_for_file: public_member_api_docs, sort_constructors_first
  2. import 'package:flutter/material.dart';
  3. import 'package:qadirneyriz/widgets/custom_button.dart';
  4. import 'package:flutter_gen/gen_l10n/app_localizations.dart';
  5. class EmptyStateWidget extends StatelessWidget {
  6. final IconData icon;
  7. final double size;
  8. final bool isBack;
  9. final Color color;
  10. final String? text;
  11. final Function()? onPressed;
  12. const EmptyStateWidget(
  13. {super.key,
  14. this.icon = Icons.info_outline,
  15. this.size = 40.0,
  16. this.isBack = false,
  17. this.color = Colors.grey,
  18. this.onPressed,
  19. this.text});
  20. @override
  21. Widget build(BuildContext context) {
  22. return Center(
  23. child: Column(
  24. mainAxisSize: MainAxisSize.min,
  25. children: [
  26. Icon(
  27. icon,
  28. size: size,
  29. color: color,
  30. ),
  31. const SizedBox(height: 8.0),
  32. Text(
  33. text ?? AppLocalizations.of(context)!.empty,
  34. style: TextStyle(
  35. fontSize: 12.0,
  36. color: color,
  37. ),
  38. ),
  39. const SizedBox(height: 8.0),
  40. isBack == true
  41. ? CustomButton(
  42. hieght: 50,
  43. fontSize: 12,
  44. text: AppLocalizations.of(context)!.back,
  45. onPressed: onPressed)
  46. : Container()
  47. ],
  48. ),
  49. );
  50. }
  51. }