mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
Accessibility fixes (#1128)
This commit is contained in:
parent
2a3b5644d7
commit
8889f09509
5 changed files with 163 additions and 147 deletions
|
@ -99,6 +99,8 @@ class AddressPage extends BasePage {
|
|||
Widget? trailing(BuildContext context) {
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
child: Semantics(
|
||||
label: S.of(context).share,
|
||||
child: IconButton(
|
||||
padding: EdgeInsets.zero,
|
||||
constraints: BoxConstraints(),
|
||||
|
@ -113,6 +115,7 @@ class AddressPage extends BasePage {
|
|||
},
|
||||
icon: Icon(Icons.share, size: 20, color: pageIconColor(context)),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,22 +31,30 @@ class HeaderRow extends StatelessWidget {
|
|||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor),
|
||||
),
|
||||
GestureDetector(
|
||||
Semantics(
|
||||
container: true,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
showPopUp<void>(
|
||||
context: context,
|
||||
builder: (context) =>
|
||||
FilterWidget(dashboardViewModel: dashboardViewModel)
|
||||
builder: (context) => FilterWidget(dashboardViewModel: dashboardViewModel),
|
||||
);
|
||||
},
|
||||
child: Semantics(
|
||||
label: 'Transaction Filter',
|
||||
button: true,
|
||||
enabled: true,
|
||||
child: Container(
|
||||
height: 36,
|
||||
width: 36,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Theme.of(context).extension<FilterTheme>()!.buttonColor),
|
||||
color: Theme.of(context).extension<FilterTheme>()!.buttonColor,
|
||||
),
|
||||
child: filterIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'package:cake_wallet/src/widgets/alert_close_button.dart';
|
||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||
import 'package:cake_wallet/palette.dart';
|
||||
import 'package:cake_wallet/src/screens/ionia/widgets/rounded_checkbox.dart';
|
||||
import 'package:cake_wallet/src/widgets/alert_background.dart';
|
||||
import 'package:cake_wallet/typography.dart';
|
||||
|
@ -71,7 +71,9 @@ class PresentReceiveOptionPicker extends StatelessWidget {
|
|||
builder: (BuildContext popUpContext) => Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
body: AlertBackground(
|
||||
body: Stack(
|
||||
alignment: AlignmentDirectional.center,
|
||||
children:[ AlertBackground(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
@ -126,23 +128,13 @@ class PresentReceiveOptionPicker extends StatelessWidget {
|
|||
)),
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Container(
|
||||
margin: EdgeInsets.only(bottom: 40),
|
||||
child: InkWell(
|
||||
onTap: () => Navigator.pop(popUpContext),
|
||||
child: CircleAvatar(
|
||||
child: Icon(
|
||||
Icons.close,
|
||||
color: Palette.darkBlueCraiola,
|
||||
),
|
||||
backgroundColor: Colors.white,
|
||||
),
|
||||
),
|
||||
)
|
||||
Spacer()
|
||||
],
|
||||
),
|
||||
),
|
||||
AlertCloseButton(onTap: () => Navigator.of(popUpContext).pop(), bottom: 40)
|
||||
],
|
||||
),
|
||||
),
|
||||
context: context,
|
||||
);
|
||||
|
|
|
@ -416,6 +416,8 @@ class ExchangeCardState extends State<ExchangeCard> {
|
|||
width: 34,
|
||||
height: 34,
|
||||
padding: EdgeInsets.only(top: 0),
|
||||
child: Semantics(
|
||||
label: S.of(context).address_book,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
final contact =
|
||||
|
@ -447,6 +449,7 @@ class ExchangeCardState extends State<ExchangeCard> {
|
|||
'assets/images/open_book.png',
|
||||
color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonIconColor,
|
||||
)),
|
||||
),
|
||||
)),
|
||||
),
|
||||
Padding(
|
||||
|
@ -455,6 +458,8 @@ class ExchangeCardState extends State<ExchangeCard> {
|
|||
width: 34,
|
||||
height: 34,
|
||||
padding: EdgeInsets.only(top: 0),
|
||||
child: Semantics(
|
||||
label: S.of(context).copy_address,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Clipboard.setData(ClipboardData(
|
||||
|
@ -471,6 +476,7 @@ class ExchangeCardState extends State<ExchangeCard> {
|
|||
8, 8, 0, 8),
|
||||
color: Colors.transparent,
|
||||
child: copyImage),
|
||||
),
|
||||
)))
|
||||
])))
|
||||
])),
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/palette.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AlertCloseButton extends StatelessWidget {
|
||||
AlertCloseButton({this.image, this.bottom, this.onTap});
|
||||
|
||||
final VoidCallback? onTap;
|
||||
|
||||
final Image? image;
|
||||
|
@ -19,6 +21,10 @@ class AlertCloseButton extends StatelessWidget {
|
|||
bottom: bottom ?? 60,
|
||||
child: GestureDetector(
|
||||
onTap: onTap ?? () => Navigator.of(context).pop(),
|
||||
child: Semantics(
|
||||
label: S.of(context).close,
|
||||
button: true,
|
||||
enabled: true,
|
||||
child: Container(
|
||||
height: 42,
|
||||
width: 42,
|
||||
|
@ -28,6 +34,7 @@ class AlertCloseButton extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue