27 lines
825 B
Dart
27 lines
825 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ManageSingleLocation extends StatelessWidget {
|
|
final String name;
|
|
final Function delete;
|
|
const ManageSingleLocation(
|
|
{Key? key, required this.name, required this.delete})
|
|
: super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(10),
|
|
child: Row(children: [
|
|
Expanded(
|
|
child: Padding(
|
|
padding: const EdgeInsets.only(right: 12),
|
|
child: Text(name,
|
|
style: Theme.of(context).textTheme.headline5))),
|
|
GestureDetector(
|
|
onTap: () => delete(name),
|
|
child: const Icon(Icons.delete_sharp))
|
|
])));
|
|
}
|
|
}
|