Skip to content

Commit

Permalink
Added all Screens
Browse files Browse the repository at this point in the history
  • Loading branch information
SatyamX64 committed May 26, 2020
1 parent d0be647 commit ecc845c
Show file tree
Hide file tree
Showing 5 changed files with 194 additions and 53 deletions.
7 changes: 7 additions & 0 deletions lib/Constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ Color kYellow = Color(0xFFFFAD1F);
Color kGreen = Color(0xFF17BF63);
Color kPurple = Color(0xFF794BC4);
Color kOrange = Color(0xFFF45D22);
Color kFontColor = Colors.white;

TextStyle kGeneralText = TextStyle(
color: kFontColor,
fontWeight: FontWeight.bold,
fontSize: 15,
);
39 changes: 33 additions & 6 deletions lib/Organizations.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import 'package:flutter/material.dart';
import 'package:gitoo/Constants.dart';

List<String> organizations = [
// 'Andi',
// 'Bandi',
// 'Sandi',
]

class Organizations extends StatelessWidget {
@override
Widget build(BuildContext context) {
Expand All @@ -11,14 +17,35 @@ class Organizations extends StatelessWidget {
backgroundColor: kPrimary,
),
body: Container(
color: kSecondary,
alignment: AlignmentDirectional.center,
child: Text(
'Bhai ko abhi kahi Kaam nahi mila',
style: TextStyle(color: Colors.white),
),
child: getList(),
color: kPrimary,
),
),
);
}
}

Widget getList() {
if (organizations.isNotEmpty) {
return ListView.separated(
itemBuilder: (BuildContext context, index) {
return Text(
'${organizations[index]}',
style: kGeneralText,
);
},
separatorBuilder: (BuildContext context, index) {
return Divider(
color: kLPrimary,
);
},
itemCount: organizations.length);
} else {
return Center(
child: Text(
'Bhai ko abhi kahi bhi kaam nhi mila',
style: kGeneralText,
),
);
}
}
80 changes: 60 additions & 20 deletions lib/Social.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'package:flutter/material.dart';
import 'package:gitoo/Constants.dart';

List<String> followers = [];
List<String> following = [];

class Social extends StatefulWidget {
@override
_SocialState createState() => _SocialState();
Expand All @@ -27,39 +30,76 @@ class _SocialState extends State<Social> {
],
),
),
body: TabBarView(
children: <Widget>[One(), Two()],
body: Container(
color: kPrimary,
child: TabBarView(
children: <Widget>[Followers(), Following()],
),
),
),
),
);
}
}

class One extends StatelessWidget {
class Followers extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
alignment: Alignment.center,
color: kSecondary,
child: Text(
'Bhai ko koi Follow nahi karta',
style: TextStyle(color: Colors.white),
),
);
if (followers.isNotEmpty) {
return ListView.separated(
itemBuilder: (BuildContext context, index) {
return Padding(
padding: EdgeInsets.all(10),
child: Text(
'${followers[index]}',
style: kGeneralText,
));
},
separatorBuilder: (BuildContext context, index) {
return Divider(
color: kLPrimary,
);
},
itemCount: followers.length,
);
} else {
return Center(
child: Text(
'Bhai ko koi Follow Nahi karta',
style: kGeneralText,
),
);
}
}
}

class Two extends StatelessWidget {
class Following extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: kSecondary,
alignment: Alignment.center,
child: Text(
'Bhai bhi kisi ko Follow nahi karta',
style: TextStyle(color: Colors.white),
),
);
if (following.isNotEmpty) {
return ListView.separated(
itemBuilder: (BuildContext context, index) {
return Padding(
padding: EdgeInsets.all(10),
child: Text(
'${following[index]}',
style: kGeneralText,
));
},
separatorBuilder: (BuildContext context, index) {
return Divider(
color: kLPrimary,
);
},
itemCount: following.length,
);
} else {
return Center(
child: Text(
'Bhai bhi kisi ko Follow Nahi karta',
style: kGeneralText,
),
);
}
}
}
39 changes: 33 additions & 6 deletions lib/Starred.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import 'package:flutter/material.dart';
import 'package:gitoo/Constants.dart';

List<String> starred = [
// 'Andi',
// 'Bandi',
// 'Sandi',
];

class Starred extends StatelessWidget {
@override
Widget build(BuildContext context) {
Expand All @@ -11,14 +17,35 @@ class Starred extends StatelessWidget {
backgroundColor: kPrimary,
),
body: Container(
color: kSecondary,
alignment: AlignmentDirectional.center,
child: Text(
'Bhai ko kisi ka kaam acha nahi lagta',
style: TextStyle(color: Colors.white),
),
child: getList(),
color: kPrimary,
),
),
);
}
}

Widget getList() {
if (starred.isNotEmpty) {
return ListView.separated(
itemBuilder: (BuildContext context, index) {
return Text(
'${starred[index]}',
style: kGeneralText,
);
},
separatorBuilder: (BuildContext context, index) {
return Divider(
color: kLPrimary,
);
},
itemCount: starred.length);
} else {
return Center(
child: Text(
'Bhai ko kisi ka kaam acha nahi lagta',
style: kGeneralText,
),
);
}
}
82 changes: 61 additions & 21 deletions lib/Technical.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'package:flutter/material.dart';
import 'package:gitoo/Constants.dart';

List<String> repos = [];
List<String> languages = [];

class Technical extends StatefulWidget {
@override
_TechnicalState createState() => _TechnicalState();
Expand All @@ -22,44 +25,81 @@ class _TechnicalState extends State<Technical> {
text: 'Repos',
),
Tab(
text: 'Languages',
text: 'languages',
),
],
),
),
body: TabBarView(
children: <Widget>[One(), Two()],
body: Container(
color: kPrimary,
child: TabBarView(
children: <Widget>[Repos(), Languages()],
),
),
),
),
);
}
}

class One extends StatelessWidget {
class Repos extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
alignment: Alignment.center,
color: kSecondary,
child: Text(
'Bhai ne abhi tak kuch nahi banaya hai',
style: TextStyle(color: Colors.white),
),
);
if (repos.isNotEmpty) {
return ListView.separated(
itemBuilder: (BuildContext context, index) {
return Padding(
padding: EdgeInsets.all(10),
child: Text(
'${repos[index]}',
style: kGeneralText,
));
},
separatorBuilder: (BuildContext context, index) {
return Divider(
color: kLPrimary,
);
},
itemCount: repos.length,
);
} else {
return Center(
child: Text(
'Bhai ne abhi tak kuch nahi banaya hai',
style: kGeneralText,
),
);
}
}
}

class Two extends StatelessWidget {
class Languages extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: kSecondary,
alignment: Alignment.center,
child: Text(
'Bhai abhi learning phase mein hai',
style: TextStyle(color: Colors.white),
),
);
if (languages.isNotEmpty) {
return ListView.separated(
itemBuilder: (BuildContext context, index) {
return Padding(
padding: EdgeInsets.all(10),
child: Text(
'${languages[index]}',
style: kGeneralText,
));
},
separatorBuilder: (BuildContext context, index) {
return Divider(
color: kLPrimary,
);
},
itemCount: languages.length,
);
} else {
return Center(
child: Text(
'Bhai abhi learning phase mein hai',
style: kGeneralText,
),
);
}
}
}

0 comments on commit ecc845c

Please sign in to comment.