Skip to content

Commit

Permalink
starting to apply Redux
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemix committed Sep 7, 2018
1 parent 8eed679 commit 1d65b50
Show file tree
Hide file tree
Showing 25 changed files with 399 additions and 399 deletions.
248 changes: 144 additions & 104 deletions .idea/libraries/Dart_Packages.xml

Large diffs are not rendered by default.

351 changes: 111 additions & 240 deletions .idea/workspace.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions art/ffmpeg_scale_crop_800x600.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ffmpeg -i Flutter-tourism-demo-2.mp4 -vf "crop=in_h*4/3:in_h,scale=-2:600" -t 4 SomeOutput.mp4
Binary file added art/screenshots/800x600-for-dribbble.afphoto
Binary file not shown.
Binary file added art/screenshots/800x600-for-dribbble.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 art/screenshots/Flutter-tourism-demo.mp4
Binary file not shown.
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 art/screenshots/Screenshot_20180622-052158 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 art/screenshots/Screenshot_20180622-052158.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 art/screenshots/Screenshot_20180622-052206.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 art/screenshots/cropped.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 art/screenshots/flutter-tourism-demo-2.mp4
Binary file not shown.
Binary file added art/screenshots/flutter-tourism-demo-400x300.gif
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 art/screenshots/flutter-tourism-demo-i18n.mp4
Binary file not shown.
Binary file added art/screenshots/tourism-app-demo-4.mp4
Binary file not shown.
Binary file added art/screenshots/tourism-app-demo-4_2.mp4
Binary file not shown.
27 changes: 27 additions & 0 deletions lib/networking/server_api.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import 'dart:async';
import 'dart:convert';

import 'package:http/http.dart';
import 'package:tourism_demo/models/models.dart';
import 'package:tourism_demo/utils/http_utils.dart';

class OdooFlaskAPI {
// CHECKS
Future<List<Destination>> fetchDestinations() async {
print('fetching destinations...');
var checksUrlString = '';

Response response = await getRequest(checksUrlString, {});
List employeeChecksMap = json.decode(response.body);
List<Destination> employeeChecks =
employeeChecksMap.map((check) => Destination.fromJson(check)).toList();

print('${employeeChecks.length} checks fetched...');

if (employeeChecks.isNotEmpty) {
return employeeChecks;
}

return null;
}
}
22 changes: 22 additions & 0 deletions lib/utils/http_utils.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:http/http.dart';


Future<Response> getRequest(String url, Map<String, String> headers,) async {
final _client = new http.Client();
Response response = await _client
.get(url, headers: headers)
.whenComplete(_client.close);
return response;
}

Future<Response> postRequest(
String url, Map<String, String> headers, Map<String, dynamic> body) async {
final _client = new http.Client();
Response response = await _client
.post(url, body: json.encode(body), headers: headers)
.whenComplete(_client.close);
return response;
}
Loading

0 comments on commit 1d65b50

Please sign in to comment.