Skip to content

Commit

Permalink
fade-in images; changing locale across the app
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemix committed Sep 10, 2018
1 parent 12bd041 commit 44cd10c
Show file tree
Hide file tree
Showing 31 changed files with 368 additions and 404 deletions.
406 changes: 220 additions & 186 deletions .idea/workspace.xml

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
A Flutter tourism app that is backed-by Redux, shows animations (with 3D rotation), internationalization (i18n, English <=> Arabic), ClipPath, and fonts.

A Flutter tourism demo app that shows animations (with 3D rotation), internationalization (i18n, English <=> Arabic), ClipPath, and fonts.

[YouTube demo](https://youtu.be/31WL1ep1Ce8)

### Screenshots
![](art/sc1.png)
![](art/sc2.png)
![](art/sc3.png)
![](art/sc4.png)
![](art/screenshots/flutter-tourism-demo-400x300.gif)

[YouTube demo](https://youtu.be/31WL1ep1Ce8)


<!-- ### Credits
Expand Down
Binary file removed images/Armenia1.jpg
Binary file not shown.
Binary file removed images/Bodrum.jpg
Binary file not shown.
Binary file removed images/Mare_marmaris_beach.jpg
Binary file not shown.
Binary file removed images/Ordu.jpg
Binary file not shown.
Binary file removed images/TURKEY-COUNTRY-IMAGE.jpg
Binary file not shown.
Binary file removed images/Trabzon.jpg
Binary file not shown.
Binary file removed images/Tunisia tourisim.jpg
Binary file not shown.
Binary file removed images/bursa-02.jpg
Binary file not shown.
Binary file removed images/egypt-pyramids.jpg
Binary file not shown.
Binary file removed images/gamze-bozkaya-561150-unsplash.jpg
Binary file not shown.
Binary file removed images/giresun_turkey__by_bigzoso-dc0xmin.jpg
Binary file not shown.
Binary file removed images/indonesia.jpg
Binary file not shown.
Binary file removed images/istanbul-2.jpg
Binary file not shown.
Binary file removed images/istanbul.jpg
Binary file not shown.
Binary file removed images/kuala-lumpur.jpg
Binary file not shown.
Binary file removed images/lebanon travel.jpg
Binary file not shown.
Binary file added images/placeholder.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 removed images/tourist-boat-trip.jpg
Binary file not shown.
Binary file removed images/ukraine.jpg
Binary file not shown.
Binary file removed images/viceroy-bali.jpg
Binary file not shown.
27 changes: 0 additions & 27 deletions lib/app_styles.dart

This file was deleted.

28 changes: 0 additions & 28 deletions lib/clippers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,31 +61,3 @@ class NotchedClipper extends CustomClipper<Path> {
@override
bool shouldReclip(CustomClipper<Path> oldClipper) => false;
}

class BottomWaveClipper extends CustomClipper<Path> {
@override
Path getClip(Size size) {
Path path = new Path();
path.lineTo(0.0, size.height - 20);

var bottomControlPoint = new Offset(size.width / 3.25, size.height);
var bottomEndPoint = new Offset(size.width, size.height - 30.0);
path.quadraticBezierTo(bottomControlPoint.dx, bottomControlPoint.dy,
bottomEndPoint.dx, bottomEndPoint.dy);

path.lineTo(size.width, size.height - 30);
path.lineTo(size.width, 20.0);

var bottomControlPoint2 = new Offset(size.width / 3.25, 0.0);
var bottomEndPoint2 = new Offset(0.0, 40.0);
path.quadraticBezierTo(bottomControlPoint2.dx, bottomControlPoint2.dy,
bottomEndPoint2.dx, bottomEndPoint2.dy);

path.lineTo(0.0, 40.0);

return path;
}

@override
bool shouldReclip(CustomClipper<Path> oldClipper) => false;
}
36 changes: 0 additions & 36 deletions lib/i18n/translations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,13 @@ class Translations {
static Map<String, Map<String, String>> _localizedValues = {
'en': {
'title': 'Tourism App',
'username': 'Username',
'password': 'Password',
'loading': 'Loading...',
'checks': 'Checks',
'empty': 'No Information!',
'msg_empty_content': 'Empty Content!',
'summary': 'Summary',
'leaves': 'Leaves',
'msg_error_fetching_checks': 'Error fetching checks!',
'msg_error_fetching_summary': 'Error fetching summary!',
'msg_error_fetching_leaves': 'Error fetching leaves!',
'msg_error_fetching_profile': 'Error fetching Profile!',
'msg_error_posting_new_leave': 'Error posting new leave request!',
'msg_check_login_data': 'Please check your login data!',
'msg_error_loading_destinatinos': 'Error loading destinations list!',
'msg_check_internet_connection': 'Make sure you\'re connected to the Internet',
'msg_loading_leave_types': 'Getting leaves types...',
'msg_error_loading_type_types':
'There is a problem fetching leave types!',
'leave_request_reason': 'Leave message',
'date_from': 'From date',
'dateTo': 'to date',
'logged_in': 'Logged In...',
'language': 'عربي',
'profile': 'Profile',
'login': 'Login',
'retry': 'Retry',
'apply': 'Apply',
Expand All @@ -56,31 +38,13 @@ class Translations {
},
'ar': {
'title': 'تطبيق سياحة',
'username': 'المستخدم',
'password': 'الرمز السري',
'loading': 'الرجاء الإنتظار...',
'empty': 'معلومات فارغة',
'checks': 'البصمات',
'msg_error_fetching_summary': 'مشكلة في إحضار البصمات',
'msg_empty_content': 'لا توجد معلومات!',
'summary': 'التقرير',
'leaves': 'الإجازات',
'login': 'دخول',
'apply': 'تقديم',
'profile': 'الملف الشخصي',
'msg_error_fetching_checks': 'مشكلة في عرض البصمات!',
'msg_error_fetching_leaves': 'مشكلة في عرض الإجازات!',
'msg_error_fetching_profile': 'مشكلة في عرض معلومات الموظف!',
'msg_error_posting_new_leave': 'مشكلة في إنشاء إجازة جديدة!',
'msg_error_loading_destinatinos': 'مشكلة في إحضار قائمة السفرات!',
'msg_check_login_data': 'الرجاء التأكد من المعلومات المدخلة!',
'msg_loading_leave_types': 'جاري إحضار أنواع الإجازات...',
'msg_error_loading_type_types': 'مشكلة في إحضار أنواع الإجازات!',
'msg_check_internet_connection': 'الرجاء التأكد من إتصالك بالإنترنت',
'leave_request_reason': 'سبب التقديم',
'date_from': 'من تاريخ',
'date_to': 'إلى',
'logged_in': 'تم تسجيل الدخول...',
'retry': 'محاولة أخرى',
'language': 'English',
'home': 'الرئيسية',
Expand Down
15 changes: 9 additions & 6 deletions lib/networking/server_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@ import 'package:tourism_demo/models/destination.dart';
import 'package:tourism_demo/utils/http_utils.dart';

class ServerAPI {
static String host = 'https://api.jsonbin.io/b/5b96db5eab9a186eafe86a97/1';


static String host = 'http://192.168.0.103:3000';
// DESTINATIONS
Future<List<Destination>> fetchDestinations() async {
print('fetching destinations...');
var url = '$host/destinations';
var url = '$host';

Response response = await getRequest(url, {});
Response response = await getRequest(url, {
'Content-type': 'application/json; charset=utf-8',
'Accept': 'application/json'
});
List responseJSON = json.decode(response.body);
List<Destination> destinations =
responseJSON.map((destination) => Destination.fromJson(destination)).toList();
List<Destination> destinations = responseJSON
.map((destination) => Destination.fromJson(destination))
.toList();

print('${destinations.length} destinations fetched...');

Expand Down
30 changes: 30 additions & 0 deletions lib/styles/app_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,36 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';


import 'package:flutter/widgets.dart';

BoxDecoration gradientBackDecoration() {
return const BoxDecoration(
gradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: const <Color>[
Color(0xffF55B9A), // <color name="violet_red">#F55B9A</color>
Color(0xffF9B16E), // <color name="rajah">#F9B16E</color>
],
),
);
}

BoxDecoration cardGradientBackground() {
return const BoxDecoration(
gradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomCenter,
colors: const <Color>[
Color(0xffF1EEE7), // <color name="alabaster">#F1EEE7</color>
Color(0xffF8FAF9), // <color name="hint_of_red">#F8FAF9</color>
],
),
);
}


class AppColors {
static var primaryBackgroundColor = Colors.white; // <color name="blue_lagoon">#005F79</color>
static var secondaryBackgroundColor = new Color(0xFF458BA3); //<color name="boston_blue">#458BA3</color>
Expand Down
Loading

0 comments on commit 44cd10c

Please sign in to comment.