-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.dart
33 lines (31 loc) · 848 Bytes
/
main.dart
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
import 'package:draggable_floating_action_button/draggable_floating_action_button.dart';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
title: Text('Draggable FAB'),
),
body: Column(
children: <Widget>[
Expanded(
child: Center(
child: Text('You can move the FAB after a long press!'),
),
),
DraggableFloatingActionButton(
onPressed: () {
print('Fab Pressed');
},
icon: Icon(Icons.add),
),
],
),
),
);
}
}