Skip to content

Commit cdc389b

Browse files
committed
error fix and readme updated
1 parent deecf7e commit cdc389b

4 files changed

Lines changed: 24 additions & 21 deletions

File tree

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,25 @@
1616
</table>
1717

1818
Post it is a social media app which is made entirely with flutter and firebase.
19-
The user can login with both Google and Twitter.<br>
19+
The user can login with both Google and Facebook.<br>
20+
21+
And the user will get the notification if his/her post gets comments or anyone will send personal message to them. <br>
2022

2123
It uses UTC(Universal Time Co-ordinate) to store and sort the data and the time cannot be manipulate or change by user.
2224
The app is made with MediaQuery so it can be run in any device without any UI issue.<br>
2325

24-
The user can now see the amout of like and comment a post got in the main page.<br>
25-
26-
User can now see the post of other user.<br>
26+
The user can see the amout of like and comment a post got in the main page.<br>
2727

28-
The user can now follow other user and can unfollow the on their own will and the user profile image will be stored in canche so no need of download image again and again.<br>
28+
User can see the post history of other user.<br>
2929

30-
Session is been created so that user does not have to login again and again.<br>
30+
The user can follow other users.<br>
3131

32-
Now in this new update the user can also report other user if they misbehave and that user will not be able to post unless admin allows them and user will only see the 10 recently added posts and not every data of database as previous<br>
32+
If user logs in successfully a session is been created.<br>
3333

34-
In this new update instead of default icon and splash created a new icon and splash screen for the app which will run for the set time<br>
34+
Now in this new update the user can also report other user if they misbehave and that user will not be able to post unless admin allows them and user will only see the 10 recently added posts and not every data of database as previous.<br>
3535

3636
Any Query contact: shettysaket05@gmail.com
3737

38-
3938
# firebaseapp
4039

4140
A new Flutter application.
814 Bytes
Binary file not shown.

lib/friend/friendpost.dart

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1+
import 'package:firebaseapp/data/friendProfile.dart';
12
import 'package:flutter/material.dart';
23
import 'package:firebase_database/firebase_database.dart';
34
import 'package:flare_flutter/flare_actor.dart';
45
import 'package:firebaseapp/user/userpostdata.dart';
5-
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
6+
// import 'package:flutter_secure_storage/flutter_secure_storage.dart';
67

78
class friendpost extends StatefulWidget {
89
@override
10+
final friendProfile data;
11+
friendpost({this.data});
912
_friendpostState createState() => _friendpostState();
1013
}
1114

@@ -23,7 +26,7 @@ class _friendpostState extends State<friendpost> {
2326

2427
DatabaseReference ref = FirebaseDatabase.instance.reference();
2528

26-
final storage = new FlutterSecureStorage();
29+
// final storage = new FlutterSecureStorage();
2730

2831
void initState() {
2932

@@ -36,9 +39,9 @@ class _friendpostState extends State<friendpost> {
3639
}
3740

3841
Future friendid() async{
39-
String friend_id = await storage.read(key: 'friend-id');
40-
String friend_image = await storage.read(key: 'friend-image');
41-
String friend_name = await storage.read(key: 'friend-name');
42+
String friend_id = widget.data.friendId;
43+
String friend_image = widget.data.friendImg;
44+
String friend_name = widget.data.friendName;
4245

4346
setState(() {
4447
_newname = friend_name;

lib/friend/friendprofile.dart

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class _friendprofileState extends State<friendprofile> {
2020

2121
final scaffoldKey = new GlobalKey<ScaffoldState>();
2222

23-
2423
var _friendname;
2524
var _friendimageurl;
2625
var _friendid;
@@ -103,15 +102,16 @@ class _friendprofileState extends State<friendprofile> {
103102
});
104103
});
105104

106-
ref.child('user').child('$friend_id').child('follower').child('$_userid').once().then((DataSnapshot snap) async{
105+
var newuserid = await storage.read(key: 'user-id');
106+
107+
ref.child('user').child('$friend_id').child('follower').child('$newuserid').once().then((DataSnapshot snap) async{
107108
var data = await snap.value;
108109
if(data != null){
109110
setState((){
110111
_followertext = 'FOLLOWING';
111112
});
112113
}
113114
});
114-
115115
}
116116

117117
setState(() {
@@ -130,9 +130,9 @@ class _friendprofileState extends State<friendprofile> {
130130
String username = await storage.read(key:'user-name');
131131
String userimage = await storage.read(key:'user-image');
132132
setState((){
133-
_userid = userid;
134-
_username = username;
135-
_userimage = userimage;
133+
this._userid = userid;
134+
this._username = username;
135+
this._userimage = userimage;
136136
});
137137
}
138138

@@ -262,7 +262,8 @@ class _friendprofileState extends State<friendprofile> {
262262

263263
new GestureDetector(
264264
onTap: (){
265-
Navigator.push(context,MaterialPageRoute(builder: (context) => friendpost()));
265+
friendProfile fp = new friendProfile(widget.data.friendId, widget.data.friendName, widget.data.friendImg);
266+
Navigator.push(context,MaterialPageRoute(builder: (context) => friendpost(data: fp)));
266267
},
267268
child: new Column(
268269
children: <Widget>[

0 commit comments

Comments
 (0)