nc-photos/app/lib/widget/selection_app_bar.dart

30 lines
731 B
Dart
Raw Normal View History

2021-07-25 16:27:19 +02:00
import 'package:flutter/material.dart';
import 'package:nc_photos/app_localizations.dart';
class SelectionAppBar extends StatelessWidget {
2021-09-15 08:58:06 +02:00
const SelectionAppBar({
2021-07-25 16:27:19 +02:00
Key? key,
required this.count,
this.onClosePressed,
this.actions,
}) : super(key: key);
@override
build(BuildContext context) {
2022-11-12 10:55:33 +01:00
return SliverAppBar(
pinned: true,
leading: IconButton(
icon: const Icon(Icons.close),
tooltip: MaterialLocalizations.of(context).closeButtonTooltip,
onPressed: onClosePressed,
2021-07-25 16:27:19 +02:00
),
2022-11-12 10:55:33 +01:00
title: Text(L10n.global().selectionAppBarTitle(count)),
actions: actions,
2021-07-25 16:27:19 +02:00
);
}
final int count;
final VoidCallback? onClosePressed;
final List<Widget>? actions;
}