57 lines
1.5 KiB
Dart
57 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:niogu_app/core/constants/app_font_size.dart';
|
|
import 'package:sizer/sizer.dart';
|
|
|
|
class EmptyItem extends StatelessWidget {
|
|
final IconData icon;
|
|
final String title;
|
|
final String subtitle;
|
|
const EmptyItem({
|
|
super.key,
|
|
required this.icon,
|
|
required this.title,
|
|
required this.subtitle,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final bool isTablet = 100.w >= 600;
|
|
return Container(
|
|
width: double.infinity,
|
|
padding: EdgeInsets.symmetric(vertical: 5.h),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(2.5.w),
|
|
border: Border.all(
|
|
color: Colors.grey.shade200,
|
|
style: BorderStyle.solid,
|
|
),
|
|
),
|
|
child: Column(
|
|
children: [
|
|
Icon(icon, size: 12.w, color: Colors.grey[300]),
|
|
SizedBox(height: 2.h),
|
|
Text(
|
|
title,
|
|
style: TextStyle(
|
|
color: Colors.grey[500],
|
|
fontSize: AppFontSize.medium.sp,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
SizedBox(height: 1.h),
|
|
Text(
|
|
subtitle,
|
|
style: TextStyle(
|
|
color: Colors.grey[500],
|
|
fontSize: isTablet
|
|
? (AppFontSize.medium - 1.25).sp
|
|
: (AppFontSize.small - 1.25).sp,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|