This commit is contained in:
Shawn 2022-11-29 11:34:15 -07:00
parent 70ca4105f0
commit f936f99579
9 changed files with 22 additions and 85 deletions

View File

@ -159,7 +159,7 @@ class _Sizes {
double get maxContentWidth1 => 800; double get maxContentWidth1 => 800;
double get maxContentWidth2 => 600; double get maxContentWidth2 => 600;
double get maxContentWidth3 => 500; double get maxContentWidth3 => 500;
final Size minAppSize = Size(450, 600); final Size minAppSize = Size(380, 675);
} }
@immutable @immutable

View File

@ -252,7 +252,7 @@ class _CarouselBottomTextWithCircle extends StatelessWidget {
text: $strings.artifactsButtonBrowse, text: $strings.artifactsButtonBrowse,
icon: AppIcons.search, icon: AppIcons.search,
expand: true, expand: true,
onPressed: () {}, //_handleSearchTap, onPressed: () => _handleSearchTap(context),
), ),
Gap($styles.insets.lg), Gap($styles.insets.lg),
], ],
@ -262,6 +262,10 @@ class _CarouselBottomTextWithCircle extends StatelessWidget {
); );
} }
void _handleSearchTap(BuildContext context) {
//context.push(ScreenPaths.search(widget.type));
}
OverflowBox _buildBgCircle() { OverflowBox _buildBgCircle() {
return OverflowBox( return OverflowBox(
maxWidth: 2000, maxWidth: 2000,

View File

@ -36,6 +36,10 @@ part 'widgets/_sliding_image_stack.dart';
part 'widgets/_title_text.dart'; part 'widgets/_title_text.dart';
part 'widgets/_top_illustration.dart'; part 'widgets/_top_illustration.dart';
//TODO: Try and maintain 1.5 : 1 aspect ratio on the featured image
//TODO: Try and move the scrollbar all the way to the edge of the screen
//TODO: Fix arch logic (if necessary)
// or maybe remove
class WonderEditorialScreen extends StatefulWidget { class WonderEditorialScreen extends StatefulWidget {
const WonderEditorialScreen(this.data, {Key? key, required this.onScroll}) : super(key: key); const WonderEditorialScreen(this.data, {Key? key, required this.onScroll}) : super(key: key);
final WonderData data; final WonderData data;

View File

@ -56,6 +56,7 @@ class _EventsListState extends State<_EventsList> {
} }
return Stack( return Stack(
children: [ children: [
//TODO: Remove scrollbar on portrait
SingleChildScrollView( SingleChildScrollView(
controller: _scroller, controller: _scroller,
child: Column( child: Column(

View File

@ -101,71 +101,6 @@ class ChichenItzaIllustration extends StatelessWidget {
zoomAmt: .1, zoomAmt: .1,
dynamicHzOffset: -100, dynamicHzOffset: -100,
), ),
// Stack(
// children: [
// Transform.scale(
// scale: 1 + config.zoom * .05,
// child: FractionalTranslation(
// translation: Offset(-.2 * (1 - curvedAnim), 0),
// child: BottomLeft(
// child: SizedBox(
// height: 500,
// child: FractionalTranslation(
// translation: Offset(-.4, .15),
// child: Image.asset('$assetPath/foreground-left.png', opacity: anim, fit: BoxFit.cover),
// ),
// ),
// ),
// ),
// ),
// Transform.scale(
// scale: 1 + config.zoom * .03,
// child: FractionalTranslation(
// translation: Offset(.2 * (1 - curvedAnim), 0),
// child: BottomRight(
// child: SizedBox(
// height: 350,
// child: FractionalTranslation(
// translation: Offset(.35, .2),
// child: Image.asset('$assetPath/foreground-right.png', opacity: anim, fit: BoxFit.cover),
// ),
// ),
// ),
// ),
// ),
// Transform.scale(
// scale: 1 + config.zoom * .25,
// child: FractionalTranslation(
// translation: Offset(-.2 * (1 - curvedAnim), 0),
// child: TopLeft(
// child: SizedBox(
// height: 600,
// child: FractionalTranslation(
// translation: Offset(-.3, -.45),
// child: Image.asset('$assetPath/top-left.png', opacity: anim, fit: BoxFit.cover),
// ),
// ),
// ),
// ),
// ),
// Transform.scale(
// scale: 1 + config.zoom * .2,
// child: FractionalTranslation(
// translation: Offset(.2 * (1 - curvedAnim), 0),
// child: TopRight(
// child: SizedBox(
// height: 700,
// child: FractionalTranslation(
// translation: Offset(.2, -.35),
// child: Image.asset('$assetPath/top-right.png', opacity: anim, fit: BoxFit.cover),
// ),
// ),
// ),
// ),
// ),
// ],
// ),
]; ];
} }
} }

View File

@ -33,23 +33,13 @@ class ColosseumIllustration extends StatelessWidget {
opacity: anim.drive(Tween(begin: 0, end: .5)), opacity: anim.drive(Tween(begin: 0, end: .5)),
), ),
), ),
Align( IllustrationPiece(
alignment: config.shortMode ? Alignment(-.3, 1) : Alignment(-.5, -.4), fileName: 'sun.png',
child: FractionalTranslation( initialOffset: Offset(0, 20),
translation: Offset(0, -.5 * anim.value), enableHero: true,
child: WonderHero( heightFactor: .15,
config, minHeight: 150,
'colosseum-sun', offset: config.shortMode ? Offset(70, context.heightPx * -.05) : Offset(50, context.heightPx * -.25),
child: Transform.scale(
scale: config.shortMode ? .75 : 1,
child: Image.asset(
'$assetPath/sun.png',
cacheWidth: context.widthPx.round() * 2,
opacity: anim,
),
),
),
),
), ),
]; ];
} }
@ -60,6 +50,7 @@ class ColosseumIllustration extends StatelessWidget {
children: const [ children: const [
IllustrationPiece( IllustrationPiece(
fileName: 'colosseum.png', fileName: 'colosseum.png',
enableHero: true,
heightFactor: .55, heightFactor: .55,
minHeight: 400, minHeight: 400,
zoomAmt: .15, zoomAmt: .15,

View File

@ -2,6 +2,7 @@ import 'dart:async';
import 'package:wonders/common_libs.dart'; import 'package:wonders/common_libs.dart';
import 'package:wonders/ui/common/utils/context_utils.dart'; import 'package:wonders/ui/common/utils/context_utils.dart';
//TODO: Make the clouds fade out and in
// Shows a set of clouds that animated onto stage. // Shows a set of clouds that animated onto stage.
// When value-key is changed, a new set of clouds will animate into place and the old ones will animate out. // When value-key is changed, a new set of clouds will animate into place and the old ones will animate out.
// Uses a random seed system, to make sure we get the same set of clouds for each wonder, without actually having to hand-position them. // Uses a random seed system, to make sure we get the same set of clouds for each wonder, without actually having to hand-position them.

View File

@ -50,7 +50,7 @@ class GreatWallIllustration extends StatelessWidget {
IllustrationPiece( IllustrationPiece(
fileName: 'great-wall.png', fileName: 'great-wall.png',
heightFactor: .55, heightFactor: .55,
minHeight: 600, minHeight: 500,
zoomAmt: .05, zoomAmt: .05,
enableHero: true, enableHero: true,
), ),

View File

@ -59,6 +59,7 @@ class TajMahalIllustration extends StatelessWidget {
fileName: 'taj-mahal.png', fileName: 'taj-mahal.png',
heightFactor: heightFactor, heightFactor: heightFactor,
minHeight: minHeight, minHeight: minHeight,
enableHero: true,
zoomAmt: .05, zoomAmt: .05,
top: config.shortMode top: config.shortMode
? null ? null