-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
110 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class Bookmarks extends StatefulWidget { | ||
const Bookmarks({Key? key}) : super(key: key); | ||
|
||
@override | ||
State<Bookmarks> createState() => _BookmarksState(); | ||
} | ||
|
||
class _BookmarksState extends State<Bookmarks> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Center(child: Text('Bookmarks')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class NewsList extends StatefulWidget { | ||
const NewsList({Key? key}) : super(key: key); | ||
|
||
@override | ||
State<NewsList> createState() => _NewsListState(); | ||
} | ||
|
||
class _NewsListState extends State<NewsList> { | ||
String Heading = "Indian street food restaurant Chai Pani named best in US"; | ||
String description = | ||
"It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like)."; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return PageView.builder( | ||
scrollDirection: Axis.vertical, | ||
itemCount: 3, | ||
itemBuilder: (context, index) { | ||
return Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Container( | ||
height: MediaQuery.of(context).size.height / 3, | ||
color: Colors.amber, | ||
child: Image( | ||
fit: BoxFit.fill, | ||
image: AssetImage('assets/images/img.png')), | ||
), | ||
Expanded( | ||
child: Container( | ||
padding: EdgeInsets.all(15), | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(18)), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Text(Heading, | ||
style: TextStyle(fontSize: 25), | ||
textAlign: TextAlign.justify), | ||
SizedBox( | ||
height: 10, | ||
), | ||
Text( | ||
description, | ||
style: TextStyle( | ||
color: Colors.grey[600], fontSize: 17), | ||
textAlign: TextAlign.justify, | ||
), | ||
SizedBox(height: 15), | ||
Text( | ||
'swipe left for more info.', | ||
style: TextStyle(color: Colors.grey, fontSize: 14), | ||
textAlign: TextAlign.justify, | ||
), | ||
], | ||
), | ||
)) | ||
], | ||
); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class WebView extends StatefulWidget { | ||
const WebView({Key? key}) : super(key: key); | ||
|
||
@override | ||
State<WebView> createState() => _WebViewState(); | ||
} | ||
|
||
class _WebViewState extends State<WebView> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Center(child: Text('WebView'),); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
import './homeScreen.dart'; | ||
import './newsList.dart'; | ||
import './Screens/bookmarks.dart'; | ||
import './Screens/newsList.dart'; | ||
import './Screens/webView.dart'; | ||
|
||
void main() { | ||
var controller = PageController(initialPage: 1); | ||
runApp(MaterialApp( | ||
title: 'Flutter Demo', | ||
themeMode: ThemeMode.system, | ||
theme: ThemeData.light(), | ||
darkTheme: ThemeData.dark(), | ||
home: HomeScreen(), | ||
home: SafeArea( | ||
child: Scaffold( | ||
body: PageView( | ||
controller: controller, | ||
children: [ | ||
Bookmarks(), | ||
NewsList(), | ||
WebView(), | ||
], | ||
), | ||
), | ||
), | ||
)); | ||
} | ||
|
This file was deleted.
Oops, something went wrong.