make fabs to AppBar icon buttons
This commit is contained in:
@@ -75,7 +75,35 @@ class _SheetViewerPageState extends State<SheetViewerPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(widget.sheet.name)),
|
||||
appBar: AppBar(
|
||||
title: Text(widget.sheet.name),
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
if (twoPageMode) {
|
||||
// TODO: notification that paint mode only in single page mode
|
||||
} else {
|
||||
paintMode = !paintMode;
|
||||
}
|
||||
});
|
||||
},
|
||||
icon: Icon(Icons.brush),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
twoPageMode = !twoPageMode;
|
||||
if (twoPageMode) {
|
||||
paintMode = false;
|
||||
// TODO: notification that paint mode was deactivated since only possible in single page mode
|
||||
}
|
||||
});
|
||||
},
|
||||
icon: Icon(twoPageMode ? Icons.filter_1 : Icons.filter_2),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: FutureBuilder(
|
||||
future: documentLoaded,
|
||||
builder: (BuildContext context, AsyncSnapshot<bool> snapshot) {
|
||||
@@ -211,42 +239,6 @@ class _SheetViewerPageState extends State<SheetViewerPage> {
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomLeft,
|
||||
margin: EdgeInsets.all(10),
|
||||
child: Column(
|
||||
spacing: 10,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
FloatingActionButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
if (twoPageMode) {
|
||||
// TODO: notification that paint mode only in single page mode
|
||||
} else {
|
||||
paintMode = !paintMode;
|
||||
}
|
||||
});
|
||||
},
|
||||
child: Icon(Icons.brush),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
twoPageMode = !twoPageMode;
|
||||
if (twoPageMode) {
|
||||
paintMode = false;
|
||||
// TODO: notification that paint mode was deactivated since only possible in single page mode
|
||||
}
|
||||
});
|
||||
},
|
||||
child: Icon(
|
||||
twoPageMode ? Icons.filter_1 : Icons.filter_2,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
} else if (snapshot.hasError) {
|
||||
|
||||
Reference in New Issue
Block a user