forked from fossasia/magic-epaper-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflip_controls.dart
More file actions
51 lines (48 loc) · 1.36 KB
/
flip_controls.dart
File metadata and controls
51 lines (48 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import 'package:flutter/material.dart';
import 'package:magic_epaper_app/constants/asset_paths.dart';
class FlipControls extends StatelessWidget {
final VoidCallback onFlipHorizontal;
final VoidCallback onFlipVertical;
const FlipControls({
super.key,
required this.onFlipHorizontal,
required this.onFlipVertical,
});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(bottom: 80.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
FloatingActionButton(
backgroundColor: Colors.white,
heroTag: 'flipH',
onPressed: onFlipHorizontal,
tooltip: 'Flip Horizontally',
child: Image.asset(
ImageAssets.flipHorizontal,
height: 24,
width: 24,
),
),
const SizedBox(height: 10),
FloatingActionButton(
backgroundColor: Colors.white,
heroTag: 'flipV',
onPressed: onFlipVertical,
tooltip: 'Flip Vertically',
child: Transform.rotate(
angle: -1.5708,
child: Image.asset(
ImageAssets.flipHorizontal,
height: 24,
width: 24,
),
),
),
],
),
);
}
}