Fix Home App Bar
parent
905e430549
commit
0513fe1bc0
@ -1,36 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:test_sa/extensions/context_extension.dart';
|
|
||||||
|
|
||||||
import '../../app_style/app_color.dart';
|
|
||||||
|
|
||||||
class NotificationIcon extends StatelessWidget {
|
|
||||||
int notificationCount;
|
|
||||||
NotificationIcon({Key key, this.notificationCount}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Stack(
|
|
||||||
children: <Widget>[
|
|
||||||
Icon(Icons.notifications, size: 36, ),
|
|
||||||
if(notificationCount != null)
|
|
||||||
Positioned(
|
|
||||||
right: 0,
|
|
||||||
child: Container(
|
|
||||||
height: 20,
|
|
||||||
width: 20,
|
|
||||||
padding: EdgeInsets.all(1),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.red,
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
notificationCount.toString(),
|
|
||||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.w500,color: AppColor.neutral30),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class UserImage extends StatelessWidget {
|
|
||||||
String url;
|
|
||||||
UserImage({Key key, @required this.url}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SizedBox(
|
|
||||||
height: 48,
|
|
||||||
width: 48,
|
|
||||||
child: CircleAvatar(
|
|
||||||
//backgroundColor: Colors.transparent,
|
|
||||||
child: Image.network(url??''),
|
|
||||||
//backgroundImage: NetworkImage(url),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue