mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
29 lines
714 B
Dart
29 lines
714 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:nc_photos/app_localizations.dart';
|
|
|
|
class SelectionAppBar extends StatelessWidget {
|
|
const SelectionAppBar({
|
|
super.key,
|
|
required this.count,
|
|
this.onClosePressed,
|
|
this.actions,
|
|
});
|
|
|
|
@override
|
|
build(BuildContext context) {
|
|
return SliverAppBar(
|
|
pinned: true,
|
|
leading: IconButton(
|
|
icon: const Icon(Icons.close),
|
|
tooltip: MaterialLocalizations.of(context).closeButtonTooltip,
|
|
onPressed: onClosePressed,
|
|
),
|
|
title: Text(L10n.global().selectionAppBarTitle(count)),
|
|
actions: actions,
|
|
);
|
|
}
|
|
|
|
final int count;
|
|
final VoidCallback? onClosePressed;
|
|
final List<Widget>? actions;
|
|
}
|