Skip to content

Commit

Permalink
Face_reg tile removed. fucntion present.
Browse files Browse the repository at this point in the history
  • Loading branch information
PrianshuRai committed Jan 3, 2022
1 parent aac85df commit 18000af
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 130 deletions.
12 changes: 11 additions & 1 deletion assets/texts/demo_text.txt
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
hello world
// flutter build apk --split-per-abi
// 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 (expiry: jan 2022)
// you can find this project on https://github.com/PrianshuRai
// to start the login, set - home: LoginPage()
// to start the app, set - home: Landing()
// to start the inputs, set - home: Inputs_page()
// to start the testing_page, set - home: TestClass() or Testing()
// to start the mainpage, set - home: MainPage()

// https://drive.google.com/file/d/1jDtjua4V-lsPBm14kEMR3mwCF7T8ZQQw/view?usp=sharing
// viewer // https://drive.google.com/file/d/1k0DViG-D7f2rcCyLeULGYvCaaynEmPwh/view?usp=sharing
205 changes: 113 additions & 92 deletions lib/landingpage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import 'package:page_transition/page_transition.dart';
import './MainPage.dart';
import './inputs_page.dart';
import './web_view_page.dart';
import 'face_reg.dart';
import 'login_page.dart';

class Landing extends StatefulWidget {
Expand All @@ -24,6 +23,9 @@ class Landing extends StatefulWidget {
class _LandingState extends State<Landing> {
int _bellCounter = 0;

// this is a test function
// but before removing it please check
// function call properly
static Route<Object?> _userdialogBuilder(
BuildContext context, Object? arguments) {
return DialogRoute<void>(
Expand Down Expand Up @@ -362,20 +364,12 @@ class _LandingState extends State<Landing> {
child: InkWell(
splashColor: Colors.blue.withAlpha(30),
onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => PortalPage(
// link:
// "http://192.168.1.10:8085/mobile1iot?userId=$globaluserid"
// ),
// ),
// );
Navigator.of(context).push(
PageTransition(
type: PageTransitionType.rightToLeftWithFade,
alignment: Alignment.bottomCenter,
child: PortalPage(
// put the URL here
link:
// "http://192.168.1.10:8085/mobile1iot?userId=$globaluserid"),
"http://184.105.174.77:8086/login"),
Expand All @@ -395,7 +389,7 @@ class _LandingState extends State<Landing> {
),
),
Text(
'Web View',
'Web View', // change name of the tile
style: GoogleFonts.lato(
textStyle: Theme.of(context)
.textTheme
Expand Down Expand Up @@ -440,6 +434,7 @@ class _LandingState extends State<Landing> {
type: PageTransitionType.rightToLeftWithFade,
alignment: Alignment.bottomCenter,
child: PortalPage(
// put the URL here
link:
"http://184.105.174.77:8086/mobile2report"),
));
Expand Down Expand Up @@ -500,6 +495,7 @@ class _LandingState extends State<Landing> {
type: PageTransitionType.rightToLeftWithFade,
alignment: Alignment.bottomCenter,
child: PortalPage(
// put the URL here
link:
"http://184.105.174.77:8086/mobile1iot?userId=$globaluserid"),
));
Expand Down Expand Up @@ -559,8 +555,9 @@ class _LandingState extends State<Landing> {
Navigator.of(context).push(PageTransition(
type: PageTransitionType.rightToLeftWithFade,
alignment: Alignment.bottomCenter,
child:
PortalPage(link: "https://www.mozilla.com"),
child: PortalPage(
// put the URL here
link: "http://www.cogvision.ai/about-us/"),
));
},
child: Center(
Expand Down Expand Up @@ -657,64 +654,64 @@ class _LandingState extends State<Landing> {
),
),
),
Card(
color: Colors.red[50],
clipBehavior: Clip.antiAlias,
elevation: 5,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18),
),
child: InkWell(
splashColor: Colors.red.withAlpha(30),
onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => PortalPage(
// link: 'https://www.google.com/')));
Navigator.of(context).push(PageTransition(
type: PageTransitionType.rightToLeftWithFade,
alignment: Alignment.bottomCenter,
child: FaceReg(),
));
},
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
'assets/images/faceScanner.png',
height: 60,
width: 60,
),
),
Text(
'FRS',
style: GoogleFonts.lato(
textStyle: Theme.of(context)
.textTheme
.headline5,
fontWeight: FontWeight.w500),
),
SizedBox(
height: 15,
),
Text(
'Face Registration system',
style: GoogleFonts.lato(
textStyle: Theme.of(context)
.textTheme
.subtitle2,
fontSize: 15,
fontWeight: FontWeight.w400),
)
],
),
),
),
),
// Card(
// color: Colors.red[50],
// clipBehavior: Clip.antiAlias,
// elevation: 5,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(18),
// ),
// child: InkWell(
// splashColor: Colors.red.withAlpha(30),
// onTap: () {
// // Navigator.push(
// // context,
// // MaterialPageRoute(
// // builder: (context) => PortalPage(
// // link: 'https://www.google.com/')));
// Navigator.of(context).push(PageTransition(
// type: PageTransitionType.rightToLeftWithFade,
// alignment: Alignment.bottomCenter,
// child: FaceReg(),
// ));
// },
// child: Center(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: <Widget>[
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: Image.asset(
// 'assets/images/faceScanner.png',
// height: 60,
// width: 60,
// ),
// ),
// Text(
// 'FRS',
// style: GoogleFonts.lato(
// textStyle: Theme.of(context)
// .textTheme
// .headline5,
// fontWeight: FontWeight.w500),
// ),
// SizedBox(
// height: 15,
// ),
// Text(
// 'Face Registration system',
// style: GoogleFonts.lato(
// textStyle: Theme.of(context)
// .textTheme
// .subtitle2,
// fontSize: 15,
// fontWeight: FontWeight.w400),
// )
// ],
// ),
// ),
// ),
// ),
],
),
Positioned(
Expand Down Expand Up @@ -825,19 +822,34 @@ class _LandingState extends State<Landing> {
}
}


