Skip to content

Commit 74bf4a1

Browse files
committed
Micro Optimizations. Erase non-informative comments. Remove unused imports. Did TODO to load asset error image. Removed unused variables.
1 parent 385b883 commit 74bf4a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+52
-197
lines changed

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ android {
3333

3434
defaultConfig {
3535
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36-
applicationId "com.thealphamerc.flutter_twitter_clone_dev"
36+
applicationId "com.flutter_twitter_clone"
3737
minSdkVersion 20
3838
targetSdkVersion 29
3939
versionCode flutterVersionCode.toInteger()

android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.thealphamerc.flutter_twitter_clone">
2+
package="com.flutter_twitter_clone">
33
<!-- Flutter needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->

android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.thealphamerc.flutter_twitter_clone">
2+
package="com.flutter_twitter_clone">
33

44
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
55
calls FlutterMain.startInitialization(this); in its onCreate method.

assets/images/error_image.png

21 KB
Loading

lib/model/feedModel.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,13 @@ class FeedModel {
5858
key = map['key'];
5959
description = map['description'];
6060
userId = map['userId'];
61-
// name = map['name'];
62-
// profilePic = map['profilePic'];
6361
likeCount = map['likeCount'] ?? 0;
6462
commentCount = map['commentCount'];
6563
retweetCount = map["retweetCount"] ?? 0;
6664
imagePath = map['imagePath'];
6765
createdAt = map['createdAt'];
6866
imagePath = map['imagePath'];
6967
lanCode = map['lanCode'];
70-
// username = map['username'];
7168
user = UserModel.fromJson(map['user']);
7269
parentkey = map['parentkey'];
7370
childRetwetkey = map['childRetwetkey'];

lib/state/base/tweetBaseState.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ class TweetBaseState extends AppState {
154154
/// upload [file] to firebase storage and return its path url
155155
Future<String?> uploadFile(File file) async {
156156
try {
157-
// isBusy = true;
158157
notifyListeners();
159158
var storageReference = FirebaseStorage.instance
160159
.ref()

lib/state/chats/chatState.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ class ChatState extends AppState {
169169
/// Send message to other user
170170
void onMessageSubmitted(
171171
ChatMessage message,
172-
/*{UserModel myUser, UserModel secondUser}*/
173172
) {
174173
print(chatUser!.userId);
175174
try {
@@ -206,7 +205,6 @@ class ChatState extends AppState {
206205
List<String> list = [user1, user2];
207206
list.sort();
208207
_channelName = '${list[0]}-${list[1]}';
209-
// cprint(_channelName); //2RhfE-5kyFB
210208
return _channelName!;
211209
}
212210

lib/state/profile_state.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,21 +166,17 @@ class ProfileState extends ChangeNotifier {
166166
/// Trigger when logged-in user's profile change or updated
167167
/// Firebase event callback for profile update
168168
void _onProfileChanged(DatabaseEvent event) {
169-
// if (event.snapshot != null) {
170-
171169
final updatedUser = UserModel.fromJson(event.snapshot.value as Map);
172170
if (updatedUser.userId == profileId) {
173171
_profileUserModel = updatedUser;
174172
}
175173
notifyListeners();
176-
// }
177174
}
178175

179176
@override
180177
void dispose() {
181178
_profileQuery!.onValue.drain();
182179
profileSubscription.cancel();
183-
// _profileQuery.
184180
super.dispose();
185181
}
186182
}

lib/state/suggestionUserState.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ class SuggestionsState extends AppState {
113113
.child('followingList')
114114
.set(currentUser!.followingList);
115115

116-
// await getIt<SharedPreferenceHelper>().saveUserProfile(currentUser!);
117-
118116
displaySuggestions = false;
119117
}
120118
} catch (error) {

lib/ui/page/Auth/forgetPasswordPage.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ import 'package:flutter_twitter_clone/widgets/customWidgets.dart';
77
import 'package:provider/provider.dart';
88

99
class ForgetPasswordPage extends StatefulWidget {
10-
// final VoidCallback loginCallback;
11-
1210
const ForgetPasswordPage({
1311
Key? key,
14-
/*this.loginCallback*/
1512
}) : super(key: key);
1613
@override
1714
State<StatefulWidget> createState() => _ForgetPasswordPageState();

0 commit comments

Comments
 (0)