Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified android/.gradle/5.6.2/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified android/.gradle/5.6.2/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified android/.gradle/5.6.2/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified android/.gradle/5.6.2/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified android/.gradle/5.6.2/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified android/.gradle/5.6.2/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file modified android/.gradle/5.6.2/javaCompile/jarAnalysis.bin
Binary file not shown.
Binary file modified android/.gradle/5.6.2/javaCompile/javaCompile.lock
Binary file not shown.
Binary file modified android/.gradle/5.6.2/javaCompile/taskHistory.bin
Binary file not shown.
Binary file modified android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified android/.gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
4 changes: 2 additions & 2 deletions android/local.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sdk.dir=C:\\Users\\nktum\\AppData\\Local\\Android\\Sdk
flutter.sdk=D:\\flutter
sdk.dir=C:\\Users\\welcome\\AppData\\Local\\Android\\sdk
flutter.sdk=D:\\Flutter\\flutter
flutter.buildMode=debug
flutter.versionName=1.0.0
flutter.versionCode=1
10 changes: 0 additions & 10 deletions ios/Flutter/Generated.xcconfig

This file was deleted.

11 changes: 0 additions & 11 deletions ios/Flutter/flutter_export_environment.sh

This file was deleted.

37 changes: 37 additions & 0 deletions lib/screens/box.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import 'package:flutter/material.dart';

Color mC = Colors.grey.shade100;
Color mCL = Colors.white;
Color mCD = Colors.black.withOpacity(0.075);
Color mCC = Colors.green.withOpacity(0.65);
Color fCL = Colors.grey.shade600;

BoxDecoration nMbox = BoxDecoration(
shape: BoxShape.circle,
color: mC,
boxShadow: [
BoxShadow(
color: mCD,
offset: Offset(10, 10),
blurRadius: 10,
),
BoxShadow(
color: mCL,
offset: Offset(-10, -10),
blurRadius: 10,
),
]
);

BoxDecoration nMboxInvert = BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: mCD,
boxShadow: [
BoxShadow(
color: mCL,
offset: Offset(3, 3),
blurRadius: 3,
spreadRadius: -3
),
]
);
121 changes: 121 additions & 0 deletions lib/screens/logout.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:google_sign_in/google_sign_in.dart';
import 'package:gradient_widgets/gradient_widgets.dart';
import 'package:pocketnews/screens/box.dart';

import '../services/current_user.dart';
import 'login_page.dart';

class Logout extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<Logout> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
backgroundColor: Colors.grey[50],
elevation: 0,
title: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Stack(children: <Widget>[
InkWell(
onTap: () {
Navigator.pop(context);
},
child: Icon(Icons.arrow_back, color: Colors.black87)),
]),
])),
body: SingleChildScrollView(
child: Column(children: <Widget>[
SizedBox(height: 30),
Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
Center(
child: Text('LOGOUT PAGE',
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
fontFamily: 'Montserrat')),
),
]),
SizedBox(height: 70),
Container(
width: 280,
height: 280,
padding: EdgeInsets.all(8),
decoration: nMbox,
child: Container(
decoration: nMbox,
padding: EdgeInsets.all(3),
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
// image: AssetImage('assets/avatar.JPG'),
image:AssetImage("assests/images/75Fg.gif"),

),
),
),
),
),
SizedBox(height: 30),
Column(
children: [
Center(
child: Text('TAP LOGOUT BUTTON TO LOGOUT',
style: TextStyle(
fontSize: 14,
color: Colors.black87,
fontWeight: FontWeight.bold))),
],
),
SizedBox(height: 30),
Center(
child: Padding(
padding: EdgeInsets.all(15),
child: GradientButton(
increaseHeightBy: 10,
increaseWidthBy: 16,
child: Center(child: Text('LOGOUT')),
callback: () async {
print("Login Mode: " + loginMode);
if (loginMode == "google") {
GoogleSignIn googleSignIn = GoogleSignIn();
await googleSignIn
.signOut()
.then((value) => Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => LoginPage()),
))
.catchError((err) => print(err));
} else {
FirebaseAuth.instance
.signOut()
.then(
(result) => Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => LoginPage()),
),
)
.catchError((err) => print(err));
}

