Merge branch 'master' into feature-v2-polish

# Conflicts:
#	lib/common_libs.dart
This commit is contained in:
Shawn 2022-12-19 12:15:33 -07:00
commit 19985ca659
17 changed files with 42 additions and 57 deletions

View File

@ -12,9 +12,9 @@
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as <!-- Specifies an Android theme to apply to this Activity as soon as

View File

@ -1,6 +0,0 @@
package com.gskinner.flutter.flutter_wonders_app
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}

View File

@ -1,15 +0,0 @@
package com.gskinner.flutter.wonders
import android.os.Bundle
import com.google.android.gms.maps.MapsInitializer
import com.google.android.gms.maps.OnMapsSdkInitializedCallback
import io.flutter.embedding.android.FlutterActivity
class MainActivity : FlutterActivity(), OnMapsSdkInitializedCallback {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
MapsInitializer.initialize(applicationContext, MapsInitializer.Renderer.LATEST, this)
}
override fun onMapsSdkInitialized(p0: MapsInitializer.Renderer) {}
}

View File

@ -5,9 +5,9 @@ import 'dart:collection';
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:http/http.dart' as http;
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:wonders/common_libs.dart'; import 'package:wonders/common_libs.dart';
import 'package:http/http.dart' as http;
import 'package:wonders/logic/data/wonder_data.dart'; import 'package:wonders/logic/data/wonder_data.dart';
import 'package:wonders/logic/data/wonders_data/search/search_data.dart'; import 'package:wonders/logic/data/wonders_data/search/search_data.dart';

View File

@ -7,6 +7,7 @@ export 'package:extra_alignments/extra_alignments.dart';
export 'package:flextras/flextras.dart'; export 'package:flextras/flextras.dart';
export 'package:flutter/material.dart'; export 'package:flutter/material.dart';
export 'package:flutter/services.dart'; export 'package:flutter/services.dart';
export 'package:flutter_animate/flutter_animate.dart';
export 'package:gap/gap.dart'; export 'package:gap/gap.dart';
export 'package:get_it/get_it.dart'; export 'package:get_it/get_it.dart';
export 'package:get_it_mixin/get_it_mixin.dart'; export 'package:get_it_mixin/get_it_mixin.dart';
@ -22,8 +23,7 @@ export 'package:wonders/logic/settings_logic.dart';
export 'package:wonders/main.dart'; export 'package:wonders/main.dart';
export 'package:wonders/router.dart'; export 'package:wonders/router.dart';
export 'package:wonders/styles/styles.dart'; export 'package:wonders/styles/styles.dart';
export 'package:wonders/ui/common/controls/app_image.dart';
export 'package:wonders/ui/common/controls/buttons.dart'; export 'package:wonders/ui/common/controls/buttons.dart';
export 'package:wonders/ui/common/controls/circle_buttons.dart'; export 'package:wonders/ui/common/controls/circle_buttons.dart';
export 'package:wonders/ui/common/controls/scroll_decorator.dart'; export 'package:wonders/ui/common/controls/scroll_decorator.dart';
export 'package:wonders/ui/common/controls/app_image.dart';
export 'package:flutter_animate/flutter_animate.dart';

View File

