|
@@ -120,19 +120,22 @@ class HomePage extends HookConsumerWidget {
|
|
|
Positioned(
|
|
|
left: 0,
|
|
|
top: 0,
|
|
|
- child: Transform.translate(
|
|
|
- offset: const Offset(-10, -5),
|
|
|
- child: MyTextView(
|
|
|
- UserConfigService.getState(ref: ref).user?.unreadNotificationsCount ?? "0",
|
|
|
- boxWidth: 20.0,
|
|
|
- textColor: Colors.white,
|
|
|
- fontSize: 10,
|
|
|
- isFontLight: true,
|
|
|
- backgroundColor: context.appColors.redDefault,
|
|
|
- cornerRadius: 8,
|
|
|
- paddingTop: 2,
|
|
|
- paddingBottom: 2,
|
|
|
- textAlign: TextAlign.center,
|
|
|
+ child: Visibility(
|
|
|
+ visible: UserConfigService.getState(ref: ref).user?.unreadNotificationsCount != null,
|
|
|
+ child: Transform.translate(
|
|
|
+ offset: const Offset(-10, -5),
|
|
|
+ child: MyTextView(
|
|
|
+ UserConfigService.getState(ref: ref).user?.unreadNotificationsCount ?? "0",
|
|
|
+ boxWidth: 20.0,
|
|
|
+ textColor: Colors.white,
|
|
|
+ fontSize: 10,
|
|
|
+ isFontLight: true,
|
|
|
+ backgroundColor: context.appColors.redDefault,
|
|
|
+ cornerRadius: 8,
|
|
|
+ paddingTop: 2,
|
|
|
+ paddingBottom: 2,
|
|
|
+ textAlign: TextAlign.center,
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
),
|