Skip to content

Commit

Permalink
Changes to OpenWeather attribution.
Browse files Browse the repository at this point in the history
  • Loading branch information
bzrudski committed Aug 3, 2022
1 parent 23781b9 commit 1be51a5
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,6 @@ SPEC CHECKSUMS:
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de

PODFILE CHECKSUM: 43670cd6fad07a82f848bd409b139557e7e42f8d
PODFILE CHECKSUM: 48ba0c1e455ab125a7fe9b5a129ad23791e1b2be

COCOAPODS: 1.11.3
4 changes: 4 additions & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,10 @@
"@creditsToOpenWeatherMap": {
"description": "Label for the bottom of the weather detail page to provide license information for the weather data from OpenWeather (TM)."
},
"moreAboutOpenWeather": "More about OpenWeather™",
"@moreAboutOpenWeather": {
"description": "Label for hyperlink to OpenWeather™."
},
"loginAppBarHeader": "Sign in",
"@loginAppBarHeader": {
"description": "AppBar title for the login screen."
Expand Down
2 changes: 1 addition & 1 deletion lib/sessions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ class _LoginFormState extends State<LoginForm> {
_isLoading = true;
});
_triggerLogin(
username: _usernameController.text,
username: _usernameController.text.trim(),
password: _passwordController.text,
);
}
Expand Down
4 changes: 3 additions & 1 deletion lib/url_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class UrlManager {
/// For custom servers, the [base] defines the url for the server.
UrlManager._(String base) :
_baseUrl = Uri.parse(base);

static final shared = UrlManager._("https://www.antnuptialflights.com/");

final _apiUrl = "api";
Expand Down Expand Up @@ -106,6 +106,8 @@ class UrlManager {
Uri get termsUrl => _baseUrl.resolve("$_termsUrl/");
Uri get contactUrl => Uri.parse(_emailAddress);

final openWeatherUrl = "https://openweathermap.org/";

Uri urlForFlight(int id) {
return listUrl.resolve("$id/");
}
Expand Down
17 changes: 11 additions & 6 deletions lib/weather_detail_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

import 'package:ant_nup_tracker/dark_mode_theme_ext.dart';
import 'package:ant_nup_tracker/detail_screen.dart';
import 'package:ant_nup_tracker/launch_url.dart';
import 'package:ant_nup_tracker/url_manager.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

Expand Down Expand Up @@ -172,13 +174,16 @@ class _WeatherDetailScreenState extends DetailScreenState<int, Weather> {
const Divider(
thickness: 2,
),
Image(
image: Theme.of(context).isDarkMode
? const AssetImage(
"assets/proprietary/openweather/dark/openweather.png")
: const AssetImage(
"assets/proprietary/openweather/openweather.png"),
const Image(
image: AssetImage("assets/proprietary/openweather/openweather.png"),
color: Colors.black87,
colorBlendMode: BlendMode.screen,
height: 200,
),
ListTile(
title: Text(AppLocalizations.of(context)!.moreAboutOpenWeather),
trailing: const Icon(Icons.open_in_new),
onTap: () => launchUrl(UrlManager.shared.openWeatherUrl),
)
],
);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 2.0.0+6
version: 2.1.0+6

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down

0 comments on commit 1be51a5

Please sign in to comment.