Skip to content

Commit

Permalink
Code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
JideGuru committed May 2, 2020
1 parent 315a17e commit 5104d4a
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 93 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Images are from [Unsplash](https://unsplash.com)

[Link to Mockup](https://www.ls.graphics/free/simple-iphone-x-mockups)

[![Twitter Follow](https://img.shields.io/twitter/follow/iamjideguru.svg?style=social)](https://twitter.com/iamjideguru)

## ✨ Requirements
* Any Operating System (ie. MacOS X, Linux, Windows)
Expand All @@ -33,10 +34,8 @@ Images are from [Unsplash](https://unsplash.com)
|<img src="ss/13.png" width="400">|<img src="ss/14.png" width="400">|


## 🌗 Toggle theme
To toggle the theme, change the `isDark` variable in `main.dart`.

`true` for dark and `false` for light.
## 🌗 Dark theme
Adapts to device theme


## 🤓 Author(s)
Expand Down
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

9 changes: 6 additions & 3 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 3DDPAAW5W3;
LastSwiftMigration = 0910;
};
};
Expand All @@ -162,6 +163,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -436,6 +438,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 3DDPAAW5W3;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -447,7 +450,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = dev.jideguru.socialAppUi;
PRODUCT_BUNDLE_IDENTIFIER = dev.jideguru.socialApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -464,6 +467,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 3DDPAAW5W3;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -475,7 +479,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = dev.jideguru.socialAppUi;
PRODUCT_BUNDLE_IDENTIFIER = dev.jideguru.socialApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
Expand Down Expand Up @@ -508,7 +512,6 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
2 changes: 0 additions & 2 deletions lib/screens/chats.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:social_app_ui/util/data.dart';
import 'package:social_app_ui/widgets/chat_item.dart';


class Chats extends StatefulWidget {
@override
_ChatsState createState() => _ChatsState();
Expand All @@ -18,7 +17,6 @@ class _ChatsState extends State<Chats> with SingleTickerProviderStateMixin,
_tabController = TabController(vsync: this, initialIndex: 0, length: 2);
}


@override
Widget build(BuildContext context) {
super.build(context);
Expand Down
5 changes: 0 additions & 5 deletions lib/screens/conversation.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import 'package:flutter/material.dart';
import 'package:social_app_ui/util/data.dart';
import 'dart:math';

import 'package:social_app_ui/widgets/chat_bubble.dart';



class Conversation extends StatefulWidget {
@override
_ConversationState createState() => _ConversationState();
Expand Down Expand Up @@ -166,11 +163,9 @@ class _ConversationState extends State<Conversation> {
),
),
),

],
),
),

);
}
}
2 changes: 0 additions & 2 deletions lib/screens/friends.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class _FriendsState extends State<Friends> {
],
),


body: ListView.separated(
padding: EdgeInsets.all(10),
separatorBuilder: (BuildContext context, int index) {
Expand Down Expand Up @@ -79,7 +78,6 @@ class _FriendsState extends State<Friends> {
),
);
},

),
);
}
Expand Down
1 change: 0 additions & 1 deletion lib/screens/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class _HomeState extends State<Home> {
],
),


body: ListView.builder(
padding: EdgeInsets.symmetric(horizontal: 20),
itemCount: posts.length,
Expand Down
1 change: 0 additions & 1 deletion lib/screens/main_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ class _MainScreenState extends State<MainScreen> {
currentIndex: _page,
),
),

);
}

Expand Down
1 change: 0 additions & 1 deletion lib/screens/notifications.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class _NotificationsState extends State<Notifications> {
),
);
},

),
);
}
Expand Down
77 changes: 24 additions & 53 deletions lib/screens/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class _ProfileState extends State<Profile> {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[

SizedBox(height: 40),
SizedBox(height: 60),
CircleAvatar(
backgroundImage: AssetImage(
"assets/cm${random.nextInt(10)}.jpeg",
Expand Down Expand Up @@ -75,60 +75,11 @@ class _ProfileState extends State<Profile> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Column(
children: <Widget>[
Text(
random.nextInt(10000).toString(),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22,
),
),
SizedBox(height: 4),
Text(
"Posts",
style: TextStyle(
),
),
],
),

Column(
children: <Widget>[
Text(
random.nextInt(10000).toString(),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22,
),
),
SizedBox(height: 4),
Text(
"Friends",
style: TextStyle(
),
),
],
),
_buildCategory("Posts"),

Column(
children: <Widget>[
Text(
random.nextInt(10000).toString(),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22,
),
),
SizedBox(height: 4),
Text(
"Groups",
style: TextStyle(
),
),
],
),
_buildCategory("Friends"),

_buildCategory("Groups"),
],
),
),
Expand Down Expand Up @@ -159,4 +110,24 @@ class _ProfileState extends State<Profile> {
),
);
}

Widget _buildCategory(String title){
return Column(
children: <Widget>[
Text(
random.nextInt(10000).toString(),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22,
),
),
SizedBox(height: 4),
Text(
title,
style: TextStyle(
),
),
],
);
}
}
2 changes: 0 additions & 2 deletions lib/util/const.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,4 @@ class Constants{
),
),
);


}
1 change: 0 additions & 1 deletion lib/widgets/post_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ class PostItem extends StatefulWidget {
final String time;
final String img;


PostItem({
Key key,
@required this.dp,
Expand Down
18 changes: 1 addition & 17 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ environment:
dependencies:
flutter:
sdk: flutter

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2

dev_dependencies:
Expand All @@ -35,23 +32,10 @@ dev_dependencies:
# The following section is specific to Flutter.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true

# To add assets to your application, add an assets section, like this:
assets:
- assets/cm1.jpeg
- assets/cm2.jpeg
- assets/cm3.jpeg
- assets/cm4.jpeg
- assets/cm5.jpeg
- assets/cm6.jpeg
- assets/cm7.jpeg
- assets/cm8.jpeg
- assets/cm9.jpeg
- assets/cm0.jpeg
- assets/

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
Expand Down

0 comments on commit 5104d4a

Please sign in to comment.