forked from Fuzail-Raza/Pet-Care-App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Fuzail-Raza#2 from WaqasZafar9/WAQAS
Waqas
- Loading branch information
Showing
28 changed files
with
1,427 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Dart | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Note: This workflow uses the latest stable version of the Dart SDK. | ||
# You can specify other versions if desired, see documentation here: | ||
# https://github.com/dart-lang/setup-dart/blob/main/README.md | ||
# - uses: dart-lang/setup-dart@v1 | ||
- uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 | ||
|
||
- name: Install dependencies | ||
run: dart pub get | ||
|
||
# Uncomment this step to verify the use of 'dart format' on each commit. | ||
# - name: Verify formatting | ||
# run: dart format --output=none --set-exit-if-changed . | ||
|
||
# Consider passing '--fatal-infos' for slightly stricter analysis. | ||
- name: Analyze project source | ||
run: dart analyze | ||
|
||
# Your project will need to have tests in test/ and a dependency on | ||
# package:test for this step to succeed. Note that Flutter projects will | ||
# want to change this to 'flutter test'. | ||
- name: Run tests | ||
run: dart test |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
// Updated AppBarwidget | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:login_page_practice/pages/cartpage.dart'; | ||
|
||
class AppBarwidget extends StatelessWidget { | ||
const AppBarwidget({Key? key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final screenWidth = MediaQuery.of(context).size.width; | ||
final screenHeight = MediaQuery.of(context).size.height; | ||
|
||
return Padding( | ||
padding: EdgeInsets.symmetric( | ||
vertical: screenHeight * 0.02, | ||
horizontal: screenWidth * 0.05, | ||
), | ||
child: Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: [ | ||
InkWell( | ||
onTap: () { | ||
Navigator.pushNamed(context, "/"); | ||
}, | ||
child: Container( | ||
padding: EdgeInsets.all(screenWidth * 0.015), | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(screenWidth * 0.05), | ||
color: Colors.white70, | ||
boxShadow: [ | ||
BoxShadow( | ||
color: Colors.grey.withOpacity(0.5), | ||
spreadRadius: 2, | ||
blurRadius: 10, | ||
offset: Offset(0, 3), | ||
), | ||
], | ||
), | ||
child: Icon( | ||
CupertinoIcons.back, | ||
color: Colors.black, | ||
), | ||
), | ||
), | ||
Container( | ||
padding: EdgeInsets.symmetric( | ||
vertical: screenHeight * 0.01, | ||
horizontal: screenWidth * 0.04, | ||
), | ||
child: Text( | ||
'Pet Care App', | ||
style: TextStyle( | ||
color: Colors.black, | ||
fontSize: screenWidth * 0.05, | ||
fontWeight: FontWeight.bold, | ||
), | ||
), | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(screenWidth * 0.05), | ||
color: Colors.white70, | ||
boxShadow: [ | ||
BoxShadow( | ||
color: Colors.grey.withOpacity(0.5), | ||
spreadRadius: 2, | ||
blurRadius: 10, | ||
offset: Offset(0, 3), | ||
), | ||
], | ||
), | ||
), | ||
InkWell( | ||
onTap: () { | ||
Navigator.push( | ||
context, | ||
MaterialPageRoute( | ||
builder: (context) => cartpage(), | ||
), | ||
); | ||
}, | ||
child: Container( | ||
padding: EdgeInsets.all(screenWidth * 0.015), | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(screenWidth * 0.05), | ||
color: Colors.white70, | ||
boxShadow: [ | ||
BoxShadow( | ||
color: Colors.grey.withOpacity(0.5), | ||
spreadRadius: 2, | ||
blurRadius: 10, | ||
offset: Offset(0, 3), | ||
), | ||
], | ||
), | ||
child: Icon( | ||
CupertinoIcons.cart_fill, | ||
color: Colors.black, | ||
), | ||
), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
import 'package:flutter/material.dart'; | ||
//import 'package:login_page_practice/pages/LoginPage.dart'; | ||
|
||
class ForgotPasswordPage extends StatefulWidget { | ||
const ForgotPasswordPage({Key? key}) : super(key: key); | ||
|
||
@override | ||
State<ForgotPasswordPage> createState() => _ForgotPasswordPageState(); | ||
} | ||
|
||
class _ForgotPasswordPageState extends State<ForgotPasswordPage> { | ||
final _formKey = GlobalKey<FormState>(); | ||
String? _emailOrPhone; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
backgroundColor: Colors.white, | ||
appBar: AppBar( | ||
title: Text('Forgot Password', style: TextStyle()), | ||
backgroundColor: Colors.teal, | ||
), | ||
body: SafeArea( | ||
child: Center( | ||
child: SingleChildScrollView( | ||
child: Form( | ||
key: _formKey, | ||
child: Padding( | ||
padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 20), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.center, | ||
children: <Widget>[ | ||
SizedBox(height: 10), | ||
Image.asset( | ||
'lib/images/paw.png', | ||
width: 150, | ||
height: 150, | ||
), | ||
SizedBox(height: 25), | ||
const Text( | ||
'RESET YOUR PASSWORD', | ||
style: TextStyle( | ||
color: Colors.teal, | ||
fontSize: 16, | ||
fontWeight: FontWeight.bold, | ||
), | ||
), | ||
SizedBox(height: 25), | ||
TextFormField( | ||
keyboardType: TextInputType.emailAddress, | ||
validator: (value) { | ||
if (value == null || value.isEmpty) { | ||
return 'Please enter your email or phone number'; | ||
} else if (!RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$') | ||
.hasMatch(value)) { | ||
return 'Please enter a valid email'; | ||
} | ||
return null; | ||
}, | ||
onChanged: (value) { | ||
setState(() { | ||
_emailOrPhone = value; | ||
}); | ||
}, | ||
decoration: InputDecoration( | ||
label: Text( | ||
'Email', | ||
style: TextStyle(color: Colors.teal), | ||
), | ||
enabledBorder: OutlineInputBorder( | ||
borderRadius: BorderRadius.circular(5), | ||
borderSide: | ||
BorderSide(color: Colors.cyanAccent.shade400), | ||
), | ||
focusedBorder: OutlineInputBorder( | ||
borderSide: BorderSide(color: Colors.teal), | ||
borderRadius: BorderRadius.circular(5), | ||
), | ||
hintText: 'Enter Your Email', | ||
fillColor: Colors.grey.shade400, | ||
prefixIcon: Icon(Icons.email_rounded), | ||
prefixIconColor: Colors.cyan[400], | ||
), | ||
), | ||
SizedBox(height: 20), | ||
ElevatedButton( | ||
onPressed: () { | ||
if (_formKey.currentState!.validate()) { | ||
// Reset password logic goes here | ||
ScaffoldMessenger.of(context).showSnackBar( | ||
SnackBar( | ||
content: Text( | ||
'Password reset request sent to $_emailOrPhone'), | ||
), | ||
); | ||
} | ||
}, | ||
child: Text( | ||
'Reset Password', | ||
style: TextStyle( | ||
color: Colors.white, | ||
fontWeight: FontWeight.bold, | ||
fontSize: 16), | ||
), | ||
style: ElevatedButton.styleFrom( | ||
backgroundColor: Colors.teal, | ||
), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.