Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

259 add empty state for notifications #260

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,39 @@ class NotificationListWidget extends StatelessWidget {

@override
Widget build(BuildContext context) {
if (notifications.isEmpty) {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.notifications_none_outlined,
size: 64,
color: AppColor.appPrimary.withOpacity(0.5),
),
const SizedBox(height: 16),
Text(
"No Notifications Yet",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
color: AppColor.appSecondary,
),
),
const SizedBox(height: 8),
Text(
"We'll notify you when something interesting happens",
style: TextStyle(
fontSize: 14,
color: AppColor.appSecondary.withOpacity(0.7),
),
textAlign: TextAlign.center,
),
],
),
);
}

return ListView.builder(
itemCount: notifications.length,
itemBuilder: (context, index) {
Expand Down Expand Up @@ -150,4 +183,4 @@ class NotificationListWidget extends StatelessWidget {
},
);
}
}
}