Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login signup feature #1

Open
wants to merge 11 commits into
base: Develop
Choose a base branch
from
Binary file added Preview/Login.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 Preview/login_sign.gif
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 Preview/signup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# signup_module
# Signup Module

Sign-up module
This project is a for sign-up module for Ch-4 Flutter basics Practical.

## Getting Started
## Preview

<img src="https://github.com/JanakMistry2000/signup_module/blob/login_signup_feature/Preview/Login.png" alt ="login" height=500 width =250/> <img src="https://github.com/JanakMistry2000/signup_module/blob/login_signup_feature/Preview/signup.png" alt ="login" height=500 width =250/> <img src="https://github.com/JanakMistry2000/signup_module/blob/login_signup_feature/Preview/login_sign.gif" alt ="login" height=500 width =250/>

## Design Inspiration

This design of login and sign up module is inspired from this https://www.studioamigos.com/login-animation-studio/

This project is a for sign-up module for Ch-4 Flutter basics Practical.



Expand Down
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ linter:
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
- avoid_relative_lib_imports
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

Expand Down
Binary file added lib/assets/mountain.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions lib/colors.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'package:flutter/material.dart';

class AppColor {
static final Color? blueDark = Colors.blue[900];
static const Color white = Colors.white;
static const Color purpleLight = Colors.deepPurpleAccent;
static const Color purpleDark = Colors.deepPurple;
static const Color blueLight = Colors.lightBlue;
static const Color blue = Colors.lightBlue;
static const Color blueAccent = Colors.blueAccent;
static const Color transparent = Colors.transparent;
static final Color? greyLight = Colors.grey[400];
}
31 changes: 31 additions & 0 deletions lib/components/wave.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';

class DrawCurve extends CustomPainter {
Color backgroundColor; // Specify the color of wave

DrawCurve({required this.backgroundColor});

@override
void paint(Canvas canvas, Size size) {
var paint = Paint();
paint.color = backgroundColor;
paint.style = PaintingStyle.fill;

var path = Path();
path.moveTo(0, size.height * 0.9);
path.cubicTo(0, size.height, size.width * -0.15, size.height * -0.3,
size.width * 0.45, size.height * 0.65); //This will create first arc
path.cubicTo(size.width * 0.75, size.height * 0.9, size.width * 0.85,
size.height * -0.3, size.width, size.height * 0.8); //For second arc.
path.lineTo(size.width, size.height);
path.lineTo(0, size.height);

canvas.drawPath(path, paint);
}

@override
bool shouldRepaint(covariant CustomPainter oldDelegate) {
return false;
}
}
4 changes: 4 additions & 0 deletions lib/images.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

class AppImages{
static const String mountain = "lib/assets/mountain.jpg";
}
99 changes: 2 additions & 97 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'views/login_signup.dart';

void main() {
runApp(const MyApp());
Expand All @@ -7,109 +8,13 @@ void main() {
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);

// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}

class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);

// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.

// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".

final String title;

@override
State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;

void _incrementCounter() {
setState(() {
// This call to setState tells the Flutter framework that something has
// changed in this State, which causes it to rerun the build method below
// so that the display can reflect the updated values. If we changed
// _counter without calling setState(), then the build method would not be
// called again, and so nothing would appear to happen.
_counter++;
});
}

@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
// by the _incrementCounter method above.
//
// The Flutter framework has been optimized to make rerunning build methods
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return Scaffold(
appBar: AppBar(
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
),
body: Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Column(
// Column is also a layout widget. It takes a list of children and
// arranges them vertically. By default, it sizes itself to fit its
// children horizontally, and tries to be as tall as its parent.
//
// Invoke "debug painting" (press "p" in the console, choose the
// "Toggle Debug Paint" action from the Flutter Inspector in Android
// Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
// to see the wireframe for each widget.
//
// Column has various properties to control how it sizes itself and
// how it positions its children. Here we use mainAxisAlignment to
// center the children vertically; the main axis here is the vertical
// axis because Columns are vertical (the cross axis would be
// horizontal).
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headline4,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
home: const LoginSignup(),
);
}
}
32 changes: 32 additions & 0 deletions lib/strings.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
class AppStrings {
static const String welcome = "WELCOME!";
static const String enterValidEmail = "Please enter a valid email id";
static const String enterUsername = "Please enter a username";
static const String enterPassword = "Please enter a Password";
static const String enterContact = "Please enter a Contact";
static const String enterValidUsername = "Please enter a valid username";
static const String enterValidPassword = "Please enter a valid username";
static const String enterValidContact = "Please enter a valid Contact number.";
static const String enter8digitPassword = "Password must be greater than 8 digit";
static const String emailFormat = "[a-zA-Z0-9\+\.\_\%\-\+]{1,256}"

///Regular Expression to match the email id
"\\@"
"[a-zA-Z0-9\\-]{0,64}"
"("
"\\."
"[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25}"
")+";
static const String chalet = "CHALET";
static const String username = "Username";
static const String password = "Password";
static const String contact = "Contact";
static const String email = "Email";
static const String enterEmail = "Enter an Email Id";
static const String submit = "Submit";
static const String login = "Login";
static const String donthaveaccount = "Don't have an account? ";
static const String signup = "Sign Up";
static const String successful = "Successful";
static const String forgetPassword = "Forgot Password?";
}
Loading