Messaging
Implemented Chat Screens, Profile Pages, Search Pages WIP: User profile, new chat button Intended: Groups, Calls, Voice Messages Properly deleting chats, offline storage of messages
This commit is contained in:
@@ -26,12 +26,10 @@ class _RegisterationPageState extends State<RegisterationPage> {
|
||||
String? _email;
|
||||
String? _password;
|
||||
|
||||
late GlobalKey<FormState> _formKey;
|
||||
GlobalKey<FormState> _formKey;
|
||||
late MessagingProviders _auth;
|
||||
|
||||
_RegisterationPageState() {
|
||||
_formKey = GlobalKey<FormState>();
|
||||
}
|
||||
_RegisterationPageState() : _formKey = GlobalKey<FormState>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -56,20 +54,22 @@ class _RegisterationPageState extends State<RegisterationPage> {
|
||||
return Builder(builder: (BuildContext _context) {
|
||||
SnackBarService.instance.buildContext = _context;
|
||||
_auth = Provider.of<MessagingProviders>(_context);
|
||||
return Container(
|
||||
// color: Colors.deepOrange,
|
||||
height: _deviceHeight * 0.75,
|
||||
padding: EdgeInsets.symmetric(horizontal: _deviceWidth * 0.10),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_headingWidget(),
|
||||
_inputForm(),
|
||||
_registerButton(),
|
||||
_backToLoginPage(),
|
||||
],
|
||||
return SingleChildScrollView(
|
||||
child: Container(
|
||||
// color: Colors.deepOrange,
|
||||
height: _deviceHeight * 0.75,
|
||||
padding: EdgeInsets.symmetric(horizontal: _deviceWidth * 0.10),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_headingWidget(),
|
||||
_inputForm(),
|
||||
_registerButton(),
|
||||
_backToLoginPage(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
@@ -83,11 +83,11 @@ class _RegisterationPageState extends State<RegisterationPage> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'SignUp to Enjoy!',
|
||||
'signup to enjoy!',
|
||||
style: TextStyle(fontSize: 35, fontWeight: FontWeight.w700),
|
||||
),
|
||||
Text(
|
||||
'Please enter your details',
|
||||
'please enter your details',
|
||||
style: TextStyle(fontSize: 25, fontWeight: FontWeight.w200),
|
||||
)
|
||||
],
|
||||
@@ -148,11 +148,13 @@ class _RegisterationPageState extends State<RegisterationPage> {
|
||||
Widget _nameTextField() {
|
||||
return TextFormField(
|
||||
autocorrect: false,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
textInputAction: TextInputAction.next,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
validator: (_input) {
|
||||
return _input!.isNotEmpty ? null : "Please enter a valid Name";
|
||||
return _input!.isNotEmpty ? null : "please enter a valid name";
|
||||
},
|
||||
onSaved: (_input) {
|
||||
setState(() {
|
||||
@@ -161,7 +163,7 @@ class _RegisterationPageState extends State<RegisterationPage> {
|
||||
},
|
||||
cursorColor: Colors.white,
|
||||
decoration: InputDecoration(
|
||||
hintText: "Name",
|
||||
hintText: "name",
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.white))),
|
||||
);
|
||||
@@ -170,13 +172,15 @@ class _RegisterationPageState extends State<RegisterationPage> {
|
||||
Widget _emailTextField() {
|
||||
return TextFormField(
|
||||
autocorrect: false,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
textInputAction: TextInputAction.next,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
validator: (_input) {
|
||||
return _input!.isNotEmpty && _input.contains("@")
|
||||
? null
|
||||
: "Please enter a valid Email";
|
||||
: "please enter a valid email";
|
||||
},
|
||||
onSaved: (_input) {
|
||||
setState(() {
|
||||
@@ -185,7 +189,7 @@ class _RegisterationPageState extends State<RegisterationPage> {
|
||||
},
|
||||
cursorColor: Colors.white,
|
||||
decoration: InputDecoration(
|
||||
hintText: "Email",
|
||||
hintText: "email",
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.white))),
|
||||
);
|
||||
@@ -194,11 +198,13 @@ class _RegisterationPageState extends State<RegisterationPage> {
|
||||
Widget _passwordTextField() {
|
||||
return TextFormField(
|
||||
autocorrect: false,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
textInputAction: TextInputAction.next,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
validator: (_input) {
|
||||
return _input!.isNotEmpty ? null : "Please enter a Password";
|
||||
return _input!.isNotEmpty ? null : "please enter a password";
|
||||
},
|
||||
onSaved: (_input) {
|
||||
setState(() {
|
||||
@@ -208,7 +214,7 @@ class _RegisterationPageState extends State<RegisterationPage> {
|
||||
obscureText: true,
|
||||
cursorColor: Colors.white,
|
||||
decoration: InputDecoration(
|
||||
hintText: "Password",
|
||||
hintText: "password",
|
||||
focusedBorder: UnderlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.white))),
|
||||
);
|
||||
@@ -226,7 +232,7 @@ class _RegisterationPageState extends State<RegisterationPage> {
|
||||
onPressed: () {
|
||||
if (_image == null) {
|
||||
SnackBarService.instance
|
||||
.showSnackBarError("Please Select an Image");
|
||||
.showSnackBarError("please select an image");
|
||||
}
|
||||
if (_formKey.currentState!.validate() && _image != null) {
|
||||
//
|
||||
@@ -247,7 +253,7 @@ class _RegisterationPageState extends State<RegisterationPage> {
|
||||
},
|
||||
color: Colors.blue,
|
||||
child: Text(
|
||||
"REGISTER",
|
||||
"register",
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w700,
|
||||
|
||||
Reference in New Issue
Block a user