Skip to content

Commit 6bd6ed4

Browse files
some modifications on the navdrawer
1 parent 1f7bb2b commit 6bd6ed4

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

lib/screen/home.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:flutter/cupertino.dart';
22
import 'package:flutter/material.dart';
3+
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
34

45
import '../widgets/navdrawer.dart';
56

@@ -74,19 +75,19 @@ class _HomeState extends State<Home> {
7475
items: const [
7576
BottomNavigationBarItem(
7677
icon: Icon(
77-
Icons.star,
78+
FeatherIcons.alignCenter,
7879
size: 30,
7980
),
8081
),
8182
BottomNavigationBarItem(
8283
icon: Icon(
83-
Icons.edit_note,
84+
FeatherIcons.plusCircle,
8485
size: 30,
8586
),
8687
),
8788
BottomNavigationBarItem(
8889
icon: Icon(
89-
Icons.deblur,
90+
FeatherIcons.aperture,
9091
size: 30,
9192
),
9293
),

lib/widgets/navdrawer.dart

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,17 @@ class NavDrawer extends StatelessWidget {
1717
if (auth.authenticated) {
1818
return ListView(
1919
children: [
20-
ListTile(
21-
title: Text(auth.user?.email ?? ''),
22-
),
20+
// ignore: unnecessary_null_comparison
21+
DrawerHeader(child:auth==null?CircleAvatar(
22+
backgroundColor: Colors.blue,
23+
):ListTile(
24+
leading:CircleAvatar(
25+
backgroundColor:Colors.blue,
26+
),
27+
title:Text(auth.user?.name??''),
28+
subtitle:Text(auth.user?.email??''),
29+
trailing:Text(auth.user?.id??''),
30+
)),
2331
ListTile(
2432
title: Text('posts'),
2533
onTap: () => Navigator.push(context,

pubspec.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ packages:
8181
url: "https://pub.dev"
8282
source: hosted
8383
version: "1.3.1"
84+
feather_icons:
85+
dependency: "direct main"
86+
description:
87+
name: feather_icons
88+
sha256: "9fe1e52305fc363c3ee08cabaef32526e2e8ce53091c7b70f9c774460a1f03ae"
89+
url: "https://pub.dev"
90+
source: hosted
91+
version: "1.2.0"
8492
flutter:
8593
dependency: "direct main"
8694
description: flutter

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ dependencies:
4343
flutter_svg: ^1.1.6
4444
smooth_page_indicator: ^1.0.0+2
4545
flutter_feather_icons: ^2.0.0+1
46+
feather_icons: ^1.2.0
4647

4748
dev_dependencies:
4849
flutter_test:

0 commit comments

Comments
 (0)