// }navigationBar.onTap(1);
},
gradient: Gradients.hotLinear,
shadowColor:
Gradients.backToFuture.colors.last.withOpacity(0.25),
),
))
]),
));
}
}
54 changes: 34 additions & 20 deletions lib/screens/user_page.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:curved_navigation_bar/curved_navigation_bar.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:pocketnews/screens/login_page.dart';
import 'package:flutter_email_sender/flutter_email_sender.dart';
import 'package:pocketnews/screens/logout.dart';
import 'package:pocketnews/services/current_user.dart';
import 'package:google_sign_in/google_sign_in.dart';
import 'package:pocketnews/screens/homeSports.dart';
Expand All @@ -12,6 +14,7 @@ import 'package:pocketnews/screens/homeBusiness.dart';
import 'package:pocketnews/screens/homeHealth.dart';
import 'package:pocketnews/screens/homeTechnology.dart';
import 'package:pocketnews/screens/homeEntertainment.dart';
import 'package:share/share.dart';

class UserPage extends StatefulWidget {
UserPage({Key key, this.controller, this.fname, this.globalKey}) : super(key: key);
Expand Down Expand Up @@ -169,28 +172,39 @@ class _UserPageState extends State<UserPage> {
onTap: () async {
print("Login Mode: " + loginMode);

if (loginMode == "google") {
GoogleSignIn googleSignIn = GoogleSignIn();
await googleSignIn
.signOut()
.then((value) => Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (context) => LoginPage()),
))
.catchError((err) => print(err));
} else {
FirebaseAuth.instance
.signOut()
.then(
(result) => Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (context) => LoginPage()),
),
)
.catchError((err) => print(err));
}
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Logout()),
);
// navigationBar.onTap(1);
},
),
ListTile(
leading: Icon(
Icons.share,
color: Colors.white,
),
title: Text(
"Share ",
style: TextStyle(color: Colors.white),
),
trailing: Icon(
Icons.navigate_next,
color: Colors.white,
),
onTap: () {
final RenderBox box =
context.findRenderObject();
Share.share(
//U r coustom message
"Check Out This Amazing News App! \n https://github.com/vipuluthaiah/News_app_2.0 ",
subject: "Share This App",
sharePositionOrigin:
box.localToGlobal(Offset.zero) &
box.size,
);
// send();
},
),
],
),
Expand Down
28 changes: 21 additions & 7 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
version: "2.4.2"
auto_size_text:
dependency: "direct main"
description:
Expand All @@ -36,6 +36,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
charcode:
dependency: transitive
description:
Expand Down Expand Up @@ -77,7 +84,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.12"
version: "1.14.13"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -226,6 +233,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.1+1"
gradient_widgets:
dependency: "direct main"
description:
name: gradient_widgets
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.2"
http:
dependency: "direct main"
description:
Expand Down Expand Up @@ -267,7 +281,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.6"
version: "0.12.8"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -370,7 +384,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
version: "1.9.5"
stream_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -412,14 +426,14 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.15"
version: "0.2.17"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.2.0"
vector_math:
dependency: transitive
description:
Expand All @@ -442,5 +456,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.7.0 <3.0.0"
dart: ">=2.9.0-14.0.dev <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ dependencies:
marquee: ^1.5.2
auto_size_text: ^2.1.0
google_sign_in:
gradient_widgets: ^0.5.1

flutter_auth_buttons:
simple_animations:
dev_dependencies:
Expand Down
Binary file added ss/20201016_201059.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ss/Screenshot_20201016-201033.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ss/Screenshot_20201016-201044_Android System.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading