Skip to content

Commit

Permalink
Added New Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
emrade committed Aug 5, 2019
1 parent bfd5fee commit f3a02e1
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 3 deletions.
15 changes: 15 additions & 0 deletions lib/_routing/router.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_social/_routing/routes.dart';
import 'package:flutter_social/views/chat_details.dart';
import 'package:flutter_social/views/chats.dart';
import 'package:flutter_social/views/feed.dart';
import 'package:flutter_social/views/home.dart';
import 'package:flutter_social/views/login.dart';
import 'package:flutter_social/views/notifications.dart';
import 'package:flutter_social/views/profile.dart';
import 'package:flutter_social/views/register.dart';
import 'package:flutter_social/views/reset_password.dart';

Expand All @@ -15,6 +20,16 @@ Route<dynamic> generateRoute(RouteSettings settings) {
return MaterialPageRoute(builder: (context) => RegisterPage());
case resetPasswordViewRoute:
return MaterialPageRoute(builder: (context) => ResetPasswordPage());
case feedsViewRoute:
return MaterialPageRoute(builder: (context) => FeedsPage());
case notificationsViewRoute:
return MaterialPageRoute(builder: (context) => NotificationsPage());
case chatsViewRoute:
return MaterialPageRoute(builder: (context) => ChatsPage());
case chatDetailsViewRoute:
return MaterialPageRoute(builder: (context) => ChatDetailsPage());
case profileViewRoute:
return MaterialPageRoute(builder: (context) => ProfilePage());
break;
default:
return MaterialPageRoute(builder: (context) => HomePage());
Expand Down
8 changes: 7 additions & 1 deletion lib/_routing/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ const String homeViewRoute = '/';

const String loginViewRoute = 'login';
const String registerViewRoute = 'register';
const String resetPasswordViewRoute = 'reset_password';
const String resetPasswordViewRoute = 'reset_password';

const String feedsViewRoute = 'feeds';
const String notificationsViewRoute = 'notifications';
const String chatsViewRoute = 'chats';
const String chatDetailsViewRoute = 'chat_details';
const String profileViewRoute = 'profile';
10 changes: 10 additions & 0 deletions lib/views/chat_details.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';

class ChatDetailsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(

);
}
}
10 changes: 10 additions & 0 deletions lib/views/chats.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';

class ChatsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(

);
}
}
10 changes: 10 additions & 0 deletions lib/views/feed.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';

class FeedsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(

);
}
}
2 changes: 1 addition & 1 deletion lib/views/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class _LoginPageState extends State<LoginPage> {
),
child: RaisedButton(
elevation: 5.0,
onPressed: () => Navigator.pushNamed(context, homeViewRoute),
onPressed: () => Navigator.pushNamed(context, feedsViewRoute),
color: Colors.white,
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(7.0),
Expand Down
10 changes: 10 additions & 0 deletions lib/views/notifications.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';

class NotificationsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(

);
}
}
10 changes: 10 additions & 0 deletions lib/views/profile.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';

class ProfilePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(

);
}
}
3 changes: 2 additions & 1 deletion lib/views/register.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_social/_routing/routes.dart';
import 'package:flutter_social/utils/colors.dart';
import 'package:line_icons/line_icons.dart';

Expand Down Expand Up @@ -111,7 +112,7 @@ class _RegisterPageState extends State<RegisterPage> {
elevation: 10.0,
shadowColor: Colors.white70,
child: MaterialButton(
onPressed: () {},
onPressed: () => Navigator.of(context).pushNamed(feedsViewRoute),
child: Text(
'CREATE ACCOUNT',
style: TextStyle(
Expand Down

0 comments on commit f3a02e1

Please sign in to comment.