course-work/lib/ui/fabs/additemfab.dart

24 lines
728 B
Dart
Raw Normal View History

2022-12-27 07:01:37 +00:00
import 'package:flutter/material.dart';
import 'package:selfprivacy/ui/itemspage.dart';
class AddItemFab extends StatelessWidget {
const AddItemFab({super.key});
@override
Widget build(final BuildContext context) => FloatingActionButton.small(
heroTag: 'new_item_fab',
onPressed: () {
showModalBottomSheet<void>(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (final BuildContext context) => Padding(
padding: MediaQuery.of(context).viewInsets,
child: const ItemsDetails(),
),
);
},
child: const Icon(Icons.add_box_outlined),
);
}