Fixed creating community

This commit is contained in:
hannathkadher
2024-10-09 11:48:25 +04:00
parent f285189e42
commit 5d440a2b9e
3 changed files with 36 additions and 16 deletions

View File

@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
class CreateCommunityDialog extends StatefulWidget {
final Function(String) onCreateCommunity;
final Function(String name, String description, String regionId)
onCreateCommunity;
const CreateCommunityDialog({super.key, required this.onCreateCommunity});
@ -109,7 +110,11 @@ class CreateCommunityDialogState extends State<CreateCommunityDialog> {
child: ElevatedButton(
onPressed: () {
if (enteredName.isNotEmpty) {
widget.onCreateCommunity(enteredName);
widget.onCreateCommunity(
enteredName,
"",
"42dc377a-1a39-4df9-b85a-b3817af88525",
);
Navigator.of(context).pop();
}
},