@ -12,7 +12,7 @@ class AppLogic {
/// The router will use this to prevent redirects while bootstrapping. /// The router will use this to prevent redirects while bootstrapping.
bool isBootstrapComplete = false; bool isBootstrapComplete = false;
bool get isDesktopOrTablet => PlatformInfo.isDesktopOrWeb || deviceSize.shortestSide > 500; bool get isDesktopOrTablet => PlatformInfo.isDesktopOrWeb || deviceSize.shortestSide > 480;
/// Support portrait and landscape on desktop, web and tablets. Stick to portrait for phones. /// Support portrait and landscape on desktop, web and tablets. Stick to portrait for phones.
/// A return value of null indicated both orientations are supported. /// A return value of null indicated both orientations are supported.
@ -26,6 +26,7 @@ class AppLogic {
/// Initialize the app and all main actors. /// Initialize the app and all main actors.
/// Loads settings, sets up services etc. /// Loads settings, sets up services etc.
Future<void> bootstrap() async { Future<void> bootstrap() async {
debugPrint('bootstrap app, deviceSize: $deviceSize, isTablet: $isDesktopOrTablet');
// Default error handler // Default error handler
FlutterError.onError = _handleFlutterError; FlutterError.onError = _handleFlutterError;

View File

@ -111,7 +111,6 @@ class _WonderEditorialScreenState extends State<WonderEditorialScreen> {
primary: false, primary: false,
controller: _scroller, controller: _scroller,
scrollBehavior: ScrollConfiguration.of(context).copyWith(), scrollBehavior: ScrollConfiguration.of(context).copyWith(),
cacheExtent: 1000,
slivers: [ slivers: [
/// Invisible padding at the top of the list, so the illustration shows through the btm /// Invisible padding at the top of the list, so the illustration shows through the btm
SliverToBoxAdapter( SliverToBoxAdapter(

View File

@ -134,7 +134,7 @@ class _ScrollingContent extends StatelessWidget {
buildText(data.locationInfo2), buildText(data.locationInfo2),
]), ]),
Gap($styles.insets.md), Gap($styles.insets.md),
_MapsThumbnail(data, height: 200), _MapsThumbnail(data, height: 400),
Gap($styles.insets.md), Gap($styles.insets.md),
..._contentSection([Center(child: buildHiddenCollectible(slot: 3))]), ..._contentSection([Center(child: buildHiddenCollectible(slot: 3))]),
]), ]),

View File

@ -53,21 +53,23 @@ class AboutDialogContent extends StatelessWidget {
'{gskinnerUrl}': [$strings.homeMenuAboutGskinner, 'https://gskinner.com/flutter'], '{gskinnerUrl}': [$strings.homeMenuAboutGskinner, 'https://gskinner.com/flutter'],
}), }),
...buildSpan('\n\n'), ...buildSpan('\n\n'),
...buildSpan($strings.homeMenuAboutLearn('{wonderousUrl}'), linkSupplants: { ...buildSpan('${$strings.homeMenuAboutLearn('{wonderousUrl}')} ', linkSupplants: {
'{wonderousUrl}': [$strings.homeMenuAboutApp, 'https://wonderous.app'], '{wonderousUrl}': [$strings.homeMenuAboutApp, 'https://flutter.gskinner.com/wonderous/'],
}), }),
...buildSpan('\n\n'),
...buildSpan($strings.homeMenuAboutSource('{githubUrl}'), linkSupplants: { ...buildSpan($strings.homeMenuAboutSource('{githubUrl}'), linkSupplants: {
'{githubUrl}': [$strings.homeMenuAboutRepo, 'https://github.com/gskinnerTeam/flutter-wonderous-app'], '{githubUrl}': [($strings.homeMenuAboutRepo), 'https://github.com/gskinnerTeam/flutter-wonderous-app'],
}), }),
...buildSpan(' As explained in our {privacyUrl} we do no collect any personal information.',
linkSupplants: {
'{privacyUrl}': ['Privacy Policy', 'https://flutter.gskinner.com/wonderous/privacy/'],
}),
...buildSpan('\n\n'), ...buildSpan('\n\n'),
...buildSpan($strings.homeMenuAboutPublic('{metUrl}'), linkSupplants: { ...buildSpan('${$strings.homeMenuAboutPublic('{metUrl}')} ', linkSupplants: {
'{metUrl}': [ '{metUrl}': [
$strings.homeMenuAboutMet, $strings.homeMenuAboutMet,
'https://www.metmuseum.org/about-the-met/policies-and-documents/open-access' 'https://www.metmuseum.org/about-the-met/policies-and-documents/open-access'
], ],
}), }),
...buildSpan('\n\n'),
...buildSpan($strings.homeMenuAboutPhotography('{unsplashUrl}'), linkSupplants: { ...buildSpan($strings.homeMenuAboutPhotography('{unsplashUrl}'), linkSupplants: {
'{unsplashUrl}': [$strings.homeMenuAboutUnsplash, 'https://unsplash.com/@gskinner/collections'], '{unsplashUrl}': [$strings.homeMenuAboutUnsplash, 'https://unsplash.com/@gskinner/collections'],
}), }),

View File

