Commit 75599bfa by Ramesh Babu Puvvadi

added UI Changes

parent 63e78c2e
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<application <application
android:label="vasthram" android:label="vasthram"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/appicon">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
......
{ {"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"}]}
"images" : [ \ No newline at end of file
{
"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"
}
}
...@@ -154,10 +154,10 @@ class Constants { ...@@ -154,10 +154,10 @@ class Constants {
static LinearGradient getReturn() { static LinearGradient getReturn() {
const LinearGradient gradient = LinearGradient( const LinearGradient gradient = LinearGradient(
colors: [ colors: [
//Color(0xFF4da2dd), // Color(0xFF8c4756),
Color(0xFFaa39e6), Color(0xFF453348),
//Color(0xFFC2185B), Color(0xFF453348),
Color(0xFF7b32fe) //Color(0xFF7b32fe)
], ],
begin: Alignment.bottomLeft, begin: Alignment.bottomLeft,
end: Alignment.bottomRight, end: Alignment.bottomRight,
......
...@@ -20,11 +20,9 @@ class RemoteData { ...@@ -20,11 +20,9 @@ class RemoteData {
? 'IOS' ? 'IOS'
: 'Unknown', : 'Unknown',
}; };
if (kDebugMode) { if (kDebugMode) {
print(body); print(body);
} }
var client = http.Client(); var client = http.Client();
var res = await client.post(Uri.parse(loginUrl), var res = await client.post(Uri.parse(loginUrl),
headers: {type: appjson}, body: json.encode(body)); headers: {type: appjson}, body: json.encode(body));
......
...@@ -38,7 +38,8 @@ class _SignUpState extends State<SignUp> { ...@@ -38,7 +38,8 @@ class _SignUpState extends State<SignUp> {
Navigator.pop(context); Navigator.pop(context);
Constants.saveLoginCredentials(userResponse.empName, _email.text, Constants.saveLoginCredentials(userResponse.empName, _email.text,
jsonStr, '', userResponse.level, true); jsonStr, '', userResponse.level, true);
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => const Home())); Navigator.pushReplacement(
context, MaterialPageRoute(builder: (context) => const Home()));
} }
} else { } else {
Navigator.pop(context); Navigator.pop(context);
...@@ -66,34 +67,82 @@ class _SignUpState extends State<SignUp> { ...@@ -66,34 +67,82 @@ class _SignUpState extends State<SignUp> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar(
title: const Text('Login '),
flexibleSpace: Container(
decoration: BoxDecoration(
gradient: Constants.getReturn(),
),
),
),
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
body: Container( 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( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
SizedBox( 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, height: 50,
child: TextFormField( child: TextFormField(
cursorColor: const Color.fromARGB(255, 125, 50, 253), cursorColor: const Color.fromARGB(255, 126, 69, 85),
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
controller: _email, controller: _email,
scrollPadding: const EdgeInsets.all(100.0), scrollPadding: const EdgeInsets.all(100.0),
decoration: const InputDecoration( decoration: InputDecoration(
hintText: 'UserId', contentPadding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
border: OutlineInputBorder(), hintText: 'USER ID',
focusedBorder: OutlineInputBorder( filled: true,
borderSide: BorderSide( fillColor: const Color.fromARGB(255, 224, 226, 228),
color: Color.fromARGB(255, 125, 50, 253), 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,27 +151,53 @@ class _SignUpState extends State<SignUp> { ...@@ -102,27 +151,53 @@ class _SignUpState extends State<SignUp> {
const SizedBox( const SizedBox(
height: 20, height: 20,
), ),
SizedBox( Padding(
padding: const EdgeInsets.only(
top: 0,
left: 20.0,
right: 20.0,
bottom: 0), // Adjust padding as needed
child: SizedBox(
height: 50, height: 50,
child: TextField( child: TextFormField(
cursorColor: const Color.fromARGB(255, 125, 50, 253), cursorColor: const Color.fromARGB(255, 126, 69, 85),
obscureText: true, obscureText: true,
controller: _pass, controller: _pass,
decoration: const InputDecoration( decoration: InputDecoration(
hintText: 'Password', contentPadding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
border: OutlineInputBorder(), hintText: 'PASSWORD',
focusedBorder: OutlineInputBorder( filled: true,
borderSide: BorderSide( fillColor: const Color.fromARGB(255, 224, 226, 228),
color: Color.fromARGB(255, 125, 50, 253), 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,
), ),
ElevatedButton( ),
const SizedBox(
height: 80,
),
Padding(
padding: const EdgeInsets.only(
top: 0,
left: 20.0,
right: 20.0,
bottom: 0), // Adjust padding as needed
child: ElevatedButton(
onPressed: () async { onPressed: () async {
Constants.saveLoginCredentials( Constants.saveLoginCredentials(
'', _email.text, '', '', '', true); '', _email.text, '', '', '', true);
...@@ -130,13 +205,38 @@ class _SignUpState extends State<SignUp> { ...@@ -130,13 +205,38 @@ class _SignUpState extends State<SignUp> {
MaterialPageRoute(builder: (context) => const Home())); MaterialPageRoute(builder: (context) => const Home()));
}, },
style: ButtonStyle( 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>( backgroundColor: MaterialStateProperty.all<Color>(
const Color.fromARGB(255, 170, 57, 230)), const Color.fromARGB(255, 126, 69,
85), // Adjust the background color as needed
), ),
child: const SizedBox( ),
height: 50, 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: Center(
child: Text('Sign In'), child: Text(
'SIGN IN',
style: Constants.buttonsfontStyle,
),
),
),
],
), ),
), ),
), ),
......
import 'dart:async'; import 'dart:async';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:vasthram/Home.dart'; import 'package:vasthram/Home.dart';
import 'package:vasthram/SignUp.dart'; import 'package:vasthram/SignUp.dart';
class UserPreferences { class UserPreferences {
static const String isLoggedInKey = 'isLoggedIn'; static const String isLoggedInKey = 'isLoggedIn';
static Future<SharedPreferences> getSharedPreferences() async { static Future<SharedPreferences> getSharedPreferences() async {
return await SharedPreferences.getInstance(); return await SharedPreferences.getInstance();
} }
...@@ -28,7 +26,6 @@ class SplashScreen extends StatefulWidget { ...@@ -28,7 +26,6 @@ class SplashScreen extends StatefulWidget {
class SplashScreenState extends State<SplashScreen> { class SplashScreenState extends State<SplashScreen> {
bool? isLoggedIn = false; bool? isLoggedIn = false;
void timeToShowSplashScreenOnScreen() async { void timeToShowSplashScreenOnScreen() async {
Timer(const Duration(seconds: 3), () async { Timer(const Duration(seconds: 3), () async {
if (!mounted) return; if (!mounted) return;
...@@ -45,14 +42,12 @@ class SplashScreenState extends State<SplashScreen> { ...@@ -45,14 +42,12 @@ class SplashScreenState extends State<SplashScreen> {
context, MaterialPageRoute(builder: (context) => const Home())); context, MaterialPageRoute(builder: (context) => const Home()));
} else { } else {
if (kDebugMode) { if (kDebugMode) {
print('else condition :$isLoggedIn'); //print('else condition :$isLoggedIn');
} }
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
MaterialPageRoute(builder: (context) => const SignUp()), MaterialPageRoute(builder: (context) => const SignUp()),
(Route<dynamic> route) => false, (Route<dynamic> route) => false);
);
// }
} }
}); });
} }
......
...@@ -63,6 +63,13 @@ flutter: ...@@ -63,6 +63,13 @@ flutter:
assets: assets:
- assets/images/camera.png - assets/images/camera.png
- assets/images/splash.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: # To add assets to your application, add an assets section, like this:
# assets: # assets:
......
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