// Test dialog do not remove it
// if necessary to remove please make changes in
// login_page.dart and new_test.dart files
showUserDialog(BuildContext context) {
AlertDialog alert = AlertDialog(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(22)),
actionsAlignment: MainAxisAlignment.center,
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
CircleAvatar(
radius: 14,
backgroundColor: Colors.white70,
backgroundImage: AssetImage('assets/images/icon.png'),
InkWell(
onLongPress: () {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text("This app was made by Prianshu Rai for CogvisionAI"),
),
);
},
child: CircleAvatar(
radius: 14,
backgroundColor: Colors.white70,
backgroundImage: AssetImage('assets/images/icon.png'),
),
),
SizedBox(
width: 20,
),
SizedBox(width: 20,),
Text(
'Hi! ${userDetails["First Name"]}',
style: GoogleFonts.lato(
Expand All @@ -856,28 +868,34 @@ showUserDialog(BuildContext context) {
height: 400.0,
width: 400.0,
child: ListView.builder(
shrinkWrap: true,
shrinkWrap: true,
itemCount: userDetails.length,
itemBuilder: (BuildContext context, int index) {
String key = userDetails.keys.elementAt(index);
return Card(
color: Colors.white,
elevation: 2,
child: ListTile(
title: Text('$key: ', style: GoogleFonts.lato(
textStyle: Theme.of(context).textTheme.headline6,
fontSize: 18,
color: Colors.black54,
// fontSize: 22,
fontWeight: FontWeight.w700,
),),
subtitle: Text(userDetails[key], style: GoogleFonts.lato(
textStyle: Theme.of(context).textTheme.caption,
fontSize: 18,
color: Colors.black54,
// fontSize: 22,
fontWeight: FontWeight.w600,
),),
title: Text(
'$key: ',
style: GoogleFonts.lato(
textStyle: Theme.of(context).textTheme.headline6,
fontSize: 18,
color: Colors.black54,
// fontSize: 22,
fontWeight: FontWeight.w700,
),
),
subtitle: Text(
userDetails[key],
style: GoogleFonts.lato(
textStyle: Theme.of(context).textTheme.caption,
fontSize: 18,
color: Colors.black54,
// fontSize: 22,
fontWeight: FontWeight.w600,
),
),
),
);
}),
Expand All @@ -897,7 +915,10 @@ showUserDialog(BuildContext context) {
onPressed: () {
Navigator.pop(context);
},
icon: Icon(Icons.close_rounded, color: Colors.black38,),
icon: Icon(
Icons.close_rounded,
color: Colors.black38,
),
)
],
);
Expand Down
16 changes: 3 additions & 13 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'face_reg.dart';
import 'login_page.dart';
import 'package:flutter/material.dart';
import 'landingpage.dart';
Expand All @@ -20,15 +19,6 @@ void main() {
);
}


// flutter build apk --split-per-abi
// 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 (expiry: jan 2022)
// you can find this project on https://github.com/PrianshuRai
// to start the login, set - home: LoginPage()
// to start the app, set - home: Landing()
// to start the inputs, set - home: Inputs_page()
// to start the testing_page, set - home: TestClass() or Testing()
// to start the mainpage, set - home: MainPage()

// https://drive.google.com/file/d/1jDtjua4V-lsPBm14kEMR3mwCF7T8ZQQw/view?usp=sharing
// viewer // https://drive.google.com/file/d/1k0DViG-D7f2rcCyLeULGYvCaaynEmPwh/view?usp=sharing
/* go to landingpage.dart file and find "put URL here" comment
change its link to the desired link for the webview.
*/
19 changes: 0 additions & 19 deletions lib/todo.txt

This file was deleted.

Loading

0 comments on commit 18000af

Please sign in to comment.