Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #6 #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions android/local.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sdk.dir=C:\\Users\\welcome\\AppData\\Local\\Android\\sdk
flutter.sdk=D:\\Flutter\\flutter
sdk.dir=C:\\Users\\LT\\AppData\\Local\\Android\\sdk
flutter.sdk=C:\\src\\flutter\\flutter
flutter.buildMode=debug
flutter.versionName=1.0.0
flutter.versionCode=1
37 changes: 16 additions & 21 deletions lib/views/Homepage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,32 @@ import '../services/theme.dart';
import '../services/news.dart';
import 'package:flutter_fadein/flutter_fadein.dart';


class HomePage extends StatelessWidget {

@override

Widget build(BuildContext context) {
final theme = Provider.of<ThemeNotifier>(context);
return SafeArea(
child: Scaffold(
appBar: AppBar(
elevation: 0.0,

centerTitle: true,
actions: <Widget>[
//about app page feature
IconButton(
icon: Icon(Icons.info),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => AboutAppPage()),
);
}),
Spacer(),
IconButton(
icon: Icon(Icons.info),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => AboutAppPage()),
);
}),
Spacer(),

Text('Trends',
style: GoogleFonts.montserrat(
textStyle: TextStyle(color: Colors.red, fontSize: 30.0),
)),
Spacer(),
Text('Trends',
style: GoogleFonts.montserrat(
textStyle: TextStyle(color: Colors.red, fontSize: 30.0),
)),
Spacer(),

IconButton(
splashRadius: 25.0,
Expand Down Expand Up @@ -67,7 +63,7 @@ class HomePage extends StatelessWidget {
),
),
FutureBuilder(
// future: getNews(),
future: NewsNotifier().getNews(),
builder: (context, snapshot) {
if (snapshot.hasData) {
final newslist = snapshot.data;
Expand Down Expand Up @@ -146,11 +142,10 @@ class HomePage extends StatelessWidget {
);
},
),

],
),
),
),
);
}
}
}
38 changes: 19 additions & 19 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.2"
version: "2.5.0-nullsafety.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0-nullsafety.1"
cached_network_image:
dependency: "direct main"
description:
Expand All @@ -28,28 +28,28 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.1.0-nullsafety.3"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
version: "1.2.0-nullsafety.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "1.1.0-nullsafety.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.13"
version: "1.15.0-nullsafety.3"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -77,7 +77,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0-nullsafety.1"
ffi:
dependency: transitive
description:
Expand Down Expand Up @@ -176,14 +176,14 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.8"
version: "0.12.10-nullsafety.1"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.8"
version: "1.3.0-nullsafety.3"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -211,7 +211,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.0-nullsafety.1"
path_provider:
dependency: transitive
description:
Expand Down Expand Up @@ -314,7 +314,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.0-nullsafety.2"
sqflite:
dependency: transitive
description:
Expand All @@ -335,21 +335,21 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.5"
version: "1.10.0-nullsafety.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0-nullsafety.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
version: "1.1.0-nullsafety.1"
synchronized:
dependency: transitive
description:
Expand All @@ -363,21 +363,21 @@ packages:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0-nullsafety.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.17"
version: "0.2.19-nullsafety.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0-nullsafety.3"
url_launcher:
dependency: "direct main"
description:
Expand Down Expand Up @@ -433,7 +433,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
version: "2.1.0-nullsafety.3"
webview_flutter:
dependency: "direct main"
description:
Expand All @@ -456,5 +456,5 @@ packages:
source: hosted
version: "0.1.0"
sdks:
dart: ">=2.9.0 <3.0.0"
dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.20.0 <2.0.0"