Skip to content

Commit

Permalink
removed unnecessary imports and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremiasBulanadi committed Sep 11, 2021
1 parent 22b2a88 commit 275c8af
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 185 deletions.
3 changes: 0 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// A lot of these are made for prototyping
// Most things will be changed

// TODO:
// - Make something that will inform if API isn't working

import 'package:flutter/material.dart';
import 'package:news_appdate/providers/news_provider.dart';
import 'package:provider/provider.dart';
Expand Down
167 changes: 0 additions & 167 deletions lib/pages/TESTnewsPage.dart

This file was deleted.

4 changes: 0 additions & 4 deletions lib/pages/mapPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:flutter/material.dart';
import 'package:location/location.dart' as loc;
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import '../models/aylien_data.dart';
import '../providers/news_provider.dart';
import 'newsPage.dart';

import 'dart:async';

// This is just for differentiating the markers put on the map
enum NewsListType { locational, recommended, searched }

Expand Down
2 changes: 0 additions & 2 deletions lib/pages/wrapper.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'messagePage.dart';
import '../models/User.dart';

class Wrapper extends StatelessWidget {
const Wrapper({Key? key}) : super(key: key);
Expand Down
4 changes: 1 addition & 3 deletions lib/services/api_call.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import '../constants/api_path.dart';
import '../models/aylien_data.dart';
import '../models/aylien_trends.dart';
import 'dart:convert';
import 'package:http/http.dart' as http;

// TODO:
// - Do the wikipedia entry for location thing

Future<AylienData> fetchAylienNews(Map<String, String> queryParameters) async {
// The parameters for the GET request
// this query is just for testing
Expand Down
8 changes: 4 additions & 4 deletions lib/services/geocoding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import 'package:location/location.dart' as LOC;
// Gets user location details
// we mostly just want:
// ISO Country Code, Country, Subadministrative area, and the Locality
// TODO:
// - Actually implement getting user location instead of just testing geocoding

// This is for testing, will be replaced
Future<LOC.LocationData?> getUserLocation() async {
Expand Down Expand Up @@ -38,7 +36,8 @@ Future<Location?> getLatLng(String location) async {
try {
List<Location> latlngs = await locationFromAddress(location);
return latlngs[0];
} on NoResultFoundException catch (e) {
} on NoResultFoundException catch (err) {
print(err);
return null;
}
}
Expand All @@ -51,7 +50,8 @@ Future<Placemark?> getPlacemark(double? latitude, double? longitude) async {
List<Placemark> placemarks =
await placemarkFromCoordinates(latitude, longitude);
return placemarks[0];
} on PlatformException catch (e) {
} on PlatformException catch (err) {
print(err);
return null;
}
} else {
Expand Down
1 change: 0 additions & 1 deletion lib/widgets/news_list.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../providers/news_provider.dart';
import '../models/aylien_data.dart';
import '../widgets/news_card.dart';

class NewsList extends StatefulWidget {
Expand Down
1 change: 0 additions & 1 deletion test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:news_appdate/main.dart';
import 'package:news_appdate/pages/wrapper.dart';

void main() {
Expand Down

0 comments on commit 275c8af

Please sign in to comment.