diff --git a/Mobile/lib/createreview.dart b/Mobile/lib/createreview.dart index 9772dc1..4d5d5aa 100644 --- a/Mobile/lib/createreview.dart +++ b/Mobile/lib/createreview.dart @@ -11,6 +11,9 @@ class CreateReviewPage extends StatefulWidget { } class _CreateReviewState extends State { + final titleInput = TextEditingController(); + final contentInput = TextEditingController(); + @override Widget build(BuildContext context) { final place = ModalRoute.of(context)!.settings.arguments as Place; @@ -18,18 +21,45 @@ class _CreateReviewState extends State { return SideMenu( selectedIndex: -1, body: Scaffold( - body: SingleChildScrollView(child: Container( - decoration: const BoxDecoration(color: Color(0xFFF9F9F9)), - width: MediaQuery.of(context).size.width, - padding: const EdgeInsets.all(20), - child: Column(children: [ - Text(place.name, style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 24)), - Text(place.description, style: const TextStyle(color: Colors.grey)) - ]), - - - )) + backgroundColor: Color(0xFFF9F9F9), + body: SingleChildScrollView( + child: Center( + child: Container( + width: MediaQuery.of(context).size.width, + padding: const EdgeInsets.all(40), + constraints: const BoxConstraints(maxWidth: 400), + child: Column(children: [ + Text(place.name, style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 24)), + Text(place.description, style: const TextStyle(color: Colors.grey)), + const SizedBox(height: 50), + TextField( + controller: titleInput, + enableSuggestions: true, + autocorrect: true, + decoration: const InputDecoration( + hintText: 'Review Title', + ), + ), + const SizedBox(height: 30), + TextField( + controller: contentInput, + minLines: 5, + maxLines: null, + decoration: const InputDecoration( + hintText: 'Write a review...', + ) + ) + ]), + ) + ) + ) ) ); } + + @override + void dispose() { + titleInput.dispose(); + contentInput.dispose(); + } } \ No newline at end of file