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

24 lines
722 B
Dart

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(
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),
);
}