-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathControlsWidget.dart
More file actions
31 lines (28 loc) · 894 Bytes
/
Copy pathControlsWidget.dart
File metadata and controls
31 lines (28 loc) · 894 Bytes
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
import 'package:flutter/material.dart';
///Code created by following tutorial: https://www.youtube.com/watch?v=TNKtGOZRA5o
///Creates the buttons needed to pick and scan an image
class ControlsWidget extends StatelessWidget {
final VoidCallback onClickedPickImage;
final VoidCallback onClickedScanText;
const ControlsWidget({
@required this.onClickedPickImage,
@required this.onClickedScanText,
Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) => Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(child: RaisedButton(
onPressed: onClickedPickImage,
child: Text('Pick Image'),
),),
const SizedBox(width: 12),
Expanded(child: RaisedButton(
onPressed: onClickedScanText,
child: Text('Scan For Text'),
),),
const SizedBox(width: 12),
],
);
}