nc-photos/lib/widget/viewer_bottom_app_bar.dart

42 lines
1 KiB
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
2021-08-13 19:30:47 +02:00
/// Button bar near the bottom of viewer
///
/// Buttons are spread evenly across the horizontal axis
class ViewerBottomAppBar extends StatelessWidget {
ViewerBottomAppBar({
2021-08-13 19:30:47 +02:00
required this.children,
});
@override
build(BuildContext context) {
return Container(
height: kToolbarHeight,
alignment: Alignment.center,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: const Alignment(0, -1),
end: const Alignment(0, 1),
colors: [
Color.fromARGB(0, 0, 0, 0),
Color.fromARGB(192, 0, 0, 0),
],
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
2021-08-13 19:30:47 +02:00
children: children
.map((e) => Expanded(
flex: 1,
child: e,
))
.toList(),
),
);
}
2021-08-13 19:30:47 +02:00
final List<Widget> children;
}