@@ -506,15 +506,11 @@ class FileAssetPickerBuilder
506
506
PreferredSizeWidget appBar (BuildContext context) {
507
507
final AppBar appBar = AppBar (
508
508
backgroundColor: theme.appBarTheme.backgroundColor,
509
- centerTitle: isAppleOS (context),
510
- title: pathEntitySelector (context),
509
+ title: Semantics (
510
+ onTapHint: semanticsTextDelegate.sActionSwitchPathLabel,
511
+ child: pathEntitySelector (context),
512
+ ),
511
513
leading: backButton (context),
512
- actions: ! isAppleOS (context)
513
- ? < Widget > [
514
- confirmButton (context),
515
- const SizedBox (width: 14.0 ),
516
- ]
517
- : null ,
518
514
);
519
515
appBarPreferredSize ?? = appBar.preferredSize;
520
516
return appBar;
@@ -1386,24 +1382,51 @@ class FileAssetPickerViewerBuilderDelegate
1386
1382
color: themeData.canvasColor.withOpacity (0.85 ),
1387
1383
child: Row (
1388
1384
children: < Widget > [
1389
- const BackButton (),
1390
- if (! isAppleOS (context))
1391
- StreamBuilder <int >(
1392
- initialData: currentIndex,
1393
- stream: pageStreamController.stream,
1394
- builder: (BuildContext _, AsyncSnapshot <int > snapshot) {
1395
- return Text (
1396
- '${snapshot .data ! + 1 }/${previewAssets .length }' ,
1397
- style: const TextStyle (
1398
- fontSize: 18.0 ,
1399
- fontWeight: FontWeight .bold,
1400
- ),
1401
- );
1402
- },
1385
+ Expanded (
1386
+ child: Align (
1387
+ alignment: AlignmentDirectional .centerStart,
1388
+ child: Semantics (
1389
+ sortKey: ordinalSortKey (0 ),
1390
+ child: IconButton (
1391
+ icon: const Icon (Icons .close),
1392
+ tooltip: MaterialLocalizations .of (
1393
+ context,
1394
+ ).backButtonTooltip,
1395
+ onPressed: Navigator .of (context).maybePop,
1396
+ ),
1397
+ ),
1398
+ ),
1399
+ ),
1400
+ Expanded (
1401
+ child: Center (
1402
+ child: StreamBuilder <int >(
1403
+ initialData: currentIndex,
1404
+ stream: pageStreamController.stream,
1405
+ builder: (BuildContext _, AsyncSnapshot <int > snapshot) {
1406
+ return Text (
1407
+ '${snapshot .requireData + 1 }/${previewAssets .length }' ,
1408
+ style: const TextStyle (
1409
+ fontSize: 18.0 ,
1410
+ fontWeight: FontWeight .bold,
1411
+ ),
1412
+ );
1413
+ },
1414
+ ),
1403
1415
),
1404
- const Spacer (),
1405
- if (isAppleOS (context) && provider != null ) selectButton (context),
1406
- if (! isAppleOS (context) && provider != null ) confirmButton (context),
1416
+ ),
1417
+ if (provider != null )
1418
+ Expanded (
1419
+ child: Container (
1420
+ alignment: AlignmentDirectional .centerEnd,
1421
+ padding: const EdgeInsetsDirectional .only (end: 14 ),
1422
+ child: Semantics (
1423
+ sortKey: ordinalSortKey (0.2 ),
1424
+ child: selectButton (context),
1425
+ ),
1426
+ ),
1427
+ )
1428
+ else
1429
+ const Spacer (),
1407
1430
],
1408
1431
),
1409
1432
),
0 commit comments