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 added assiets/images/add_icon.png
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 assiets/images/back_arrow_icon.png
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 assiets/images/check_icon.png
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 assiets/images/delete_icon.png
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 assiets/images/logo.png
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 images/1.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 images/2.png
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 images/3.png
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 images/4.png
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 images/5.png
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 images/6.png
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 images/7.png
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 images/8.png
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 images/insta_logo.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 images/insta_title.png
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 images/post_1.jfif
Binary file not shown.
Binary file added images/post_10.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 images/post_11.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 images/post_12.jfif
Binary file not shown.
Binary file added images/post_2.jfif
Binary file not shown.
Binary file added images/post_3.jfif
Binary file not shown.
Binary file added images/post_4.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 images/post_5.jfif
Binary file not shown.
Binary file added images/post_6.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 images/post_7.jfif
Binary file not shown.
Binary file added images/post_8.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 images/post_9jpg.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 images/storybackground.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 10 additions & 7 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'dart:math' as math;

void main() {
runApp(const MyApp());
}
Expand Down Expand Up @@ -42,7 +43,7 @@ class MyHomePage extends StatefulWidget {
class _MyHomePageState extends State<MyHomePage> {
int _selectedIndex = 2;
static const TextStyle optionStyle =
TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
static late List<Widget> _pages;

_MyHomePageState() {
Expand Down Expand Up @@ -142,13 +143,16 @@ class _MyHomePageState extends State<MyHomePage> {
return Column(
children: [
Text('Favorites'),
Divider(thickness: 4,),
Divider(
thickness: 4,
),
Expanded(
child: GridView.count(
crossAxisCount: 3,
children: List.generate(5, (index) {
var personColor = Color((math.Random().nextDouble() * 0xFFFFFF).toInt())
.withOpacity(1.0);
var personColor =
Color((math.Random().nextDouble() * 0xFFFFFF).toInt())
.withOpacity(1.0);
return Center(
child: Container(
width: 120,
Expand All @@ -159,7 +163,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
alignment: Alignment.center,
decoration:
BoxDecoration(shape: BoxShape.circle, color: personColor),
BoxDecoration(shape: BoxShape.circle, color: personColor),
),
);
}),
Expand Down Expand Up @@ -243,8 +247,7 @@ class _MyHomePageState extends State<MyHomePage> {
BottomNavigationBarItem(
icon: Icon(Icons.access_time_outlined),
label: 'School',
activeIcon: Icon(Icons.access_time_filled)
),
activeIcon: Icon(Icons.access_time_filled)),
],
currentIndex: _selectedIndex,
selectedItemColor: Colors.amber[800],
Expand Down
199 changes: 199 additions & 0 deletions lib/task_1/home_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
import 'package:flutter/material.dart';

class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
List<String> profileImages = [
"images/1.jpg",
"images/2.png",
"images/3.png",
"images/4.png",
"images/5.png",
"images/6.png",
"images/7.png",
"images/8.png",
];
List<String> posts = [
"images/post_1.jfif",
"images/post_2.jfif",
"images/post_3.jfif",
"images/post_4.jpg",
"images/post_5.jfif",
"images/post_6.jpg",
"images/post_7.jfif",
"images/post_8.jpg",
];
Future<void> onRefresh() async {
await Future.delayed(Duration(seconds: 1));
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Image.asset(
"images/insta_title.png",
height: 50,
),
actions: [
IconButton(onPressed: () {}, icon: Icon(Icons.add_circle_outline)),
IconButton(onPressed: () {}, icon: Icon(Icons.favorite_border)),
IconButton(onPressed: () {}, icon: Icon(Icons.chat_bubble_outline))
],
),
body: RefreshIndicator(
onRefresh: onRefresh,
child: SingleChildScrollView(
child: Column(
children: [
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: List.generate(
8,
(index) => Container(
padding: EdgeInsets.all(10),
child: Column(
children: [
CircleAvatar(
radius: 35,
backgroundImage:
AssetImage("images/storybackground.png"),
child: CircleAvatar(
radius: 32,
backgroundImage: AssetImage(profileImages[index]),
),
),
SizedBox(height: 10),
Text(
"Profile Name",
style: TextStyle(fontSize: 12, color: Colors.black87),
)
],
),
),
),
),
),
Divider(),
Column(
children: List.generate(
8,
(index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// post
Row(
children: [
Container(
padding: EdgeInsets.all(10),
child: CircleAvatar(
radius: 14,
backgroundImage:
AssetImage("images/storybackground.png"),
child: CircleAvatar(
radius: 12,
backgroundImage: AssetImage(profileImages[index]),
),
),
),
Text("profile name"),
Spacer(),
IconButton(
onPressed: () {},
icon: Icon(Icons.more_vert),
)
],
),
//Image po
Image.asset(posts[index],
height: 300,
width: double.maxFinite,
fit: BoxFit.cover),

Row(
children: [
IconButton(
icon: Icon(Icons.favorite_border),
onPressed: () {},
),
IconButton(
icon: Icon(Icons.chat_bubble_outline),
onPressed: () {},
),
IconButton(
icon: Icon(Icons.label_outline),
onPressed: () {},
),
Spacer(),
IconButton(
icon: Icon(Icons.bookmark_border),
onPressed: () {},
),
],
),
Container(
padding: EdgeInsets.all(15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
RichText(
text: TextSpan(
style: TextStyle(color: Colors.black),
children: [
TextSpan(text: "Liked by"),
TextSpan(
text: " profile Name",
style: TextStyle(
fontWeight: FontWeight.bold,
),
),
TextSpan(text: " and"),
TextSpan(
text: " others",
style: TextStyle(
fontWeight: FontWeight.bold,
),
),
],
),
),
RichText(
text: TextSpan(
style: TextStyle(color: Colors.black),
children: [
TextSpan(
text: "profile Name",
style: TextStyle(
fontWeight: FontWeight.bold,
),
),
TextSpan(
text:
" This is the most Amazing pic ever put on Instagram.",
),
],
),
),
Text(
"View all 13883 comments",
style: TextStyle(
color: Colors.black38,
),
)
],
),
)
],
),
),
)
],
)),
),
);
}
}
112 changes: 112 additions & 0 deletions lib/task_1/search_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import 'package:flutter/material.dart';

class SearchPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
List<String> buttons = [
"IGTV",
"Travel",
"Architecture",
"Decor",
"Style",
"Food",
"Art",
"Beauty",
"DIY",
"Music",
];
List<String> posts = [
"images/post_1.jfif",
"images/post_2.jfif",
"images/post_3.jfif",
"images/post_4.jpg",
"images/post_5.jfif",
"images/post_6.jpg",
"images/post_7.jfif",
"images/post_8.jpg",
"images/post_9.jfif",
"images/post_9jpg.jpg",
"images/post_10.jpg",
"images/post_11.jpg",
"images/post_12.jfif",
"images/1.jpg",
"images/2.png",
"images/3.png",
"images/4.png",
"images/5.png",
"images/6.png",
"images/7.png",
"images/8.png",

];

return Scaffold(
body: SafeArea(
child: CustomScrollView(
slivers: [
SliverAppBar(
primary: false,
title: TextFormField(
decoration: InputDecoration(
prefixIcon: Icon(Icons.search),
hintText: "Search",
contentPadding: EdgeInsets.all(0),
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(10),
),
fillColor: Color.fromARGB(40, 77, 40, 1),
filled: true,
),
),
actions: [
IconButton(
onPressed: () {},
icon: Icon(Icons.person_add),
),
],
),
SliverAppBar(
titleSpacing: 0,
primary: false,
pinned: true,
title: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: List.generate(
10,
(index) => Container(
padding: EdgeInsets.symmetric(horizontal: 5),
child: OutlineButton(onPressed: (){},
child: Text(
buttons[index],
),
),
),
),
),
),
),
SliverList(delegate: SliverChildListDelegate(
[
GridView.builder(
padding: EdgeInsets.all(0),
shrinkWrap: true,
itemCount: 20,
physics: ScrollPhysics(parent: null),
gridDelegate:SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3),
itemBuilder: (context,index) => Container(
padding: EdgeInsets.all(2),
child: Image.asset(posts[index],fit: BoxFit.cover,),
)
),
],
),
),
],
),
),
);
}
}
Loading