Commit 75599bfa by Ramesh Babu Puvvadi

added UI Changes

parent 63e78c2e
......@@ -4,7 +4,7 @@
<application
android:label="vasthram"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/appicon">
<activity
android:name=".MainActivity"
android:exported="true"
......
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"idiom":"watch","filename":"172.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"38mm","scale":"2x","size":"86x86","expected-size":"172","role":"quickLook"},{"idiom":"watch","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"38mm","scale":"2x","size":"40x40","expected-size":"80","role":"appLauncher"},{"idiom":"watch","filename":"88.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"40mm","scale":"2x","size":"44x44","expected-size":"88","role":"appLauncher"},{"idiom":"watch","filename":"102.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"41mm","scale":"2x","size":"45x45","expected-size":"102","role":"appLauncher"},{"idiom":"watch","filename":"92.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"41mm","scale":"2x","size":"46x46","expected-size":"92","role":"appLauncher"},{"idiom":"watch","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"44mm","scale":"2x","size":"50x50","expected-size":"100","role":"appLauncher"},{"idiom":"watch","filename":"196.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"42mm","scale":"2x","size":"98x98","expected-size":"196","role":"quickLook"},{"idiom":"watch","filename":"216.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"44mm","scale":"2x","size":"108x108","expected-size":"216","role":"quickLook"},{"idiom":"watch","filename":"48.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"38mm","scale":"2x","size":"24x24","expected-size":"48","role":"notificationCenter"},{"idiom":"watch","filename":"55.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"42mm","scale":"2x","size":"27.5x27.5","expected-size":"55","role":"notificationCenter"},{"idiom":"watch","filename":"66.png","folder":"Assets.xcassets/AppIcon.appiconset/","subtype":"45mm","scale":"2x","size":"33x33","expected-size":"66","role":"notificationCenter"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"watch","role":"companionSettings","scale":"3x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"watch","role":"companionSettings","scale":"2x"},{"size":"1024x1024","expected-size":"1024","filename":"1024.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"watch-marketing","scale":"1x"},{"size":"128x128","expected-size":"128","filename":"128.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"256x256","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"128x128","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"256x256","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"512x512","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"16","filename":"16.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"64","filename":"64.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"512x512","expected-size":"1024","filename":"1024.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"}]}
\ No newline at end of file
......@@ -11,7 +11,7 @@ class Constants {
late AlertDialog alert;
Constants(String title, String message) {
this.title = title;
this.title = title;
this.message = message;
}
......@@ -154,10 +154,10 @@ class Constants {
static LinearGradient getReturn() {
const LinearGradient gradient = LinearGradient(
colors: [
//Color(0xFF4da2dd),
Color(0xFFaa39e6),
//Color(0xFFC2185B),
Color(0xFF7b32fe)
// Color(0xFF8c4756),
Color(0xFF453348),
Color(0xFF453348),
//Color(0xFF7b32fe)
],
begin: Alignment.bottomLeft,
end: Alignment.bottomRight,
......
......@@ -20,11 +20,9 @@ class RemoteData {
? 'IOS'
: 'Unknown',
};
if (kDebugMode) {
print(body);
}
var client = http.Client();
var res = await client.post(Uri.parse(loginUrl),
headers: {type: appjson}, body: json.encode(body));
......
......@@ -38,7 +38,8 @@ class _SignUpState extends State<SignUp> {
Navigator.pop(context);
Constants.saveLoginCredentials(userResponse.empName, _email.text,
jsonStr, '', userResponse.level, true);
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => const Home()));
Navigator.pushReplacement(
context, MaterialPageRoute(builder: (context) => const Home()));
}
} else {
Navigator.pop(context);
......@@ -66,34 +67,82 @@ class _SignUpState extends State<SignUp> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Login '),
flexibleSpace: Container(
decoration: BoxDecoration(
gradient: Constants.getReturn(),
),
),
),
resizeToAvoidBottomInset: false,
body: Container(
margin: const EdgeInsets.all(15.0),
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/bg.png"),
fit: BoxFit.cover, // Adjust as needed
),
),
//margin: const EdgeInsets.all(25.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
height: 50,
child: TextFormField(
cursorColor: const Color.fromARGB(255, 125, 50, 253),
keyboardType: TextInputType.number,
controller: _email,
scrollPadding: const EdgeInsets.all(100.0),
decoration: const InputDecoration(
hintText: 'UserId',
border: OutlineInputBorder(),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color.fromARGB(255, 125, 50, 253),
const SizedBox(
height: 150,
),
Image.asset(
"assets/images/logo.png",
width: 250, // Adjust the width as needed
height: 125, // Adjust the height as needed
),
const SizedBox(
height: 20,
),
// image: DecorationImage(
// image: AssetImage("assets/images/bg.png"),
// fit: BoxFit.cover, // Adjust as needed
// ),
const Padding(
padding: EdgeInsets.only(
top: 40.0,
left: 20.0,
right: 20.0,
bottom: 0), // Adjust padding as needed
child: SizedBox(
height: 60,
child: Text(
'LOGIN',
style: Constants.buttonsfontStyle,
),
)),
Padding(
padding: const EdgeInsets.only(
top: 0,
left: 20.0,
right: 20.0,
bottom: 0), // Adjust padding as needed
child: SizedBox(
height: 50,
child: TextFormField(
cursorColor: const Color.fromARGB(255, 126, 69, 85),
keyboardType: TextInputType.number,
controller: _email,
scrollPadding: const EdgeInsets.all(100.0),
decoration: InputDecoration(
contentPadding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
hintText: 'USER ID',
filled: true,
fillColor: const Color.fromARGB(255, 224, 226, 228),
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(50),
),
suffixIcon: Padding(
padding: const EdgeInsets.only(right: 8.0),
child: IconButton(
onPressed: () {},
icon: Image.asset(
"assets/images/user.png",
width: 24, // Adjust the width as needed
height: 24, // Adjust the height as needed
//color: Colors.grey, // Icon color
),
),
),
),
),
......@@ -102,41 +151,92 @@ class _SignUpState extends State<SignUp> {
const SizedBox(
height: 20,
),
SizedBox(
height: 50,
child: TextField(
cursorColor: const Color.fromARGB(255, 125, 50, 253),
obscureText: true,
controller: _pass,
decoration: const InputDecoration(
hintText: 'Password',
border: OutlineInputBorder(),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Color.fromARGB(255, 125, 50, 253),
Padding(
padding: const EdgeInsets.only(
top: 0,
left: 20.0,
right: 20.0,
bottom: 0), // Adjust padding as needed
child: SizedBox(
height: 50,
child: TextFormField(
cursorColor: const Color.fromARGB(255, 126, 69, 85),
obscureText: true,
controller: _pass,
decoration: InputDecoration(
contentPadding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
hintText: 'PASSWORD',
filled: true,
fillColor: const Color.fromARGB(255, 224, 226, 228),
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(50)),
suffixIcon: Padding(
padding: const EdgeInsets.only(right: 8.0),
child: IconButton(
onPressed: () {
// Add your icon button action here
},
icon: Image.asset(
"assets/images/password.png",
width: 24, // Adjust the width as needed
height: 24, // Adjust the height as needed
),
),
),
),
),
),
),
const SizedBox(
height: 30,
height: 80,
),
ElevatedButton(
onPressed: () async {
Constants.saveLoginCredentials(
'', _email.text, '', '', '', true);
Navigator.pushReplacement(context,
MaterialPageRoute(builder: (context) => const Home()));
},
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(
const Color.fromARGB(255, 170, 57, 230)),
),
child: const SizedBox(
height: 50,
child: Center(
child: Text('Sign In'),
Padding(
padding: const EdgeInsets.only(
top: 0,
left: 20.0,
right: 20.0,
bottom: 0), // Adjust padding as needed
child: ElevatedButton(
onPressed: () async {
Constants.saveLoginCredentials(
'', _email.text, '', '', '', true);
Navigator.pushReplacement(context,
MaterialPageRoute(builder: (context) => const Home()));
},
style: ButtonStyle(
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
50.0), // Adjust the radius as needed
),
),
minimumSize: MaterialStateProperty.all<Size>(
const Size(double.infinity, 50),
),
backgroundColor: MaterialStateProperty.all<Color>(
const Color.fromARGB(255, 126, 69,
85), // Adjust the background color as needed
),
),
child: Row(
children: [
SizedBox(
child: Image.asset(
"assets/images/signin.png",
width: 48, // Adjust the width as needed
height: 48, // Adjust the height as needed
),
),
const Expanded(
child: Center(
child: Text(
'SIGN IN',
style: Constants.buttonsfontStyle,
),
),
),
],
),
),
),
......
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:vasthram/Home.dart';
import 'package:vasthram/SignUp.dart';
class UserPreferences {
static const String isLoggedInKey = 'isLoggedIn';
static Future<SharedPreferences> getSharedPreferences() async {
return await SharedPreferences.getInstance();
}
......@@ -28,7 +26,6 @@ class SplashScreen extends StatefulWidget {
class SplashScreenState extends State<SplashScreen> {
bool? isLoggedIn = false;
void timeToShowSplashScreenOnScreen() async {
Timer(const Duration(seconds: 3), () async {
if (!mounted) return;
......@@ -45,14 +42,12 @@ class SplashScreenState extends State<SplashScreen> {
context, MaterialPageRoute(builder: (context) => const Home()));
} else {
if (kDebugMode) {
print('else condition :$isLoggedIn');
//print('else condition :$isLoggedIn');
}
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => const SignUp()),
(Route<dynamic> route) => false,
);
// }
context,
MaterialPageRoute(builder: (context) => const SignUp()),
(Route<dynamic> route) => false);
}
});
}
......
......@@ -63,7 +63,14 @@ flutter:
assets:
- assets/images/camera.png
- assets/images/splash.png
- assets/images/bg.png
- assets/images/logo.png
- assets/images/user.png
- assets/images/signin.png
- assets/images/password.png
- assets/images/signout.png
- assets/images/captureimage.png
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment