diff --git a/.fvmrc b/.fvmrc index 1497f2f..9b1b0e0 100644 --- a/.fvmrc +++ b/.fvmrc @@ -1,5 +1,5 @@ { - "flutter": "3.38.3", + "flutter": "3.38.9", "runPubGetOnSdkChanges": true, "updateVscodeSettings": true, "updateGitIgnore": true diff --git a/.vscode/settings.json b/.vscode/settings.json index d332d93..28739de 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "dart.flutterSdkPath": ".fvm/versions/3.38.3" + "dart.flutterSdkPath": ".fvm/versions/3.38.9" } \ No newline at end of file diff --git a/assets/esign-check.webp b/assets/esign-check.webp new file mode 100644 index 0000000..fa0eb6f Binary files /dev/null and b/assets/esign-check.webp differ diff --git a/assets/esign-mobile.webp b/assets/esign-mobile.webp new file mode 100644 index 0000000..a87db6a Binary files /dev/null and b/assets/esign-mobile.webp differ diff --git a/lib/pages/index_page.dart b/lib/pages/index_page.dart index a3e9845..21121e9 100644 --- a/lib/pages/index_page.dart +++ b/lib/pages/index_page.dart @@ -44,7 +44,7 @@ class IndexPage extends StatelessWidget { child: Column( children: [ const Gap(88), - const ImageWidget(imagePath: 'assets/logo.webp', size: 160, measureByHeight: false), + const ImageWidget(imagePath: 'assets/esign-mobile.webp', size: 160, measureByHeight: false), const Gap(20), const TextWidget( text: "OCBO e-Sign", diff --git a/lib/pages/login_page.dart b/lib/pages/login_page.dart index 0f58031..5adcbd7 100644 --- a/lib/pages/login_page.dart +++ b/lib/pages/login_page.dart @@ -120,8 +120,8 @@ class _LoginPageState extends State { child: Column( children: [ const Gap(88), - const ImageWidget(imagePath: 'assets/logo.webp', size: 100, measureByHeight: true), - const Gap(58), + const ImageWidget(imagePath: 'assets/esign-mobile.webp', size: 148, measureByHeight: true), + const Gap(32), LoginBoxWidget( title: 'Login', content: Column( @@ -135,6 +135,7 @@ class _LoginPageState extends State { const Gap(8), InputWidget(controller: _passwordController, password: true), const Gap(24), + // ValueListenableBuilder( // valueListenable: passwordNotifier, // builder: (context, password, child) { @@ -145,6 +146,18 @@ class _LoginPageState extends State { // ); // }, // ), + ValueListenableBuilder( + valueListenable: passwordNotifier, + builder: (context, password, child) { + return ButtonWidget( + text: _passwordController.text.isNotEmpty + ? "Stop typing, login not ready" + : 'Not yet functional', + onPressed: _ignoreButton, + disabled: true, + ); + }, + ), ], ), ), diff --git a/lib/pages/validate_detail_page.dart b/lib/pages/validate_detail_page.dart index ddd2cf8..7bfafce 100644 --- a/lib/pages/validate_detail_page.dart +++ b/lib/pages/validate_detail_page.dart @@ -19,21 +19,27 @@ class ValidateDetailPage extends StatefulWidget { class _ValidateDetailPageState extends State { final _searchController = TextEditingController(); - late int _total = 0; final NumberFormat formatter = NumberFormat('#,###.##'); + final dateFormatter = DateFormat('yyyy-MM-dd'); + // final Color greenColor = const Color(0xFF4CCE51); + late int _total = 0; + late List _applicationList = []; + late List _dateList = []; void _getTotalSigned() async { final name = await blocGetQr(context); final responseCount = await getApi('get-transactions-count', name, null); final total = responseCount['result']; + final response = await getApi('get-transactions', name, null); + final applicationNoList = response['result']; + final dateList = response['result2']; + setState(() { _total = double.parse(total).toInt(); + _applicationList = applicationNoList; + _dateList = dateList; }); - - // final response = await getApi('get-transactions', name, null); - // final applicationNoList = response['result']; - // final dateList = response['result2']; } @override @@ -64,19 +70,10 @@ class _ValidateDetailPageState extends State { ), ), child: SizedBox( - width: MediaQuery.of(context).size.width - 104, + width: MediaQuery.of(context).size.width - 112, child: Column( children: [ const Gap(88), - ClipRRect( - borderRadius: BorderRadius.circular(36), - child: InputWidget( - controller: _searchController, - password: false, - placeholder: 'Search Application Number', - ), - ), - const Gap(24), BoxWidget( circular: 16, content: Row( @@ -85,81 +82,153 @@ class _ValidateDetailPageState extends State { Column( children: [ TextWidget(text: formatter.format(_total), size: 50, bold: true), - TextWidget(text: 'Total Signed Applications', size: 16), + const TextWidget(text: 'Total Signed Applications', size: 16), ], ), ], ), ), const Gap(16), - (Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - BoxWidget( - alignment: CrossAxisAlignment.center, - circular: 16, - content: Row( + ClipRRect( + // borderRadius: BorderRadius.circular(36), + child: InputWidget( + controller: _searchController, + password: false, + placeholder: 'Search Application Number', + ), + ), + const Gap(24), + + // ListView( + // scrollDirection: Axis.horizontal, + // padding: EdgeInsets.symmetric(horizontal: 16), + // children: [ + // // BoxWidget( + // // alignment: CrossAxisAlignment.center, + // // circular: 16, + // // content: Row( + // // children: [ + // // const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true), + // // const Gap(16), + // // Column( + // // crossAxisAlignment: CrossAxisAlignment.start, + // // children: [ + // // TextWidget(text: '23-000123', size: 18, bold: true), + // // const Gap(4), + // // TextWidget(text: 'Total Signed Applications', size: 12), + // // ], + // // ), + // // ], + // // ), + // // ), + // ], + // ), + Expanded( + child: ListView.builder( + itemCount: _total, + itemBuilder: (BuildContext context, int index) { + return Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisAlignment: MainAxisAlignment.start, children: [ - const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true), - const Gap(16), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - TextWidget(text: '23-000123', size: 18, bold: true), - const Gap(4), - TextWidget(text: 'Total Signed Applications', size: 12), - ], - ), - ], - ), - ), - const Gap(8), - BoxWidget( - alignment: CrossAxisAlignment.center, - circular: 16, - content: Row( - children: [ - const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true), - const Gap(16), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - TextWidget(text: '23-000123', size: 18, bold: true), - const Gap(4), - TextWidget(text: 'Total Signed Applications', size: 12), - const Gap(4), - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [TextWidget(text: 'Dates', size: 8)], + BoxWidget( + alignment: CrossAxisAlignment.center, + circular: 16, + content: Row( + children: [ + const ImageWidget(imagePath: 'assets/esign-check.webp', size: 40, measureByHeight: true), + const Gap(16), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextWidget(text: _applicationList[index], size: 18, bold: true), + const Gap(4), + SizedBox( + width: 190, + child: TextWidget(text: '8990 Housing Development Corporation', size: 10), + ), + const Gap(4), + TextWidget(text: _dateList[index], size: 10, opacity: 0.8), + ], ), - ), - ], + ], + ), ), + const Gap(8), ], - ), - ), - const Gap(8), - BoxWidget( - alignment: CrossAxisAlignment.center, - circular: 16, - content: Row( - children: [ - const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true), - const Gap(16), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - TextWidget(text: '23-000123', size: 18, bold: true), - const Gap(4), - TextWidget(text: 'Total Signed Applications', size: 12), - ], - ), - ], - ), - ), - ], - )), + ); + }, + ), + ), + + // Column( + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // BoxWidget( + // alignment: CrossAxisAlignment.center, + // circular: 16, + // content: Row( + // children: [ + // const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true), + // const Gap(16), + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // TextWidget(text: '23-000123', size: 18, bold: true), + // const Gap(4), + // TextWidget(text: 'Total Signed Applications', size: 12), + // ], + // ), + // ], + // ), + // ), + // // const Gap(8), + // // BoxWidget( + // // alignment: CrossAxisAlignment.center, + // // circular: 16, + // // content: Row( + // // children: [ + // // const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true), + // // const Gap(16), + // // Column( + // // crossAxisAlignment: CrossAxisAlignment.start, + // // children: [ + // // TextWidget(text: '23-000123', size: 18, bold: true), + // // const Gap(4), + // // TextWidget(text: 'Total Signed Applications', size: 12), + // // const Gap(4), + // // Expanded( + // // child: Row( + // // mainAxisAlignment: MainAxisAlignment.end, + // // children: [TextWidget(text: 'Dates', size: 8)], + // // ), + // // ), + // // ], + // // ), + // // ], + // // ), + // // ), + // // const Gap(8), + // // BoxWidget( + // // alignment: CrossAxisAlignment.center, + // // circular: 16, + // // content: Row( + // // children: [ + // // const ImageWidget(imagePath: 'assets/esign.webp', size: 48, measureByHeight: true), + // // const Gap(16), + // // Column( + // // crossAxisAlignment: CrossAxisAlignment.start, + // // children: [ + // // TextWidget(text: '23-000123', size: 18, bold: true), + // // const Gap(4), + // // TextWidget(text: 'Total Signed Applications', size: 12), + // // ], + // // ), + // // ], + // // ), + // // ), + // ], + // ), ], ), ), diff --git a/lib/pages/validate_page.dart b/lib/pages/validate_page.dart index a704202..225d635 100644 --- a/lib/pages/validate_page.dart +++ b/lib/pages/validate_page.dart @@ -113,7 +113,7 @@ class _BarcodeScannerScreenState extends State { resizeToAvoidBottomInset: false, body: Container( alignment: Alignment.center, - height: MediaQuery.of(context).size.height, + height: MediaQuery.of(context).size.height * 1.2, decoration: const BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, @@ -187,12 +187,12 @@ class _BarcodeScannerScreenState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - width: MediaQuery.of(context).size.width - 160, - padding: const EdgeInsets.fromLTRB(8, 16, 8, 26), + width: 220, + padding: const EdgeInsets.fromLTRB(0, 16, 0, 32), decoration: BoxDecoration( border: BoxBorder.all(color: redColor), color: redColorShade, - borderRadius: BorderRadius.circular(12), + borderRadius: BorderRadius.circular(32), ), child: Column( children: [ @@ -220,12 +220,12 @@ class _BarcodeScannerScreenState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - width: MediaQuery.of(context).size.width - 160, - padding: const EdgeInsets.fromLTRB(8, 16, 8, 26), + width: 220, + padding: const EdgeInsets.fromLTRB(0, 16, 0, 32), decoration: BoxDecoration( border: BoxBorder.all(color: redColor), color: redColorShade, - borderRadius: BorderRadius.circular(12), + borderRadius: BorderRadius.circular(32), ), child: Column( children: [ @@ -252,12 +252,13 @@ class _BarcodeScannerScreenState extends State { Column( children: [ Container( - width: MediaQuery.of(context).size.width - 160, - padding: const EdgeInsets.fromLTRB(8, 16, 8, 26), + // width: MediaQuery.of(context).size.width - 160, + width: 220, + padding: const EdgeInsets.fromLTRB(0, 16, 0, 32), decoration: BoxDecoration( border: BoxBorder.all(color: greenColor), color: greenColorShade, - borderRadius: BorderRadius.circular(12), + borderRadius: BorderRadius.circular(32), ), child: Column( children: [ @@ -280,7 +281,7 @@ class _BarcodeScannerScreenState extends State { const Gap(24), TextWidget(text: qrResult, bold: true, size: 20, color: greenColor), const Gap(24), - ButtonWidget(text: "Show Details", disabled: false, onPressed: gotoDetails), + ButtonWidget(text: "Check Signed Applications", disabled: false, onPressed: gotoDetails), ], ), ], diff --git a/lib/widgets/text_widget.dart b/lib/widgets/text_widget.dart index bb3bce9..efc6e3b 100644 --- a/lib/widgets/text_widget.dart +++ b/lib/widgets/text_widget.dart @@ -10,18 +10,27 @@ class TextWidget extends StatelessWidget { final bool? underlined; final Color? color; - const TextWidget( - {super.key, required this.text, this.size, this.opacity, this.bold, this.title, this.underlined, this.color}); + const TextWidget({ + super.key, + required this.text, + this.size, + this.opacity, + this.bold, + this.title, + this.underlined, + this.color, + }); @override Widget build(BuildContext context) { final textStyle = TextStyle( - color: color ?? Color.fromRGBO(255, 255, 255, opacity ?? 1), - fontSize: size ?? 28, - fontWeight: bold == true ? FontWeight.bold : FontWeight.normal, - decoration: underlined == true ? TextDecoration.underline : TextDecoration.none, - decorationColor: color ?? const Color.fromRGBO(255, 255, 255, 1), - decorationThickness: 1); + color: color ?? Color.fromRGBO(255, 255, 255, opacity ?? 1), + fontSize: size ?? 28, + fontWeight: bold == true ? FontWeight.bold : FontWeight.normal, + decoration: underlined == true ? TextDecoration.underline : TextDecoration.none, + decorationColor: color ?? const Color.fromRGBO(255, 255, 255, 1), + decorationThickness: 1, + ); return title == true ? Text(text, style: GoogleFonts.outfit(textStyle: textStyle)) diff --git a/pubspec.lock b/pubspec.lock index 3523d5a..849f662 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -73,6 +73,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.2" + code_assets: + dependency: transitive + description: + name: code_assets + sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687" + url: "https://pub.dev" + source: hosted + version: "1.0.0" collection: dependency: transitive description: @@ -133,10 +141,10 @@ packages: dependency: "direct main" description: name: dio - sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9 + sha256: b9d46faecab38fc8cc286f80bc4d61a3bb5d4ac49e51ed877b4d6706efe57b25 url: "https://pub.dev" source: hosted - version: "5.9.0" + version: "5.9.1" dio_smart_retry: dependency: "direct main" description: @@ -157,10 +165,10 @@ packages: dependency: transitive description: name: equatable - sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" + sha256: "3e0141505477fd8ad55d6eb4e7776d3fe8430be8e497ccb1521370c3f21a3e2b" url: "https://pub.dev" source: hosted - version: "2.0.7" + version: "2.0.8" fake_async: dependency: transitive description: @@ -173,10 +181,10 @@ packages: dependency: transitive description: name: ffi - sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" + sha256: d07d37192dbf97461359c1518788f203b0c9102cfd2c35a716b823741219542c url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" file: dependency: transitive description: @@ -240,30 +248,38 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.1" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" go_router: dependency: "direct main" description: name: go_router - sha256: eff94d2a6fc79fa8b811dde79c7549808c2346037ee107a1121b4a644c745f2a + sha256: "7974313e217a7771557add6ff2238acb63f635317c35fa590d348fb238f00896" url: "https://pub.dev" source: hosted - version: "17.0.1" + version: "17.1.0" google_fonts: dependency: "direct main" description: name: google_fonts - sha256: ba03d03bcaa2f6cb7bd920e3b5027181db75ab524f8891c8bc3aa603885b8055 + sha256: bf1fe61d4a53420a94cbbd4326e07702d247757926f6955af9667765a8324413 url: "https://pub.dev" source: hosted - version: "6.3.3" + version: "8.0.0" hashlib: dependency: "direct main" description: name: hashlib - sha256: "408af9bfb16289d433822635f0b6890e4440b74fe7acd40014983abeef6d33f0" + sha256: b12381c77d926cc1a55a6c1dbf6fbbc5c97c05b670e89f6ce3bc59fc673f9dd2 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" hashlib_codecs: dependency: transitive description: @@ -272,6 +288,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.1" + hooks: + dependency: transitive + description: + name: hooks + sha256: "7a08a0d684cb3b8fb604b78455d5d352f502b68079f7b80b831c62220ab0a4f6" + url: "https://pub.dev" + source: hosted + version: "1.0.1" http: dependency: transitive description: @@ -292,10 +316,10 @@ packages: dependency: transitive description: name: image - sha256: "51555e36056541237b15b57afc31a0f53d4f9aefd9bd00873a6dc0090e54e332" + sha256: "492bd52f6c4fbb6ee41f781ff27765ce5f627910e1e0cbecfa3d9add5562604c" url: "https://pub.dev" source: hosted - version: "4.6.0" + version: "4.7.2" internet_connection_checker: dependency: "direct main" description: @@ -316,10 +340,10 @@ packages: dependency: transitive description: name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + sha256: "805fa86df56383000f640384b282ce0cb8431f1a7a2396de92fb66186d8c57df" url: "https://pub.dev" source: hosted - version: "4.9.0" + version: "4.10.0" leak_tracker: dependency: transitive description: @@ -348,10 +372,10 @@ packages: dependency: transitive description: name: lints - sha256: a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0 + sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df" url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "6.1.0" logging: dependency: transitive description: @@ -400,6 +424,14 @@ packages: url: "https://pub.dev" source: hosted version: "7.1.4" + native_toolchain_c: + dependency: transitive + description: + name: native_toolchain_c + sha256: "89e83885ba09da5fdf2cdacc8002a712ca238c28b7f717910b34bcd27b0d03ac" + url: "https://pub.dev" + source: hosted + version: "0.17.4" nested: dependency: transitive description: @@ -416,6 +448,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.0" + objective_c: + dependency: transitive + description: + name: objective_c + sha256: "983c7fa1501f6dcc0cb7af4e42072e9993cb28d73604d25ebf4dab08165d997e" + url: "https://pub.dev" + source: hosted + version: "9.2.5" path: dependency: transitive description: @@ -444,10 +484,10 @@ packages: dependency: transitive description: name: path_provider_foundation - sha256: "6d13aece7b3f5c5a9731eaf553ff9dcbc2eff41087fd2df587fd0fed9a3eb0c4" + sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699" url: "https://pub.dev" source: hosted - version: "2.5.1" + version: "2.6.0" path_provider_linux: dependency: transitive description: @@ -512,6 +552,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.5+1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" + source: hosted + version: "2.2.0" sky_engine: dependency: transitive description: flutter @@ -585,10 +633,10 @@ packages: dependency: "direct main" description: name: vibration - sha256: "1fd51cb0f91c6d512734ca0e282dd87fbc7f389b6da5f03c77709ba2cf8fa901" + sha256: bfb274be6996651d36bf3e3a947d2122767dae255cfb9ce6ce8ee4b38fb56bad url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" vibration_platform_interface: dependency: transitive description: @@ -654,5 +702,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.9.2 <4.0.0" - flutter: ">=3.35.0" + dart: ">=3.10.8 <4.0.0" + flutter: ">=3.38.4" diff --git a/pubspec.yaml b/pubspec.yaml index 3123689..2a732ce 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,13 +5,13 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ^3.9.2 + sdk: ^3.10.8 dependencies: flutter: sdk: flutter - google_fonts: ^6.3.2 + google_fonts: ^8.0.0 go_router: ^17.0.0 gap: ^3.0.1 internet_connection_checker: ^3.0.1 @@ -46,3 +46,5 @@ flutter: - assets/logo.webp - assets/pat-alcala.webp - assets/esign.webp + - assets/esign-mobile.webp + - assets/esign-check.webp