Skip to content

Commit

Permalink
home notification screen
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSSHOH committed Jan 19, 2021
1 parent 8c5a959 commit 022811b
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 6 deletions.
11 changes: 11 additions & 0 deletions assets/icon/failed_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 16 additions & 6 deletions lib/src/ui/menu/home/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:messenger/src/app_theme.dart';
import 'package:messenger/src/bloc/home_bloc.dart';
import 'package:messenger/src/model/home/home_model.dart';
import 'package:messenger/src/ui/menu/home/notification_screen.dart';
import 'package:messenger/src/ui/menu/main_screen.dart';
import 'package:messenger/src/ui/profile/profile_friend_screen.dart';
import 'package:messenger/src/utils/styles.dart';
Expand Down Expand Up @@ -53,7 +54,14 @@ class _HomeScreenState extends State<HomeScreen>
),
),
GestureDetector(
onTap: () {},
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => NotificationScreen(),
),
);
},
child: SvgPicture.asset(
"assets/icon/inactive.svg",
),
Expand Down Expand Up @@ -228,8 +236,8 @@ class _HomeScreenState extends State<HomeScreen>
MaterialPageRoute(
builder: (context) =>
FriendProfileScreen(
snapshot.data.tape[index]
),
snapshot.data
.tape[index]),
),
);
},
Expand All @@ -244,8 +252,8 @@ class _HomeScreenState extends State<HomeScreen>
Radius.circular(42),
),
child: Image.asset(
snapshot
.data.tape[index].userImage,
snapshot.data.tape[index]
.userImage,
height: 42,
width: 42,
fit: BoxFit.cover,
Expand All @@ -260,7 +268,9 @@ class _HomeScreenState extends State<HomeScreen>
context,
MaterialPageRoute(
builder: (context) =>
FriendProfileScreen( snapshot.data.tape[index]),
FriendProfileScreen(
snapshot.data
.tape[index]),
),
);
},
Expand Down
97 changes: 97 additions & 0 deletions lib/src/ui/menu/home/notification_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import 'dart:ui';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:messenger/src/app_theme.dart';
import 'package:messenger/src/bloc/chat_bloc.dart';
import 'package:messenger/src/dialog/bottom_dialog.dart';
import 'package:messenger/src/model/chat_item_model.dart';
import 'package:messenger/src/model/chat_model.dart';
import 'package:messenger/src/utils/styles.dart';

class NotificationScreen extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _NotificationScreenState();
}
}

class _NotificationScreenState extends State<NotificationScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppTheme.screen,
body: Column(
children: [
Container(
color: AppTheme.white,
height: 96,
padding: EdgeInsets.only(
left: 25,
right: 25,
bottom: 20,
),
child: Column(
children: [
Expanded(child: Container()),
Row(
children: [
GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: SvgPicture.asset(
"assets/icon/arrow-left.svg",
),
),
SizedBox(width: 20),
Expanded(
child: Text(
"Notifications",
style: Styles.boldH1(AppTheme.dark),
),
),
GestureDetector(
onTap: () {},
child: SvgPicture.asset(
"assets/icon/more-vertical.svg",
),
),
],
),
],
),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset("assets/icon/failed_dark.svg"),
SizedBox(height: 35),
Text(
"Notification Empty",
style: Styles.boldH2(AppTheme.dark),
),
Container(
margin: EdgeInsets.only(
top: 20,
left: 25,
right: 25,
),
child: Text(
"There are no notifications in this account, let’s discover and take a look this later.",
textAlign: TextAlign.center,
style: Styles.regularLabel(AppTheme.dark80),
),
)
],
),
)
],
),
);
}
}

0 comments on commit 022811b

Please sign in to comment.