FLUTTER - CLONE OF YOURSTORY MOBILE APP:-
Source Code:
import 'package:flutter/material.dart';
//main function
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: YourStory(),
);
}
}
class YourStory extends StatefulWidget {
@override
_YourStoryState createState() => _YourStoryState();
}
class _YourStoryState extends State<YourStory> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.red[500],
title: Text(
'YOURSTORY',
style: TextStyle(color: Colors.white),
),
centerTitle: true,
elevation: 0.0,
),
body: ListView(
children: <Widget>[
Stack(
children: <Widget>[
Padding(
padding: EdgeInsets.fromLTRB(15.0, 10.0, 15.0, 0.0),
child: Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Text(
'HERSTORY',
style: TextStyle(
color: Colors.red[600],
fontWeight: FontWeight.bold,
fontSize: 15.0),
)
],
),
Row(
//mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Uber confidentially files IPO',
style:
TextStyle(color: Colors.black, fontSize: 20.0),
),
SizedBox(width: 10.0),
Container(
height: 100.0,
width: 100.0,
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(5)),
child: Image.asset(
'assets/images/nature1.jpg',
fit: BoxFit.fill,
),
)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Text(
'Sindhu',
style:
TextStyle(color: Colors.grey, fontSize: 15.0),
),
SizedBox(width: 10.0),
Icon(
Icons.brightness_1,
color: Colors.grey,
size: 10.0,
),
SizedBox(width: 10.0),
Text(
'Published just now',
style:
TextStyle(color: Colors.grey, fontSize: 15.0),
),
],
),
],
),
),
],
),
SizedBox(height: 30.0),
Container(
height: 3.0,
color: Colors.grey[300],
)
],
),
bottomNavigationBar: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
fixedColor: Colors.red,
items: [
BottomNavigationBarItem(
icon: Icon(Icons.cloud_circle),
title: Text(
'Stories',
style: TextStyle(color: Colors.grey),
)),
BottomNavigationBarItem(
icon: Icon(Icons.video_call),
title: Text(
'Videos',
style: TextStyle(color: Colors.grey),
)),
BottomNavigationBarItem(
icon: Icon(Icons.search),
title: Text(
'Search',
style: TextStyle(color: Colors.grey),
)),
],
));
}
}
No comments:
Post a Comment