From 544150dc185315bef8ba733728ce9a3fee8a185f Mon Sep 17 00:00:00 2001 From: uumair327 Date: Tue, 20 Feb 2024 00:55:20 +0530 Subject: [PATCH] Account --- lib/screens/account.dart | 86 ++++++++++++++++++++++++++++++++++--- lib/screens/searchPage.dart | 43 ++++++++++++++++--- 2 files changed, 117 insertions(+), 12 deletions(-) diff --git a/lib/screens/account.dart b/lib/screens/account.dart index 62b30b9..26d9f82 100644 --- a/lib/screens/account.dart +++ b/lib/screens/account.dart @@ -4,12 +4,86 @@ class Account extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - extendBody: true, - body: SafeArea( - child: Center( - child: Text( - "Account", - ))), + appBar: AppBar( + title: Text('Account'), + ), + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Profile Information', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 10), + ListTile( + leading: Icon(Icons.person), + title: Text('Name: John Doe'), + ), + ListTile( + leading: Icon(Icons.email), + title: Text('Email: johndoe@example.com'), + ), + ListTile( + leading: Icon(Icons.phone), + title: Text('Phone: +1 (123) 456-7890'), + ), + Divider(), + Text( + 'Child Safety Settings', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + ), + ), + SwitchListTile( + title: Text('Enable Child Safety Mode'), + value: true, + onChanged: (value) { + // Toggle child safety mode + }, + ), + ListTile( + title: Text('Emergency Contact'), + onTap: () { + // Navigate to emergency contact page + }, + ), + ListTile( + title: Text('Report an Incident'), + onTap: () { + // Navigate to report page + }, + ), + Divider(), + Text( + 'Settings', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + ), + ), + ListTile( + title: Text('Change Password'), + onTap: () { + // Navigate to change password page + }, + ), + ListTile( + title: Text('Log Out'), + onTap: () { + // Log out the user + }, + ), + ], + ), + ), + ), ); } } diff --git a/lib/screens/searchPage.dart b/lib/screens/searchPage.dart index 4fea9a6..ae72cd7 100644 --- a/lib/screens/searchPage.dart +++ b/lib/screens/searchPage.dart @@ -4,12 +4,43 @@ class SearchPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - extendBody: true, - body: SafeArea( - child: Center( - child: Text( - "SEARCHPAGE", - ))), + appBar: AppBar( + title: Text('Search'), + leading: IconButton( + icon: Icon(Icons.arrow_back), + onPressed: () { + Navigator.pop(context); + }, + ), + actions: [ + IconButton( + icon: Icon(Icons.clear), + onPressed: () { + // Clear search text + }, + ), + ], + bottom: PreferredSize( + preferredSize: Size.fromHeight(kToolbarHeight), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 16.0), + child: TextField( + decoration: InputDecoration( + hintText: 'Search...', + border: OutlineInputBorder(), + ), + onSubmitted: (value) { + // Perform search based on the entered value + }, + ), + ), + ), + ), + body: Center( + child: Text( + "SEARCH RESULTS", + ), + ), ); } }