|
|
@ -7,7 +7,9 @@ import 'package:justmusic/screens/search_song_screen.dart';
|
|
|
|
import 'package:tuple/tuple.dart';
|
|
|
|
import 'package:tuple/tuple.dart';
|
|
|
|
import '../components/editable_post_component.dart';
|
|
|
|
import '../components/editable_post_component.dart';
|
|
|
|
import '../components/post_button_component.dart';
|
|
|
|
import '../components/post_button_component.dart';
|
|
|
|
|
|
|
|
import '../main.dart';
|
|
|
|
import '../model/Music.dart';
|
|
|
|
import '../model/Music.dart';
|
|
|
|
|
|
|
|
import '../model/Post.dart';
|
|
|
|
import '../values/constants.dart';
|
|
|
|
import '../values/constants.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class PostScreen extends StatefulWidget {
|
|
|
|
class PostScreen extends StatefulWidget {
|
|
|
@ -91,10 +93,9 @@ class _PostScreenState extends State<PostScreen>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
displayinfo() {
|
|
|
|
handleSubmit() async {
|
|
|
|
print("cc");
|
|
|
|
await MyApp.postViewModel.addPost(
|
|
|
|
print(
|
|
|
|
description, (selectedMusic?.id)!, selectedImage, selectedCity);
|
|
|
|
"${selectedCity},${selectedMusic?.title},${selectedImage?.path},${description}");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
@ -150,7 +151,7 @@ class _PostScreenState extends State<PostScreen>
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PostButtonComponent(
|
|
|
|
PostButtonComponent(
|
|
|
|
empty: selectedMusic == null,
|
|
|
|
empty: selectedMusic == null,
|
|
|
|
callback: displayinfo,
|
|
|
|
callback: handleSubmit,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 40.h,
|
|
|
|
height: 40.h,
|
|
|
|