mirror of
https://github.com/gskinnerTeam/flutter-wonderous-app.git
synced 2025-05-18 05:15:59 +08:00
Merge branch 'accessability-pass' into accessibility-pass-animationtimesbeta
This commit is contained in:
@ -32,8 +32,8 @@
|
|||||||
"appModalsButtonOk": "Ok",
|
"appModalsButtonOk": "Ok",
|
||||||
"appModalsButtonCancel": "Cancel",
|
"appModalsButtonCancel": "Cancel",
|
||||||
"appPageDefaultTitlePage": "page",
|
"appPageDefaultTitlePage": "page",
|
||||||
"appPageSemanticSwipe": "{pageTitle} {count} of {total}.",
|
"appPageSemanticSwipe": "{pageTitle} {current} of {total}.",
|
||||||
"@appPageSemanticSwipe": {"placeholders": {"pageTitle": {}, "total": {}, "count": {}}},
|
"@appPageSemanticSwipe": {"placeholders": {"pageTitle": {}, "current": {}, "total": {}}},
|
||||||
"artifactsTitleArtifacts": "ARTIFACTS",
|
"artifactsTitleArtifacts": "ARTIFACTS",
|
||||||
"semanticsPrevious": "Previous {title}",
|
"semanticsPrevious": "Previous {title}",
|
||||||
"@semanticsPrevious": {"placeholders": {"title": {}}},
|
"@semanticsPrevious": {"placeholders": {"title": {}}},
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
"appModalsButtonOk": "确定",
|
"appModalsButtonOk": "确定",
|
||||||
"appModalsButtonCancel": "取消",
|
"appModalsButtonCancel": "取消",
|
||||||
"appPageDefaultTitlePage": "页",
|
"appPageDefaultTitlePage": "页",
|
||||||
"appPageSemanticSwipe": "{pageTitle} {total} 之 {count}.",
|
"appPageSemanticSwipe": "{pageTitle} {total} 之 {current}.",
|
||||||
"artifactsTitleArtifacts": "文物",
|
"artifactsTitleArtifacts": "文物",
|
||||||
"semanticsPrevious": "之前的文物{title}",
|
"semanticsPrevious": "之前的文物{title}",
|
||||||
"semanticsNext": "下一个文物{title}",
|
"semanticsNext": "下一个文物{title}",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'package:wonders/common_libs.dart';
|
import 'package:wonders/common_libs.dart';
|
||||||
import 'package:wonders/ui/common/app_icons.dart';
|
import 'package:wonders/ui/common/app_icons.dart';
|
||||||
|
import 'package:wonders/ui/common/ignore_pointer.dart';
|
||||||
|
|
||||||
/// Shared methods across button types
|
/// Shared methods across button types
|
||||||
Widget _buildIcon(BuildContext context, AppIcons icon, {required bool isSecondary, required double? size}) =>
|
Widget _buildIcon(BuildContext context, AppIcons icon, {required bool isSecondary, required double? size}) =>
|
||||||
@ -154,7 +155,7 @@ class AppBtn extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
if (focus.hasFocus)
|
if (focus.hasFocus)
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: IgnorePointer(
|
child: IgnorePointerWithSemantics(
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular($styles.corners.md),
|
borderRadius: BorderRadius.circular($styles.corners.md),
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import 'package:wonders/common_libs.dart';
|
import 'package:wonders/common_libs.dart';
|
||||||
|
import 'package:wonders/ui/common/ignore_pointer.dart';
|
||||||
|
|
||||||
/// Easily add visual decorations to a scrolling widget based on the state of its controller.
|
/// Easily add visual decorations to a scrolling widget based on the state of its controller.
|
||||||
class ScrollDecorator extends StatefulWidget {
|
class ScrollDecorator extends StatefulWidget {
|
||||||
@ -64,7 +65,7 @@ class ScrollDecorator extends StatefulWidget {
|
|||||||
bgBuilder = null;
|
bgBuilder = null;
|
||||||
fgBuilder = (controller) {
|
fgBuilder = (controller) {
|
||||||
final double ratio = controller.hasClients ? min(1, controller.position.extentBefore / 60) : 0;
|
final double ratio = controller.hasClients ? min(1, controller.position.extentBefore / 60) : 0;
|
||||||
return IgnorePointer(
|
return IgnorePointerWithSemantics(
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 24,
|
height: 24,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:wonders/ui/common/ignore_pointer.dart';
|
||||||
|
|
||||||
class GradientContainer extends StatelessWidget {
|
class GradientContainer extends StatelessWidget {
|
||||||
const GradientContainer(this.colors, this.stops,
|
const GradientContainer(this.colors, this.stops,
|
||||||
@ -23,7 +24,8 @@ class GradientContainer extends StatelessWidget {
|
|||||||
final BorderRadius? borderRadius;
|
final BorderRadius? borderRadius;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => IgnorePointer(
|
Widget build(BuildContext context) => ExcludeSemantics(
|
||||||
|
child: IgnorePointerWithSemantics(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
@ -40,6 +42,7 @@ class GradientContainer extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: child,
|
child: child,
|
||||||
),
|
),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
18
lib/ui/common/ignore_pointer.dart
Normal file
18
lib/ui/common/ignore_pointer.dart
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import 'package:flutter/rendering.dart';
|
||||||
|
import 'package:wonders/common_libs.dart';
|
||||||
|
|
||||||
|
class IgnorePointerWithSemantics extends SingleChildRenderObjectWidget {
|
||||||
|
const IgnorePointerWithSemantics({super.key, super.child});
|
||||||
|
|
||||||
|
@override
|
||||||
|
RenderIgnorePointerWithSemantics createRenderObject(BuildContext context) {
|
||||||
|
return RenderIgnorePointerWithSemantics();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RenderIgnorePointerWithSemantics extends RenderProxyBox {
|
||||||
|
RenderIgnorePointerWithSemantics();
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool hitTest(BoxHitTestResult result, { required Offset position }) => false;
|
||||||
|
}
|
@ -102,7 +102,7 @@ class _FullscreenUrlImgViewerState extends State<FullscreenUrlImgViewer> {
|
|||||||
CircleIconBtn(
|
CircleIconBtn(
|
||||||
icon: AppIcons.prev,
|
icon: AppIcons.prev,
|
||||||
onPressed: page == 0 ? null : () => _animateToPage(page - 1),
|
onPressed: page == 0 ? null : () => _animateToPage(page - 1),
|
||||||
semanticLabel: $strings.semanticsNext(''),
|
semanticLabel: $strings.semanticsPrevious(''),
|
||||||
),
|
),
|
||||||
Gap($styles.insets.xs),
|
Gap($styles.insets.xs),
|
||||||
CircleIconBtn(
|
CircleIconBtn(
|
||||||
|
@ -9,6 +9,7 @@ class WonderousLogo extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => Image.asset(
|
Widget build(BuildContext context) => Image.asset(
|
||||||
ImagePaths.appLogoPlain,
|
ImagePaths.appLogoPlain,
|
||||||
|
excludeFromSemantics: true,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
width: width,
|
width: width,
|
||||||
filterQuality: FilterQuality.high,
|
filterQuality: FilterQuality.high,
|
||||||
|
@ -5,6 +5,7 @@ import 'package:wonders/logic/data/highlight_data.dart';
|
|||||||
import 'package:wonders/ui/common/app_icons.dart';
|
import 'package:wonders/ui/common/app_icons.dart';
|
||||||
import 'package:wonders/ui/common/controls/app_header.dart';
|
import 'package:wonders/ui/common/controls/app_header.dart';
|
||||||
import 'package:wonders/ui/common/controls/app_page_indicator.dart';
|
import 'package:wonders/ui/common/controls/app_page_indicator.dart';
|
||||||
|
import 'package:wonders/ui/common/ignore_pointer.dart';
|
||||||
import 'package:wonders/ui/common/static_text_scale.dart';
|
import 'package:wonders/ui/common/static_text_scale.dart';
|
||||||
|
|
||||||
part 'widgets/_blurred_image_bg.dart';
|
part 'widgets/_blurred_image_bg.dart';
|
||||||
|
@ -26,8 +26,7 @@ class _BottomTextContent extends StatelessWidget {
|
|||||||
Gap($styles.insets.md),
|
Gap($styles.insets.md),
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
IgnorePointer(
|
IgnorePointerWithSemantics(
|
||||||
ignoringSemantics: false,
|
|
||||||
child: Semantics(
|
child: Semantics(
|
||||||
button: true,
|
button: true,
|
||||||
onIncrease: () => state._handleArtifactTap(_currentPage + 1),
|
onIncrease: () => state._handleArtifactTap(_currentPage + 1),
|
||||||
|
@ -9,6 +9,7 @@ class _InfoColumn extends StatelessWidget {
|
|||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: $styles.insets.lg),
|
padding: EdgeInsets.symmetric(horizontal: $styles.insets.lg),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
|
child: Focus(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
@ -62,6 +63,7 @@ class _InfoColumn extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
part of '../artifact_search_screen.dart';
|
part of '../artifact_search_screen.dart';
|
||||||
|
|
||||||
/// Autopopulating textfield used for searching for Artifacts by name.
|
/// Autopopulating textfield used for searching for Artifacts by name.
|
||||||
|
const double _inputWidth = 400;
|
||||||
class _SearchInput extends StatelessWidget {
|
class _SearchInput extends StatelessWidget {
|
||||||
const _SearchInput({super.key, required this.onSubmit, required this.wonder});
|
const _SearchInput({super.key, required this.onSubmit, required this.wonder});
|
||||||
final void Function(String) onSubmit;
|
final void Function(String) onSubmit;
|
||||||
@ -49,6 +50,7 @@ class _SearchInput extends StatelessWidget {
|
|||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(top: $styles.insets.xxs),
|
margin: EdgeInsets.only(top: $styles.insets.xxs),
|
||||||
width: constraints.maxWidth,
|
width: constraints.maxWidth,
|
||||||
|
constraints: BoxConstraints(maxWidth: _inputWidth),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
@ -120,6 +122,7 @@ class _SearchInput extends StatelessWidget {
|
|||||||
Widget _buildInput(BuildContext context, TextEditingController textController, FocusNode focusNode, _) {
|
Widget _buildInput(BuildContext context, TextEditingController textController, FocusNode focusNode, _) {
|
||||||
Color captionColor = $styles.colors.caption;
|
Color captionColor = $styles.colors.caption;
|
||||||
return Container(
|
return Container(
|
||||||
|
constraints: BoxConstraints(maxWidth: _inputWidth),
|
||||||
height: $styles.insets.xl,
|
height: $styles.insets.xl,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: $styles.colors.offWhite,
|
color: $styles.colors.offWhite,
|
||||||
@ -134,7 +137,7 @@ class _SearchInput extends StatelessWidget {
|
|||||||
onSubmitted: onSubmit,
|
onSubmitted: onSubmit,
|
||||||
controller: textController,
|
controller: textController,
|
||||||
focusNode: focusNode,
|
focusNode: focusNode,
|
||||||
style: TextStyle(color: captionColor),
|
style: TextStyle(color: captionColor, ),
|
||||||
textAlignVertical: TextAlignVertical.top,
|
textAlignVertical: TextAlignVertical.top,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
|
@ -17,6 +17,7 @@ import 'package:wonders/ui/common/fullscreen_keyboard_list_scroller.dart';
|
|||||||
import 'package:wonders/ui/common/google_maps_marker.dart';
|
import 'package:wonders/ui/common/google_maps_marker.dart';
|
||||||
import 'package:wonders/ui/common/gradient_container.dart';
|
import 'package:wonders/ui/common/gradient_container.dart';
|
||||||
import 'package:wonders/ui/common/hidden_collectible.dart';
|
import 'package:wonders/ui/common/hidden_collectible.dart';
|
||||||
|
import 'package:wonders/ui/common/ignore_pointer.dart';
|
||||||
import 'package:wonders/ui/common/pop_router_on_over_scroll.dart';
|
import 'package:wonders/ui/common/pop_router_on_over_scroll.dart';
|
||||||
import 'package:wonders/ui/common/scaling_list_item.dart';
|
import 'package:wonders/ui/common/scaling_list_item.dart';
|
||||||
import 'package:wonders/ui/common/static_text_scale.dart';
|
import 'package:wonders/ui/common/static_text_scale.dart';
|
||||||
|
@ -6,7 +6,8 @@ class _Callout extends StatelessWidget {
|
|||||||
const _Callout({super.key, required this.text});
|
const _Callout({super.key, required this.text});
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return IntrinsicHeight(
|
return Focus(
|
||||||
|
child: IntrinsicHeight(
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
@ -20,6 +21,7 @@ class _Callout extends StatelessWidget {
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,20 +19,20 @@ class _ScrollingContent extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Widget buildText(String value) => Focus(child: Text(_fixNewlines(value), style: $styles.text.body));
|
Widget buildText(String value, bool useDropCaps) {
|
||||||
|
final bool skipCaps = !localeLogic.isEnglish || !useDropCaps;
|
||||||
Widget buildDropCapText(String value) {
|
|
||||||
final TextStyle dropStyle = $styles.text.dropCase;
|
final TextStyle dropStyle = $styles.text.dropCase;
|
||||||
final TextStyle bodyStyle = $styles.text.body;
|
final TextStyle bodyStyle = $styles.text.body;
|
||||||
final String dropChar = value.substring(0, 1);
|
final String dropChar = value.substring(0, 1);
|
||||||
final textScale = MediaQuery.of(context).textScaleFactor;
|
final textScale = MediaQuery.of(context).textScaleFactor;
|
||||||
final double dropCapWidth = StringUtils.measure(dropChar, dropStyle).width * textScale;
|
final double dropCapWidth = StringUtils.measure(dropChar, dropStyle).width * textScale;
|
||||||
final bool skipCaps = !localeLogic.isEnglish;
|
return Focus(
|
||||||
return Semantics(
|
child: Semantics(
|
||||||
label: value,
|
label: value,
|
||||||
child: ExcludeSemantics(
|
child: ExcludeSemantics(
|
||||||
child: !skipCaps
|
child: skipCaps
|
||||||
? DropCapText(
|
? Text(_fixNewlines(value), style: bodyStyle)
|
||||||
|
: DropCapText(
|
||||||
_fixNewlines(value).substring(1),
|
_fixNewlines(value).substring(1),
|
||||||
dropCap: DropCap(
|
dropCap: DropCap(
|
||||||
width: dropCapWidth,
|
width: dropCapWidth,
|
||||||
@ -56,8 +56,8 @@ class _ScrollingContent extends StatelessWidget {
|
|||||||
height: 1,
|
height: 1,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Text(value, style: bodyStyle),
|
|
||||||
),
|
),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ class _ScrollingContent extends StatelessWidget {
|
|||||||
Center(child: buildHiddenCollectible(slot: 0)),
|
Center(child: buildHiddenCollectible(slot: 0)),
|
||||||
|
|
||||||
/// History 1
|
/// History 1
|
||||||
buildDropCapText(data.historyInfo1),
|
buildText(data.historyInfo1, true),
|
||||||
|
|
||||||
/// Quote1
|
/// Quote1
|
||||||
_CollapsingPullQuoteImage(data: data, scrollPos: scrollPos),
|
_CollapsingPullQuoteImage(data: data, scrollPos: scrollPos),
|
||||||
@ -103,11 +103,11 @@ class _ScrollingContent extends StatelessWidget {
|
|||||||
_Callout(text: data.callout1),
|
_Callout(text: data.callout1),
|
||||||
|
|
||||||
/// History 2
|
/// History 2
|
||||||
buildText(data.historyInfo2),
|
buildText(data.historyInfo2, false),
|
||||||
_SectionDivider(scrollPos, sectionNotifier, index: 1),
|
_SectionDivider(scrollPos, sectionNotifier, index: 1),
|
||||||
|
|
||||||
/// Construction 1
|
/// Construction 1
|
||||||
buildDropCapText(data.constructionInfo1),
|
buildText(data.constructionInfo1, true),
|
||||||
Center(child: buildHiddenCollectible(slot: 2)),
|
Center(child: buildHiddenCollectible(slot: 2)),
|
||||||
]),
|
]),
|
||||||
Gap($styles.insets.md),
|
Gap($styles.insets.md),
|
||||||
@ -119,14 +119,14 @@ class _ScrollingContent extends StatelessWidget {
|
|||||||
_Callout(text: data.callout2),
|
_Callout(text: data.callout2),
|
||||||
|
|
||||||
/// Construction 2
|
/// Construction 2
|
||||||
buildText(data.constructionInfo2),
|
buildText(data.constructionInfo2, false),
|
||||||
_SlidingImageStack(scrollPos: scrollPos, type: data.type),
|
_SlidingImageStack(scrollPos: scrollPos, type: data.type),
|
||||||
_SectionDivider(scrollPos, sectionNotifier, index: 2),
|
_SectionDivider(scrollPos, sectionNotifier, index: 2),
|
||||||
|
|
||||||
/// Location
|
/// Location
|
||||||
buildDropCapText(data.locationInfo1),
|
buildText(data.locationInfo1, true),
|
||||||
_LargeSimpleQuote(text: data.pullQuote2, author: data.pullQuote2Author),
|
_LargeSimpleQuote(text: data.pullQuote2, author: data.pullQuote2Author),
|
||||||
buildText(data.locationInfo2),
|
buildText(data.locationInfo2, false),
|
||||||
]),
|
]),
|
||||||
Gap($styles.insets.md),
|
Gap($styles.insets.md),
|
||||||
_MapsThumbnail(data),
|
_MapsThumbnail(data),
|
||||||
@ -242,7 +242,7 @@ class _MapsThumbnailState extends State<_MapsThumbnail> {
|
|||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Positioned.fill(child: ColoredBox(color: Colors.transparent)),
|
Positioned.fill(child: ColoredBox(color: Colors.transparent)),
|
||||||
IgnorePointer(
|
IgnorePointerWithSemantics(
|
||||||
child: GoogleMap(
|
child: GoogleMap(
|
||||||
markers: {getMapsMarker(startPos.target)},
|
markers: {getMapsMarker(startPos.target)},
|
||||||
zoomControlsEnabled: false,
|
zoomControlsEnabled: false,
|
||||||
|
@ -4,6 +4,7 @@ import 'package:wonders/ui/common/app_icons.dart';
|
|||||||
import 'package:wonders/ui/common/controls/app_header.dart';
|
import 'package:wonders/ui/common/controls/app_header.dart';
|
||||||
import 'package:wonders/ui/common/controls/app_page_indicator.dart';
|
import 'package:wonders/ui/common/controls/app_page_indicator.dart';
|
||||||
import 'package:wonders/ui/common/gradient_container.dart';
|
import 'package:wonders/ui/common/gradient_container.dart';
|
||||||
|
import 'package:wonders/ui/common/ignore_pointer.dart';
|
||||||
import 'package:wonders/ui/common/previous_next_navigation.dart';
|
import 'package:wonders/ui/common/previous_next_navigation.dart';
|
||||||
import 'package:wonders/ui/common/themed_text.dart';
|
import 'package:wonders/ui/common/themed_text.dart';
|
||||||
import 'package:wonders/ui/common/utils/app_haptics.dart';
|
import 'package:wonders/ui/common/utils/app_haptics.dart';
|
||||||
@ -210,7 +211,7 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
|
|||||||
Widget _buildFgAndGradients() {
|
Widget _buildFgAndGradients() {
|
||||||
Widget buildSwipeableBgGradient(Color fgColor) {
|
Widget buildSwipeableBgGradient(Color fgColor) {
|
||||||
return _swipeController.buildListener(builder: (swipeAmt, isPointerDown, _) {
|
return _swipeController.buildListener(builder: (swipeAmt, isPointerDown, _) {
|
||||||
return IgnorePointer(
|
return IgnorePointerWithSemantics(
|
||||||
child: FractionallySizedBox(
|
child: FractionallySizedBox(
|
||||||
heightFactor: .6,
|
heightFactor: .6,
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -248,7 +249,7 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
|
|||||||
return Animate(
|
return Animate(
|
||||||
effects: const [FadeEffect()],
|
effects: const [FadeEffect()],
|
||||||
onPlay: _handleFadeAnimInit,
|
onPlay: _handleFadeAnimInit,
|
||||||
child: IgnorePointer(child: WonderIllustration(e.type, config: config)));
|
child: IgnorePointerWithSemantics(child: WonderIllustration(e.type, config: config)));
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@ -277,8 +278,7 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
|
|||||||
|
|
||||||
/// Title Content
|
/// Title Content
|
||||||
LightText(
|
LightText(
|
||||||
child: IgnorePointer(
|
child: IgnorePointerWithSemantics(
|
||||||
ignoringSemantics: false,
|
|
||||||
child: Transform.translate(
|
child: Transform.translate(
|
||||||
offset: Offset(0, 30),
|
offset: Offset(0, 30),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
@ -4,6 +4,7 @@ import 'package:wonders/logic/common/platform_info.dart';
|
|||||||
import 'package:wonders/ui/common/app_icons.dart';
|
import 'package:wonders/ui/common/app_icons.dart';
|
||||||
import 'package:wonders/ui/common/controls/app_page_indicator.dart';
|
import 'package:wonders/ui/common/controls/app_page_indicator.dart';
|
||||||
import 'package:wonders/ui/common/gradient_container.dart';
|
import 'package:wonders/ui/common/gradient_container.dart';
|
||||||
|
import 'package:wonders/ui/common/ignore_pointer.dart';
|
||||||
import 'package:wonders/ui/common/previous_next_navigation.dart';
|
import 'package:wonders/ui/common/previous_next_navigation.dart';
|
||||||
import 'package:wonders/ui/common/static_text_scale.dart';
|
import 'package:wonders/ui/common/static_text_scale.dart';
|
||||||
import 'package:wonders/ui/common/themed_text.dart';
|
import 'package:wonders/ui/common/themed_text.dart';
|
||||||
@ -112,8 +113,7 @@ class _IntroScreenState extends State<IntroScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
IgnorePointer(
|
IgnorePointerWithSemantics(
|
||||||
ignoringSemantics: false,
|
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
Spacer(),
|
Spacer(),
|
||||||
|
|
||||||
@ -325,6 +325,7 @@ class _PageImage extends StatelessWidget {
|
|||||||
SizedBox.expand(
|
SizedBox.expand(
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'${ImagePaths.common}/intro-${data.img}.jpg',
|
'${ImagePaths.common}/intro-${data.img}.jpg',
|
||||||
|
excludeFromSemantics: true,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
),
|
),
|
||||||
@ -332,6 +333,7 @@ class _PageImage extends StatelessWidget {
|
|||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'${ImagePaths.common}/intro-mask-${data.mask}.png',
|
'${ImagePaths.common}/intro-mask-${data.mask}.png',
|
||||||
|
excludeFromSemantics: true,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
@ -7,6 +7,7 @@ import 'package:wonders/ui/common/controls/app_loading_indicator.dart';
|
|||||||
import 'package:wonders/ui/common/controls/eight_way_swipe_detector.dart';
|
import 'package:wonders/ui/common/controls/eight_way_swipe_detector.dart';
|
||||||
import 'package:wonders/ui/common/fullscreen_keyboard_listener.dart';
|
import 'package:wonders/ui/common/fullscreen_keyboard_listener.dart';
|
||||||
import 'package:wonders/ui/common/hidden_collectible.dart';
|
import 'package:wonders/ui/common/hidden_collectible.dart';
|
||||||
|
import 'package:wonders/ui/common/ignore_pointer.dart';
|
||||||
import 'package:wonders/ui/common/modals/fullscreen_url_img_viewer.dart';
|
import 'package:wonders/ui/common/modals/fullscreen_url_img_viewer.dart';
|
||||||
import 'package:wonders/ui/common/unsplash_photo.dart';
|
import 'package:wonders/ui/common/unsplash_photo.dart';
|
||||||
import 'package:wonders/ui/common/utils/app_haptics.dart';
|
import 'package:wonders/ui/common/utils/app_haptics.dart';
|
||||||
|
@ -31,7 +31,7 @@ class _AnimatedCutoutOverlay extends StatelessWidget {
|
|||||||
effects: [CustomEffect(builder: _buildAnimatedCutout, curve: Curves.easeOut, duration: duration)],
|
effects: [CustomEffect(builder: _buildAnimatedCutout, curve: Curves.easeOut, duration: duration)],
|
||||||
key: animationKey,
|
key: animationKey,
|
||||||
onComplete: (c) => c.reverse(),
|
onComplete: (c) => c.reverse(),
|
||||||
child: IgnorePointer(child: Container(color: Colors.black.withOpacity(opacity))),
|
child: IgnorePointerWithSemantics(child: Container(color: Colors.black.withOpacity(opacity))),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
@ -11,6 +11,7 @@ import 'package:wonders/ui/common/blend_mask.dart';
|
|||||||
import 'package:wonders/ui/common/centered_box.dart';
|
import 'package:wonders/ui/common/centered_box.dart';
|
||||||
import 'package:wonders/ui/common/controls/app_header.dart';
|
import 'package:wonders/ui/common/controls/app_header.dart';
|
||||||
import 'package:wonders/ui/common/dashed_line.dart';
|
import 'package:wonders/ui/common/dashed_line.dart';
|
||||||
|
import 'package:wonders/ui/common/ignore_pointer.dart';
|
||||||
import 'package:wonders/ui/common/list_gradient.dart';
|
import 'package:wonders/ui/common/list_gradient.dart';
|
||||||
import 'package:wonders/ui/common/timeline_event_card.dart';
|
import 'package:wonders/ui/common/timeline_event_card.dart';
|
||||||
import 'package:wonders/ui/common/utils/app_haptics.dart';
|
import 'package:wonders/ui/common/utils/app_haptics.dart';
|
||||||
|
@ -54,8 +54,7 @@ class _EventMarkersState extends State<_EventMarkers> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return IgnorePointer(
|
return IgnorePointerWithSemantics(
|
||||||
ignoringSemantics: false,
|
|
||||||
child: LayoutBuilder(builder: (_, constraints) {
|
child: LayoutBuilder(builder: (_, constraints) {
|
||||||
/// Figure out which event is "selected"
|
/// Figure out which event is "selected"
|
||||||
_updateSelectedEvent(constraints.maxHeight);
|
_updateSelectedEvent(constraints.maxHeight);
|
||||||
|
@ -35,8 +35,7 @@ class _EventPopupsState extends State<_EventPopups> {
|
|||||||
final evt = _eventToShow;
|
final evt = _eventToShow;
|
||||||
return TopCenter(
|
return TopCenter(
|
||||||
child: ClipRect(
|
child: ClipRect(
|
||||||
child: IgnorePointer(
|
child: IgnorePointerWithSemantics(
|
||||||
ignoringSemantics: false,
|
|
||||||
child: AnimatedSwitcher(
|
child: AnimatedSwitcher(
|
||||||
duration: $styles.times.fast,
|
duration: $styles.times.fast,
|
||||||
child: evt == null
|
child: evt == null
|
||||||
|
@ -69,8 +69,7 @@ class _ScalingViewportState extends State<_ScrollingViewport> {
|
|||||||
_buildScrollingArea(context).animate().fadeIn(),
|
_buildScrollingArea(context).animate().fadeIn(),
|
||||||
|
|
||||||
// Dashed line with a year that changes as we scroll
|
// Dashed line with a year that changes as we scroll
|
||||||
IgnorePointer(
|
IgnorePointerWithSemantics(
|
||||||
ignoringSemantics: false,
|
|
||||||
child: AnimatedBuilder(
|
child: AnimatedBuilder(
|
||||||
animation: controller.scroller,
|
animation: controller.scroller,
|
||||||
builder: (_, __) {
|
builder: (_, __) {
|
||||||
|
@ -20,8 +20,7 @@ class TimelineSection extends StatelessWidget {
|
|||||||
StringUtils.formatYr(data.startYr),
|
StringUtils.formatYr(data.startYr),
|
||||||
StringUtils.formatYr(data.endYr),
|
StringUtils.formatYr(data.endYr),
|
||||||
)}',
|
)}',
|
||||||
child: IgnorePointer(
|
child: IgnorePointerWithSemantics(
|
||||||
ignoringSemantics: false,
|
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment(0, -1 + fraction * 2),
|
alignment: Alignment(0, -1 + fraction * 2),
|
||||||
padding: EdgeInsets.all($styles.insets.xs),
|
padding: EdgeInsets.all($styles.insets.xs),
|
||||||
|
@ -13,8 +13,7 @@ class _YearMarkers extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return IgnorePointer(
|
return IgnorePointerWithSemantics(
|
||||||
ignoringSemantics: false,
|
|
||||||
child: LayoutBuilder(builder: (_, constraints) {
|
child: LayoutBuilder(builder: (_, constraints) {
|
||||||
int interval = 100;
|
int interval = 100;
|
||||||
if (constraints.maxHeight < 800) {
|
if (constraints.maxHeight < 800) {
|
||||||
|
@ -64,7 +64,7 @@ class _EventsListState extends State<_EventsList> {
|
|||||||
key: PageStorageKey('eventsList'),
|
key: PageStorageKey('eventsList'),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
IgnorePointer(child: Gap(widget.topHeight)),
|
IgnorePointerWithSemantics(child: Gap(widget.topHeight)),
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: $styles.colors.black,
|
color: $styles.colors.black,
|
||||||
@ -120,7 +120,7 @@ class _EventsListState extends State<_EventsList> {
|
|||||||
if (showBackdrop) ...[
|
if (showBackdrop) ...[
|
||||||
AppBackdrop(
|
AppBackdrop(
|
||||||
strength: backdropAmt,
|
strength: backdropAmt,
|
||||||
child: IgnorePointer(
|
child: IgnorePointerWithSemantics(
|
||||||
child: Container(
|
child: Container(
|
||||||
color: $styles.colors.black.withOpacity(backdropAmt * .6),
|
color: $styles.colors.black.withOpacity(backdropAmt * .6),
|
||||||
),
|
),
|
||||||
|
@ -73,6 +73,7 @@ class _WonderImageWithTimeline extends StatelessWidget {
|
|||||||
clipper: CurvedTopClipper(),
|
clipper: CurvedTopClipper(),
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
data.type.flattened,
|
data.type.flattened,
|
||||||
|
excludeFromSemantics: true,
|
||||||
width: 200,
|
width: 200,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
alignment: Alignment(0, -.5),
|
alignment: Alignment(0, -.5),
|
||||||
|
@ -8,6 +8,7 @@ import 'package:wonders/ui/common/centered_box.dart';
|
|||||||
import 'package:wonders/ui/common/controls/app_header.dart';
|
import 'package:wonders/ui/common/controls/app_header.dart';
|
||||||
import 'package:wonders/ui/common/curved_clippers.dart';
|
import 'package:wonders/ui/common/curved_clippers.dart';
|
||||||
import 'package:wonders/ui/common/hidden_collectible.dart';
|
import 'package:wonders/ui/common/hidden_collectible.dart';
|
||||||
|
import 'package:wonders/ui/common/ignore_pointer.dart';
|
||||||
import 'package:wonders/ui/common/list_gradient.dart';
|
import 'package:wonders/ui/common/list_gradient.dart';
|
||||||
import 'package:wonders/ui/common/themed_text.dart';
|
import 'package:wonders/ui/common/themed_text.dart';
|
||||||
import 'package:wonders/ui/common/timeline_event_card.dart';
|
import 'package:wonders/ui/common/timeline_event_card.dart';
|
||||||
|
@ -138,6 +138,7 @@ class _Cloud extends StatelessWidget {
|
|||||||
scaleY: scale * (flipY ? -1 : 1),
|
scaleY: scale * (flipY ? -1 : 1),
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
ImagePaths.cloud,
|
ImagePaths.cloud,
|
||||||
|
excludeFromSemantics: true,
|
||||||
opacity: AlwaysStoppedAnimation(.4 * opacity),
|
opacity: AlwaysStoppedAnimation(.4 * opacity),
|
||||||
width: size * scale,
|
width: size * scale,
|
||||||
fit: BoxFit.fitWidth,
|
fit: BoxFit.fitWidth,
|
||||||
|
@ -86,7 +86,12 @@ class _IllustrationPieceState extends State<IllustrationPiece> {
|
|||||||
final anim = wonderBuilder.anim;
|
final anim = wonderBuilder.anim;
|
||||||
final curvedAnim = Curves.easeOut.transform(anim.value);
|
final curvedAnim = Curves.easeOut.transform(anim.value);
|
||||||
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,
|
||||||
|
excludeFromSemantics: true,
|
||||||
|
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: 2500, child: img);
|
img = OverflowBox(maxWidth: 2500, child: img);
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ class IllustrationTexture extends StatelessWidget {
|
|||||||
scaleX: scale * (flipX ? -1 : 1),
|
scaleX: scale * (flipX ? -1 : 1),
|
||||||
scaleY: scale * (flipY ? -1 : 1),
|
scaleY: scale * (flipY ? -1 : 1),
|
||||||
child: Image.asset(path,
|
child: Image.asset(path,
|
||||||
|
excludeFromSemantics: true,
|
||||||
repeat: ImageRepeat.repeat,
|
repeat: ImageRepeat.repeat,
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
alignment: Alignment.topCenter,
|
alignment: Alignment.topCenter,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- app info -->
|
<!-- app info -->
|
||||||
<title>Wonderous</title>
|
<title>Wonderous</title>
|
||||||
|
Reference in New Issue
Block a user