@ -13,6 +13,8 @@ class HomeMenu extends StatelessWidget {
void _handleAboutPressed(BuildContext context) async { void _handleAboutPressed(BuildContext context) async {
PackageInfo packageInfo = await PackageInfo.fromPlatform(); PackageInfo packageInfo = await PackageInfo.fromPlatform();
// ignore: use_build_context_synchronously
if (!context.mounted) return;
showAboutDialog( showAboutDialog(
context: context, context: context,
applicationName: $strings.appName, applicationName: $strings.appName,

View File

@ -120,12 +120,11 @@ class _TabBtn extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
bool selected = tabController.index == index; bool selected = tabController.index == index;
final MaterialLocalizations localizations = MaterialLocalizations.of(context); final MaterialLocalizations localizations = MaterialLocalizations.of(context);
final iconImgPath = '${ImagePaths.common}/tab-$iconImg${selected ? '-active' : ''}.png'; final iconImgPath = '${ImagePaths.common}/tab-$iconImg${selected ? '-active' : ''}.png';
String tabLabel = localizations.tabLabel(tabIndex: index + 1, tabCount: tabController.length); String tabLabel = localizations.tabLabel(tabIndex: index + 1, tabCount: tabController.length);
tabLabel = '$label: $tabLabel'; tabLabel = '$label: $tabLabel';
final double btnWidth = (context.widthPx / 6).clamp(70, 120); final double btnWidth = (context.widthPx / 6).clamp(50, 120);
return MergeSemantics( return MergeSemantics(
child: Semantics( child: Semantics(
selected: selected, selected: selected,

View File

@ -87,7 +87,7 @@ class _IllustrationPieceState extends State<IllustrationPiece> {
final config = wonderBuilder.widget.config; final config = wonderBuilder.widget.config;
Widget img = Image.asset(imgPath, opacity: anim, fit: BoxFit.fitHeight); Widget img = Image.asset(imgPath, opacity: anim, fit: BoxFit.fitHeight);
// Add overflow box so image doesn't get clipped as we translate it around // Add overflow box so image doesn't get clipped as we translate it around
img = OverflowBox(maxWidth: 2000, child: img); img = OverflowBox(maxWidth: 2500, child: img);
final double introZoom = (widget.initialScale - 1) * (1 - curvedAnim); final double introZoom = (widget.initialScale - 1) * (1 - curvedAnim);

View File

@ -1,10 +1,10 @@
// This is a generated file; do not edit or check into version control. // This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=C:\_dev\sdks\flutter FLUTTER_ROOT=/Users/shawn/Dev/flutter
FLUTTER_APPLICATION_PATH=C:\_dev\gskinner\flutter_wonders_app FLUTTER_APPLICATION_PATH=/Users/shawn/Dev/gskinner/flutter-wonders-app
COCOAPODS_PARALLEL_CODE_SIGN=true COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_BUILD_DIR=build FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.9.7 FLUTTER_BUILD_NAME=2.0.3
FLUTTER_BUILD_NUMBER=1.9.7 FLUTTER_BUILD_NUMBER=2.0.3
DART_OBFUSCATION=false DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false TREE_SHAKE_ICONS=false

View File

@ -1,11 +1,11 @@
#!/bin/sh #!/bin/sh
# This is a generated file; do not edit or check into version control. # This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=C:\_dev\sdks\flutter" export "FLUTTER_ROOT=/Users/shawn/Dev/flutter"
export "FLUTTER_APPLICATION_PATH=C:\_dev\gskinner\flutter_wonders_app" export "FLUTTER_APPLICATION_PATH=/Users/shawn/Dev/gskinner/flutter-wonders-app"
export "COCOAPODS_PARALLEL_CODE_SIGN=true" export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_BUILD_DIR=build" export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.9.7" export "FLUTTER_BUILD_NAME=2.0.3"
export "FLUTTER_BUILD_NUMBER=1.9.7" export "FLUTTER_BUILD_NUMBER=2.0.3"
export "DART_OBFUSCATION=false" export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true" export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false" export "TREE_SHAKE_ICONS=false"

View File

@ -664,10 +664,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" sha256: c94db23593b89766cda57aab9ac311e3616cf87c6fa4e9749df032f66f30dcb8
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.13" version: "0.12.14"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
@ -768,10 +768,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.8.2" version: "1.8.3"
path_drawing: path_drawing:
dependency: transitive dependency: transitive
description: description:
@ -1149,10 +1149,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: string_scanner name: string_scanner
sha256: "862015c5db1f3f3c4ea3b94dc2490363a84262994b88902315ed74be1155612f" sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.1" version: "1.2.0"
sync_http: sync_http:
dependency: transitive dependency: transitive
description: description:
@ -1173,10 +1173,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: c9aba3b3dbfe8878845dfab5fa096eb8de7b62231baeeb1cea8e3ee81ca8c6d8 sha256: c9282698e2982b6c3817037554e52f99d4daba493e8028f8112a83d68ccd0b12
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.4.15" version: "0.4.17"
timing: timing:
dependency: transitive dependency: transitive
description: description:

View File

@ -1,7 +1,7 @@
name: wonders name: wonders
description: Explore the famous wonders of the world. description: Explore the famous wonders of the world.
publish_to: "none" publish_to: "none"
version: 2.0.2 version: 2.0.3
environment: environment:
sdk: ">=2.17.0 <3.0.0" sdk: ">=2.17.0 <3.0.0"

View File

@ -1,6 +1,9 @@
# 2.0.0 # 2.0.3
- Add support for widescreen tablet devices - Add support for landscape tablet devices
- Various polish and improvements - Various improvements / polish
- Add privacy policy link
- Fix for rendering issues on Timeline / Editorial
- Uses Flutter 3.7 Candidate 5
# 1.9.7 # 1.9.7
- Updated impeller version - Updated impeller version