mirror of
https://github.com/gskinnerTeam/flutter-wonderous-app.git
synced 2025-05-17 12:56:01 +08:00
Merge branch 'accessability-pass' into accessibility-pass-semanticslabels
This commit is contained in:
@ -32,8 +32,8 @@
|
||||
"appModalsButtonOk": "Ok",
|
||||
"appModalsButtonCancel": "Cancel",
|
||||
"appPageDefaultTitlePage": "page",
|
||||
"appPageSemanticSwipe": "{pageTitle} {count} of {total}.",
|
||||
"@appPageSemanticSwipe": {"placeholders": {"pageTitle": {}, "total": {}, "count": {}}},
|
||||
"appPageSemanticSwipe": "{pageTitle} {current} of {total}.",
|
||||
"@appPageSemanticSwipe": {"placeholders": {"pageTitle": {}, "current": {}, "total": {}}},
|
||||
"artifactsTitleArtifacts": "ARTIFACTS",
|
||||
"semanticsPrevious": "Previous {title}",
|
||||
"@semanticsPrevious": {"placeholders": {"title": {}}},
|
||||
|
@ -25,7 +25,7 @@
|
||||
"appModalsButtonOk": "确定",
|
||||
"appModalsButtonCancel": "取消",
|
||||
"appPageDefaultTitlePage": "页",
|
||||
"appPageSemanticSwipe": "{pageTitle} {total} 之 {count}.",
|
||||
"appPageSemanticSwipe": "{pageTitle} {total} 之 {current}.",
|
||||
"artifactsTitleArtifacts": "文物",
|
||||
"semanticsPrevious": "之前的文物{title}",
|
||||
"semanticsNext": "下一个文物{title}",
|
||||
|
@ -1,5 +1,6 @@
|
||||
import 'package:wonders/common_libs.dart';
|
||||
import 'package:wonders/ui/common/app_icons.dart';
|
||||
import 'package:wonders/ui/common/ignore_pointer.dart';
|
||||
|
||||
/// Shared methods across button types
|
||||
Widget _buildIcon(BuildContext context, AppIcons icon, {required bool isSecondary, required double? size}) =>
|
||||
@ -154,7 +155,7 @@ class AppBtn extends StatelessWidget {
|
||||
),
|
||||
if (focus.hasFocus)
|
||||
Positioned.fill(
|
||||
child: IgnorePointer(
|
||||
child: IgnorePointerWithSemantics(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular($styles.corners.md),
|
||||
|
@ -1,4 +1,5 @@
|
||||
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.
|
||||
class ScrollDecorator extends StatefulWidget {
|
||||
@ -64,7 +65,7 @@ class ScrollDecorator extends StatefulWidget {
|
||||
bgBuilder = null;
|
||||
fgBuilder = (controller) {
|
||||
final double ratio = controller.hasClients ? min(1, controller.position.extentBefore / 60) : 0;
|
||||
return IgnorePointer(
|
||||
return IgnorePointerWithSemantics(
|
||||
child: Container(
|
||||
height: 24,
|
||||
decoration: BoxDecoration(
|
||||
|
@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wonders/ui/common/ignore_pointer.dart';
|
||||
|
||||
class GradientContainer extends StatelessWidget {
|
||||
const GradientContainer(this.colors, this.stops,
|
||||
@ -23,24 +24,26 @@ class GradientContainer extends StatelessWidget {
|
||||
final BorderRadius? borderRadius;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => IgnorePointer(
|
||||
child: Container(
|
||||
width: width,
|
||||
height: height,
|
||||
alignment: alignment,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: begin ?? Alignment.centerLeft,
|
||||
end: end ?? Alignment.centerRight,
|
||||
colors: colors,
|
||||
stops: stops,
|
||||
),
|
||||
backgroundBlendMode: blendMode,
|
||||
borderRadius: borderRadius,
|
||||
Widget build(BuildContext context) => ExcludeSemantics(
|
||||
child: IgnorePointerWithSemantics(
|
||||
child: Container(
|
||||
width: width,
|
||||
height: height,
|
||||
alignment: alignment,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: begin ?? Alignment.centerLeft,
|
||||
end: end ?? Alignment.centerRight,
|
||||
colors: colors,
|
||||
stops: stops,
|
||||
),
|
||||
child: child,
|
||||
backgroundBlendMode: blendMode,
|
||||
borderRadius: borderRadius,
|
||||
),
|
||||
);
|
||||
child: child,
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
class HzGradient extends GradientContainer {
|
||||
|
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(
|
||||
icon: AppIcons.prev,
|
||||
onPressed: page == 0 ? null : () => _animateToPage(page - 1),
|
||||
semanticLabel: $strings.semanticsNext(''),
|
||||
semanticLabel: $strings.semanticsPrevious(''),
|
||||
),
|
||||
Gap($styles.insets.xs),
|
||||
CircleIconBtn(
|
||||
|
@ -9,6 +9,7 @@ class WonderousLogo extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) => Image.asset(
|
||||
ImagePaths.appLogoPlain,
|
||||
excludeFromSemantics: true,
|
||||
fit: BoxFit.cover,
|
||||
width: width,
|
||||
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/controls/app_header.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';
|
||||
|
||||
part 'widgets/_blurred_image_bg.dart';
|
||||
|
@ -26,8 +26,7 @@ class _BottomTextContent extends StatelessWidget {
|
||||
Gap($styles.insets.md),
|
||||
Column(
|
||||
children: [
|
||||
IgnorePointer(
|
||||
ignoringSemantics: false,
|
||||
IgnorePointerWithSemantics(
|
||||
child: Semantics(
|
||||
button: true,
|
||||
onIncrease: () => state._handleArtifactTap(_currentPage + 1),
|
||||
|
@ -9,59 +9,61 @@ class _InfoColumn extends StatelessWidget {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: $styles.insets.lg),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Gap($styles.insets.xl),
|
||||
if (data.culture.isNotEmpty) ...[
|
||||
Text(
|
||||
data.culture.toUpperCase(),
|
||||
style: $styles.text.titleFont.copyWith(color: $styles.colors.accent1),
|
||||
).animate().fade(delay: 150.ms, duration: 600.ms),
|
||||
Gap($styles.insets.xs),
|
||||
],
|
||||
Semantics(
|
||||
header: true,
|
||||
child: Text(
|
||||
data.title,
|
||||
textAlign: TextAlign.center,
|
||||
style: $styles.text.h2.copyWith(color: $styles.colors.offWhite, height: 1.2),
|
||||
maxLines: 5,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
).animate().fade(delay: 250.ms, duration: 600.ms),
|
||||
),
|
||||
Gap($styles.insets.lg),
|
||||
Animate().toggle(
|
||||
delay: 500.ms,
|
||||
builder: (_, value, __) {
|
||||
return CompassDivider(isExpanded: !value, duration: $styles.times.med);
|
||||
}),
|
||||
Gap($styles.insets.lg),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
...[
|
||||
_InfoRow($strings.artifactDetailsLabelDate, data.date),
|
||||
_InfoRow($strings.artifactDetailsLabelPeriod, data.period),
|
||||
_InfoRow($strings.artifactDetailsLabelGeography, data.country),
|
||||
_InfoRow($strings.artifactDetailsLabelMedium, data.medium),
|
||||
_InfoRow($strings.artifactDetailsLabelDimension, data.dimension),
|
||||
_InfoRow($strings.artifactDetailsLabelClassification, data.classification),
|
||||
]
|
||||
.animate(interval: 100.ms)
|
||||
.fadeIn(delay: 600.ms, duration: $styles.times.med)
|
||||
.slide(begin: Offset(0.2, 0), curve: Curves.easeOut),
|
||||
child: Focus(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Gap($styles.insets.xl),
|
||||
if (data.culture.isNotEmpty) ...[
|
||||
Text(
|
||||
data.culture.toUpperCase(),
|
||||
style: $styles.text.titleFont.copyWith(color: $styles.colors.accent1),
|
||||
).animate().fade(delay: 150.ms, duration: 600.ms),
|
||||
Gap($styles.insets.xs),
|
||||
],
|
||||
),
|
||||
Gap($styles.insets.md),
|
||||
Text(
|
||||
$strings.homeMenuAboutMet,
|
||||
style: $styles.text.caption.copyWith(color: $styles.colors.accent2),
|
||||
).animate(delay: 1.5.seconds).fadeIn().slide(begin: Offset(0.2, 0), curve: Curves.easeOut),
|
||||
Gap($styles.insets.offset),
|
||||
],
|
||||
Semantics(
|
||||
header: true,
|
||||
child: Text(
|
||||
data.title,
|
||||
textAlign: TextAlign.center,
|
||||
style: $styles.text.h2.copyWith(color: $styles.colors.offWhite, height: 1.2),
|
||||
maxLines: 5,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
).animate().fade(delay: 250.ms, duration: 600.ms),
|
||||
),
|
||||
Gap($styles.insets.lg),
|
||||
Animate().toggle(
|
||||
delay: 500.ms,
|
||||
builder: (_, value, __) {
|
||||
return CompassDivider(isExpanded: !value, duration: $styles.times.med);
|
||||
}),
|
||||
Gap($styles.insets.lg),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
...[
|
||||
_InfoRow($strings.artifactDetailsLabelDate, data.date),
|
||||
_InfoRow($strings.artifactDetailsLabelPeriod, data.period),
|
||||
_InfoRow($strings.artifactDetailsLabelGeography, data.country),
|
||||
_InfoRow($strings.artifactDetailsLabelMedium, data.medium),
|
||||
_InfoRow($strings.artifactDetailsLabelDimension, data.dimension),
|
||||
_InfoRow($strings.artifactDetailsLabelClassification, data.classification),
|
||||
]
|
||||
.animate(interval: 100.ms)
|
||||
.fadeIn(delay: 600.ms, duration: $styles.times.med)
|
||||
.slide(begin: Offset(0.2, 0), curve: Curves.easeOut),
|
||||
],
|
||||
),
|
||||
Gap($styles.insets.md),
|
||||
Text(
|
||||
$strings.homeMenuAboutMet,
|
||||
style: $styles.text.caption.copyWith(color: $styles.colors.accent2),
|
||||
).animate(delay: 1.5.seconds).fadeIn().slide(begin: Offset(0.2, 0), curve: Curves.easeOut),
|
||||
Gap($styles.insets.offset),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
part of '../artifact_search_screen.dart';
|
||||
|
||||
/// Autopopulating textfield used for searching for Artifacts by name.
|
||||
const double _inputWidth = 400;
|
||||
class _SearchInput extends StatelessWidget {
|
||||
const _SearchInput({super.key, required this.onSubmit, required this.wonder});
|
||||
final void Function(String) onSubmit;
|
||||
@ -49,6 +50,7 @@ class _SearchInput extends StatelessWidget {
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: $styles.insets.xxs),
|
||||
width: constraints.maxWidth,
|
||||
constraints: BoxConstraints(maxWidth: _inputWidth),
|
||||
decoration: BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
@ -120,6 +122,7 @@ class _SearchInput extends StatelessWidget {
|
||||
Widget _buildInput(BuildContext context, TextEditingController textController, FocusNode focusNode, _) {
|
||||
Color captionColor = $styles.colors.caption;
|
||||
return Container(
|
||||
constraints: BoxConstraints(maxWidth: _inputWidth),
|
||||
height: $styles.insets.xl,
|
||||
decoration: BoxDecoration(
|
||||
color: $styles.colors.offWhite,
|
||||
@ -134,7 +137,7 @@ class _SearchInput extends StatelessWidget {
|
||||
onSubmitted: onSubmit,
|
||||
controller: textController,
|
||||
focusNode: focusNode,
|
||||
style: TextStyle(color: captionColor),
|
||||
style: TextStyle(color: captionColor, ),
|
||||
textAlignVertical: TextAlignVertical.top,
|
||||
decoration: InputDecoration(
|
||||
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/gradient_container.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/scaling_list_item.dart';
|
||||
import 'package:wonders/ui/common/static_text_scale.dart';
|
||||
|
@ -6,20 +6,22 @@ class _Callout extends StatelessWidget {
|
||||
const _Callout({super.key, required this.text});
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return IntrinsicHeight(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Container(color: $styles.colors.accent1, width: 1),
|
||||
Gap($styles.insets.sm),
|
||||
Expanded(
|
||||
child: Text(
|
||||
text,
|
||||
style: $styles.text.callout,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
return Focus(
|
||||
child: IntrinsicHeight(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Container(color: $styles.colors.accent1, width: 1),
|
||||
Gap($styles.insets.sm),
|
||||
Expanded(
|
||||
child: Text(
|
||||
text,
|
||||
style: $styles.text.callout,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -19,45 +19,45 @@ class _ScrollingContent extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget buildText(String value) => Focus(child: Text(_fixNewlines(value), style: $styles.text.body));
|
||||
|
||||
Widget buildDropCapText(String value) {
|
||||
Widget buildText(String value, bool useDropCaps) {
|
||||
final bool skipCaps = !localeLogic.isEnglish || !useDropCaps;
|
||||
final TextStyle dropStyle = $styles.text.dropCase;
|
||||
final TextStyle bodyStyle = $styles.text.body;
|
||||
final String dropChar = value.substring(0, 1);
|
||||
final textScale = MediaQuery.of(context).textScaleFactor;
|
||||
final double dropCapWidth = StringUtils.measure(dropChar, dropStyle).width * textScale;
|
||||
final bool skipCaps = !localeLogic.isEnglish;
|
||||
return Semantics(
|
||||
label: value,
|
||||
child: ExcludeSemantics(
|
||||
child: !skipCaps
|
||||
? DropCapText(
|
||||
_fixNewlines(value).substring(1),
|
||||
dropCap: DropCap(
|
||||
width: dropCapWidth,
|
||||
height: $styles.text.body.fontSize! * $styles.text.body.height! * 2,
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, bodyStyle.fontSize! * (bodyStyle.height! - 1) - 2),
|
||||
child: Text(
|
||||
dropChar,
|
||||
overflow: TextOverflow.visible,
|
||||
style: $styles.text.dropCase.copyWith(
|
||||
color: $styles.colors.accent1,
|
||||
height: 1,
|
||||
return Focus(
|
||||
child: Semantics(
|
||||
label: value,
|
||||
child: ExcludeSemantics(
|
||||
child: skipCaps
|
||||
? Text(_fixNewlines(value), style: bodyStyle)
|
||||
: DropCapText(
|
||||
_fixNewlines(value).substring(1),
|
||||
dropCap: DropCap(
|
||||
width: dropCapWidth,
|
||||
height: $styles.text.body.fontSize! * $styles.text.body.height! * 2,
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, bodyStyle.fontSize! * (bodyStyle.height! - 1) - 2),
|
||||
child: Text(
|
||||
dropChar,
|
||||
overflow: TextOverflow.visible,
|
||||
style: $styles.text.dropCase.copyWith(
|
||||
color: $styles.colors.accent1,
|
||||
height: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
style: $styles.text.body,
|
||||
dropCapPadding: EdgeInsets.only(right: 6),
|
||||
dropCapStyle: $styles.text.dropCase.copyWith(
|
||||
color: $styles.colors.accent1,
|
||||
height: 1,
|
||||
),
|
||||
)
|
||||
: Text(value, style: bodyStyle),
|
||||
),
|
||||
style: $styles.text.body,
|
||||
dropCapPadding: EdgeInsets.only(right: 6),
|
||||
dropCapStyle: $styles.text.dropCase.copyWith(
|
||||
color: $styles.colors.accent1,
|
||||
height: 1,
|
||||
),
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ class _ScrollingContent extends StatelessWidget {
|
||||
Center(child: buildHiddenCollectible(slot: 0)),
|
||||
|
||||
/// History 1
|
||||
buildDropCapText(data.historyInfo1),
|
||||
buildText(data.historyInfo1, true),
|
||||
|
||||
/// Quote1
|
||||
_CollapsingPullQuoteImage(data: data, scrollPos: scrollPos),
|
||||
@ -103,11 +103,11 @@ class _ScrollingContent extends StatelessWidget {
|
||||
_Callout(text: data.callout1),
|
||||
|
||||
/// History 2
|
||||
buildText(data.historyInfo2),
|
||||
buildText(data.historyInfo2, false),
|
||||
_SectionDivider(scrollPos, sectionNotifier, index: 1),
|
||||
|
||||
/// Construction 1
|
||||
buildDropCapText(data.constructionInfo1),
|
||||
buildText(data.constructionInfo1, true),
|
||||
Center(child: buildHiddenCollectible(slot: 2)),
|
||||
]),
|
||||
Gap($styles.insets.md),
|
||||
@ -119,14 +119,14 @@ class _ScrollingContent extends StatelessWidget {
|
||||
_Callout(text: data.callout2),
|
||||
|
||||
/// Construction 2
|
||||
buildText(data.constructionInfo2),
|
||||
buildText(data.constructionInfo2, false),
|
||||
_SlidingImageStack(scrollPos: scrollPos, type: data.type),
|
||||
_SectionDivider(scrollPos, sectionNotifier, index: 2),
|
||||
|
||||
/// Location
|
||||
buildDropCapText(data.locationInfo1),
|
||||
buildText(data.locationInfo1, true),
|
||||
_LargeSimpleQuote(text: data.pullQuote2, author: data.pullQuote2Author),
|
||||
buildText(data.locationInfo2),
|
||||
buildText(data.locationInfo2, false),
|
||||
]),
|
||||
Gap($styles.insets.md),
|
||||
_MapsThumbnail(data),
|
||||
@ -242,7 +242,7 @@ class _MapsThumbnailState extends State<_MapsThumbnail> {
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned.fill(child: ColoredBox(color: Colors.transparent)),
|
||||
IgnorePointer(
|
||||
IgnorePointerWithSemantics(
|
||||
child: GoogleMap(
|
||||
markers: {getMapsMarker(startPos.target)},
|
||||
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_page_indicator.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/themed_text.dart';
|
||||
import 'package:wonders/ui/common/utils/app_haptics.dart';
|
||||
@ -210,7 +211,7 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
|
||||
Widget _buildFgAndGradients() {
|
||||
Widget buildSwipeableBgGradient(Color fgColor) {
|
||||
return _swipeController.buildListener(builder: (swipeAmt, isPointerDown, _) {
|
||||
return IgnorePointer(
|
||||
return IgnorePointerWithSemantics(
|
||||
child: FractionallySizedBox(
|
||||
heightFactor: .6,
|
||||
child: Container(
|
||||
@ -248,7 +249,7 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
|
||||
return Animate(
|
||||
effects: const [FadeEffect()],
|
||||
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
|
||||
LightText(
|
||||
child: IgnorePointer(
|
||||
ignoringSemantics: false,
|
||||
child: IgnorePointerWithSemantics(
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, 30),
|
||||
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/controls/app_page_indicator.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/static_text_scale.dart';
|
||||
import 'package:wonders/ui/common/themed_text.dart';
|
||||
@ -112,8 +113,7 @@ class _IntroScreenState extends State<IntroScreen> {
|
||||
),
|
||||
),
|
||||
|
||||
IgnorePointer(
|
||||
ignoringSemantics: false,
|
||||
IgnorePointerWithSemantics(
|
||||
child: Column(children: [
|
||||
Spacer(),
|
||||
|
||||
@ -325,6 +325,7 @@ class _PageImage extends StatelessWidget {
|
||||
SizedBox.expand(
|
||||
child: Image.asset(
|
||||
'${ImagePaths.common}/intro-${data.img}.jpg',
|
||||
excludeFromSemantics: true,
|
||||
fit: BoxFit.cover,
|
||||
alignment: Alignment.centerRight,
|
||||
),
|
||||
@ -332,6 +333,7 @@ class _PageImage extends StatelessWidget {
|
||||
Positioned.fill(
|
||||
child: Image.asset(
|
||||
'${ImagePaths.common}/intro-mask-${data.mask}.png',
|
||||
excludeFromSemantics: true,
|
||||
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/fullscreen_keyboard_listener.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/unsplash_photo.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)],
|
||||
key: animationKey,
|
||||
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/controls/app_header.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/timeline_event_card.dart';
|
||||
import 'package:wonders/ui/common/utils/app_haptics.dart';
|
||||
|
@ -54,8 +54,7 @@ class _EventMarkersState extends State<_EventMarkers> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return IgnorePointer(
|
||||
ignoringSemantics: false,
|
||||
return IgnorePointerWithSemantics(
|
||||
child: LayoutBuilder(builder: (_, constraints) {
|
||||
/// Figure out which event is "selected"
|
||||
_updateSelectedEvent(constraints.maxHeight);
|
||||
|
@ -35,8 +35,7 @@ class _EventPopupsState extends State<_EventPopups> {
|
||||
final evt = _eventToShow;
|
||||
return TopCenter(
|
||||
child: ClipRect(
|
||||
child: IgnorePointer(
|
||||
ignoringSemantics: false,
|
||||
child: IgnorePointerWithSemantics(
|
||||
child: AnimatedSwitcher(
|
||||
duration: $styles.times.fast,
|
||||
child: evt == null
|
||||
|
@ -69,8 +69,7 @@ class _ScalingViewportState extends State<_ScrollingViewport> {
|
||||
_buildScrollingArea(context).animate().fadeIn(),
|
||||
|
||||
// Dashed line with a year that changes as we scroll
|
||||
IgnorePointer(
|
||||
ignoringSemantics: false,
|
||||
IgnorePointerWithSemantics(
|
||||
child: AnimatedBuilder(
|
||||
animation: controller.scroller,
|
||||
builder: (_, __) {
|
||||
|
@ -20,8 +20,7 @@ class TimelineSection extends StatelessWidget {
|
||||
StringUtils.formatYr(data.startYr),
|
||||
StringUtils.formatYr(data.endYr),
|
||||
)}',
|
||||
child: IgnorePointer(
|
||||
ignoringSemantics: false,
|
||||
child: IgnorePointerWithSemantics(
|
||||
child: Container(
|
||||
alignment: Alignment(0, -1 + fraction * 2),
|
||||
padding: EdgeInsets.all($styles.insets.xs),
|
||||
|
@ -13,8 +13,7 @@ class _YearMarkers extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return IgnorePointer(
|
||||
ignoringSemantics: false,
|
||||
return IgnorePointerWithSemantics(
|
||||
child: LayoutBuilder(builder: (_, constraints) {
|
||||
int interval = 100;
|
||||
if (constraints.maxHeight < 800) {
|
||||
|
@ -64,7 +64,7 @@ class _EventsListState extends State<_EventsList> {
|
||||
key: PageStorageKey('eventsList'),
|
||||
child: Column(
|
||||
children: [
|
||||
IgnorePointer(child: Gap(widget.topHeight)),
|
||||
IgnorePointerWithSemantics(child: Gap(widget.topHeight)),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: $styles.colors.black,
|
||||
@ -120,7 +120,7 @@ class _EventsListState extends State<_EventsList> {
|
||||
if (showBackdrop) ...[
|
||||
AppBackdrop(
|
||||
strength: backdropAmt,
|
||||
child: IgnorePointer(
|
||||
child: IgnorePointerWithSemantics(
|
||||
child: Container(
|
||||
color: $styles.colors.black.withOpacity(backdropAmt * .6),
|
||||
),
|
||||
|
@ -73,6 +73,7 @@ class _WonderImageWithTimeline extends StatelessWidget {
|
||||
clipper: CurvedTopClipper(),
|
||||
child: Image.asset(
|
||||
data.type.flattened,
|
||||
excludeFromSemantics: true,
|
||||
width: 200,
|
||||
fit: BoxFit.cover,
|
||||
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/curved_clippers.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/themed_text.dart';
|
||||
import 'package:wonders/ui/common/timeline_event_card.dart';
|
||||
|
@ -138,6 +138,7 @@ class _Cloud extends StatelessWidget {
|
||||
scaleY: scale * (flipY ? -1 : 1),
|
||||
child: Image.asset(
|
||||
ImagePaths.cloud,
|
||||
excludeFromSemantics: true,
|
||||
opacity: AlwaysStoppedAnimation(.4 * opacity),
|
||||
width: size * scale,
|
||||
fit: BoxFit.fitWidth,
|
||||
|
@ -86,7 +86,12 @@ class _IllustrationPieceState extends State<IllustrationPiece> {
|
||||
final anim = wonderBuilder.anim;
|
||||
final curvedAnim = Curves.easeOut.transform(anim.value);
|
||||
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
|
||||
img = OverflowBox(maxWidth: 2500, child: img);
|
||||
|
||||
|
@ -18,6 +18,7 @@ class IllustrationTexture extends StatelessWidget {
|
||||
scaleX: scale * (flipX ? -1 : 1),
|
||||
scaleY: scale * (flipY ? -1 : 1),
|
||||
child: Image.asset(path,
|
||||
excludeFromSemantics: true,
|
||||
repeat: ImageRepeat.repeat,
|
||||
fit: BoxFit.contain,
|
||||
alignment: Alignment.topCenter,
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- app info -->
|
||||
<title>Wonderous</title>
|
||||
|
Reference in New Issue
Block a user