2021-07-31 17:38:01 +02:00
|
|
|
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
|
2021-07-31 17:38:01 +02:00
|
|
|
class ViewerBottomAppBar extends StatelessWidget {
|
|
|
|
ViewerBottomAppBar({
|
2021-08-13 19:30:47 +02:00
|
|
|
required this.children,
|
2021-07-31 17:38:01 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
@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-07-31 17:38:01 +02:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-08-13 19:30:47 +02:00
|
|
|
final List<Widget> children;
|
2021-07-31 17:38:01 +02:00
|
|
|
}
|