diff --git a/assets/texts/demo_text.txt b/assets/texts/demo_text.txt index 95d09f2..1d9dfb3 100644 --- a/assets/texts/demo_text.txt +++ b/assets/texts/demo_text.txt @@ -1 +1,11 @@ -hello world \ No newline at end of file +// 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 diff --git a/lib/landingpage.dart b/lib/landingpage.dart index e2ad2eb..3707518 100644 --- a/lib/landingpage.dart +++ b/lib/landingpage.dart @@ -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 { @@ -24,6 +23,9 @@ class Landing extends StatefulWidget { class _LandingState extends State { int _bellCounter = 0; + // this is a test function + // but before removing it please check + // function call properly static Route _userdialogBuilder( BuildContext context, Object? arguments) { return DialogRoute( @@ -362,20 +364,12 @@ class _LandingState extends State { 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"), @@ -395,7 +389,7 @@ class _LandingState extends State { ), ), Text( - 'Web View', + 'Web View', // change name of the tile style: GoogleFonts.lato( textStyle: Theme.of(context) .textTheme @@ -440,6 +434,7 @@ class _LandingState extends State { type: PageTransitionType.rightToLeftWithFade, alignment: Alignment.bottomCenter, child: PortalPage( + // put the URL here link: "http://184.105.174.77:8086/mobile2report"), )); @@ -500,6 +495,7 @@ class _LandingState extends State { type: PageTransitionType.rightToLeftWithFade, alignment: Alignment.bottomCenter, child: PortalPage( + // put the URL here link: "http://184.105.174.77:8086/mobile1iot?userId=$globaluserid"), )); @@ -559,8 +555,9 @@ class _LandingState extends State { 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( @@ -657,64 +654,64 @@ class _LandingState extends State { ), ), ), - 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: [ - 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: [ + // 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( @@ -825,6 +822,10 @@ class _LandingState extends State { } } + +// 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)), @@ -832,12 +833,23 @@ showUserDialog(BuildContext context) { title: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - 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( @@ -856,7 +868,7 @@ 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); @@ -864,20 +876,26 @@ showUserDialog(BuildContext context) { 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, + ), + ), ), ); }), @@ -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, + ), ) ], ); diff --git a/lib/main.dart b/lib/main.dart index 5de0569..7d6397b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,4 +1,3 @@ -import 'face_reg.dart'; import 'login_page.dart'; import 'package:flutter/material.dart'; import 'landingpage.dart'; @@ -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. + */ \ No newline at end of file diff --git a/lib/todo.txt b/lib/todo.txt deleted file mode 100644 index 9cbfd89..0000000 --- a/lib/todo.txt +++ /dev/null @@ -1,19 +0,0 @@ -//@ TODO send username, device_id and password to api -- done -//@ TODO get data from other point -- done -//@ TODO filter out username and password is there or not -- done -//@ TODO get android id and send userid password and android id to the other end --done -//@ TODO if success navigate to landing page else give dialog to re-enter details --done -//@ TODO make a global bool variable for signin value -- done -//@ TODO make bool check for the first screen to be landing page or signin page --done -//@ TODO make txt file and store it in document folder -//@ TODO send it via share menu -//@ TODO visual enhacements -// *********************************************************************** - -//@ TODO create face_reg page -- done -//@ TODO add a tile for taking image -- done -//@ TODO give pop up for choosing camera or galary -//@ TODO save image into folder of documents -//@ TODO add second tile for choosing from camera or galllary -//@ TODO add API call to send the selected image and send for the verification -//@ TODO add tile for face regis. on the landing page -- done \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 0e7f1d1..6bbb799 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -28,7 +28,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.1" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -42,7 +42,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: @@ -260,7 +260,7 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" meta: dependency: transitive description: @@ -475,7 +475,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.2" + version: "0.4.3" typed_data: dependency: transitive description: @@ -538,7 +538,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" webview_flutter: dependency: "direct main" description: