More rest calls
This commit is contained in:
parent
b5b8b3da51
commit
5bea196253
5 changed files with 123 additions and 94 deletions
41
lib/customBottomAppBar.dart
Normal file
41
lib/customBottomAppBar.dart
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomBottomAppBar extends StatelessWidget {
|
||||
const CustomBottomAppBar(
|
||||
{this.fabLocation,
|
||||
this.showNotch,
|
||||
this.color = Colors.black45,
|
||||
this.actions});
|
||||
|
||||
final Color color;
|
||||
final FloatingActionButtonLocation fabLocation;
|
||||
final bool showNotch;
|
||||
final List<Widget> actions;
|
||||
|
||||
static final List<FloatingActionButtonLocation> kCenterLocations =
|
||||
<FloatingActionButtonLocation>[
|
||||
FloatingActionButtonLocation.centerDocked,
|
||||
FloatingActionButtonLocation.centerFloat,
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final List<Widget> rowContents = <Widget>[
|
||||
new SizedBox(height:56.0)
|
||||
];
|
||||
|
||||
if (kCenterLocations.contains(fabLocation)) {
|
||||
rowContents.add(
|
||||
const Expanded(child: const SizedBox()),
|
||||
);
|
||||
}
|
||||
|
||||
rowContents.addAll(this.actions);
|
||||
|
||||
return new BottomAppBar(
|
||||
color: color,
|
||||
hasNotch: showNotch,
|
||||
child: new Row(children: rowContents),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue