mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 17:26:18 +01:00
37 lines
965 B
Dart
37 lines
965 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
import 'package:flutter/widgets.dart';
|
||
|
import 'package:nc_photos/app_localizations.dart';
|
||
|
import 'package:nc_photos/theme.dart';
|
||
|
|
||
|
class SelectionAppBar extends StatelessWidget {
|
||
|
SelectionAppBar({
|
||
|
Key? key,
|
||
|
required this.count,
|
||
|
this.onClosePressed,
|
||
|
this.actions,
|
||
|
}) : super(key: key);
|
||
|
|
||
|
@override
|
||
|
build(BuildContext context) {
|
||
|
return Theme(
|
||
|
data: Theme.of(context).copyWith(
|
||
|
appBarTheme: AppTheme.getContextualAppBarTheme(context),
|
||
|
),
|
||
|
child: SliverAppBar(
|
||
|
pinned: true,
|
||
|
leading: IconButton(
|
||
|
icon: const Icon(Icons.close),
|
||
|
tooltip: MaterialLocalizations.of(context).closeButtonTooltip,
|
||
|
onPressed: onClosePressed,
|
||
|
),
|
||
|
title: Text(L10n.of(context).selectionAppBarTitle(count)),
|
||
|
actions: actions,
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
|
||
|
final int count;
|
||
|
final VoidCallback? onClosePressed;
|
||
|
final List<Widget>? actions;
|
||
|
}
|