Skip to content

Commit

Permalink
Merge pull request Fuzail-Raza#2 from WaqasZafar9/WAQAS
Browse files Browse the repository at this point in the history
Waqas
  • Loading branch information
Fuzail-Raza authored May 27, 2024
2 parents d4ed390 + 54b5484 commit aed75ef
Show file tree
Hide file tree
Showing 28 changed files with 1,427 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/dart.yml
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
Binary file added pet_care/assets/images/8488254.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/cat1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/catproduct1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/dog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/dog1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/facebook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/g.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/paw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/pic3.zip
Binary file not shown.
Binary file added pet_care/assets/images/product1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/product2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/product3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/product4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/product5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/slider1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/slider2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pet_care/assets/images/slider3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
105 changes: 105 additions & 0 deletions pet_care/lib/AppBarwidget.dart
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,
),
),
),
],
),
);
}
}
118 changes: 118 additions & 0 deletions pet_care/lib/ForgotPasswordPage.dart
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,
),
),
],
),
),
),
),
),
),
);
}
}
Loading

0 comments on commit aed75ef

Please sign in to comment.