diff --git a/.fvmrc b/.fvmrc index 9b1b0e0..1497f2f 100644 --- a/.fvmrc +++ b/.fvmrc @@ -1,5 +1,5 @@ { - "flutter": "3.38.9", + "flutter": "3.38.3", "runPubGetOnSdkChanges": true, "updateVscodeSettings": true, "updateGitIgnore": true diff --git a/.vscode/settings.json b/.vscode/settings.json index 28739de..d332d93 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "dart.flutterSdkPath": ".fvm/versions/3.38.9" + "dart.flutterSdkPath": ".fvm/versions/3.38.3" } \ No newline at end of file diff --git a/assets/esign-check.webp b/assets/esign-check.webp deleted file mode 100644 index fa0eb6f..0000000 Binary files a/assets/esign-check.webp and /dev/null differ diff --git a/assets/esign-mobile.webp b/assets/esign-mobile.webp deleted file mode 100644 index a87db6a..0000000 Binary files a/assets/esign-mobile.webp and /dev/null differ diff --git a/lib/pages/index_page.dart b/lib/pages/index_page.dart index 21121e9..a3e9845 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/esign-mobile.webp', size: 160, measureByHeight: false), + const ImageWidget(imagePath: 'assets/logo.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 5adcbd7..0f58031 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/esign-mobile.webp', size: 148, measureByHeight: true), - const Gap(32), + const ImageWidget(imagePath: 'assets/logo.webp', size: 100, measureByHeight: true), + const Gap(58), LoginBoxWidget( title: 'Login', content: Column( @@ -135,7 +135,6 @@ class _LoginPageState extends State { const Gap(8), InputWidget(controller: _passwordController, password: true), const Gap(24), - // ValueListenableBuilder( // valueListenable: passwordNotifier, // builder: (context, password, child) { @@ -146,18 +145,6 @@ 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 7bfafce..ddd2cf8 100644 --- a/lib/pages/validate_detail_page.dart +++ b/lib/pages/validate_detail_page.dart @@ -19,27 +19,21 @@ class ValidateDetailPage extends StatefulWidget { class _ValidateDetailPageState extends State { final _searchController = TextEditingController(); - 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 = []; + final NumberFormat formatter = NumberFormat('#,###.##'); 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 @@ -70,10 +64,19 @@ class _ValidateDetailPageState extends State { ), ), child: SizedBox( - width: MediaQuery.of(context).size.width - 112, + width: MediaQuery.of(context).size.width - 104, 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( @@ -82,153 +85,81 @@ class _ValidateDetailPageState extends State { Column( children: [ TextWidget(text: formatter.format(_total), size: 50, bold: true), - const TextWidget(text: 'Total Signed Applications', size: 16), + TextWidget(text: 'Total Signed Applications', size: 16), ], ), ], ), ), const Gap(16), - 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, + (Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + BoxWidget( + alignment: CrossAxisAlignment.center, + circular: 16, + content: Row( children: [ - 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 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), ], - ); - }, - ), - ), - - // 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), - // // ], - // // ), - // // ], - // // ), - // // ), - // ], - // ), + ), + ), + 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 225d635..a704202 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 * 1.2, + height: MediaQuery.of(context).size.height, decoration: const BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, @@ -187,12 +187,12 @@ class _BarcodeScannerScreenState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - width: 220, - padding: const EdgeInsets.fromLTRB(0, 16, 0, 32), + width: MediaQuery.of(context).size.width - 160, + padding: const EdgeInsets.fromLTRB(8, 16, 8, 26), decoration: BoxDecoration( border: BoxBorder.all(color: redColor), color: redColorShade, - borderRadius: BorderRadius.circular(32), + borderRadius: BorderRadius.circular(12), ), child: Column( children: [ @@ -220,12 +220,12 @@ class _BarcodeScannerScreenState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - width: 220, - padding: const EdgeInsets.fromLTRB(0, 16, 0, 32), + width: MediaQuery.of(context).size.width - 160, + padding: const EdgeInsets.fromLTRB(8, 16, 8, 26), decoration: BoxDecoration( border: BoxBorder.all(color: redColor), color: redColorShade, - borderRadius: BorderRadius.circular(32), + borderRadius: BorderRadius.circular(12), ), child: Column( children: [ @@ -252,13 +252,12 @@ class _BarcodeScannerScreenState extends State { Column( children: [ Container( - // width: MediaQuery.of(context).size.width - 160, - width: 220, - padding: const EdgeInsets.fromLTRB(0, 16, 0, 32), + width: MediaQuery.of(context).size.width - 160, + padding: const EdgeInsets.fromLTRB(8, 16, 8, 26), decoration: BoxDecoration( border: BoxBorder.all(color: greenColor), color: greenColorShade, - borderRadius: BorderRadius.circular(32), + borderRadius: BorderRadius.circular(12), ), child: Column( children: [ @@ -281,7 +280,7 @@ class _BarcodeScannerScreenState extends State { const Gap(24), TextWidget(text: qrResult, bold: true, size: 20, color: greenColor), const Gap(24), - ButtonWidget(text: "Check Signed Applications", disabled: false, onPressed: gotoDetails), + ButtonWidget(text: "Show Details", disabled: false, onPressed: gotoDetails), ], ), ], diff --git a/lib/widgets/text_widget.dart b/lib/widgets/text_widget.dart index efc6e3b..bb3bce9 100644 --- a/lib/widgets/text_widget.dart +++ b/lib/widgets/text_widget.dart @@ -10,27 +10,18 @@ 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 849f662..3523d5a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -73,14 +73,6 @@ 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: @@ -141,10 +133,10 @@ packages: dependency: "direct main" description: name: dio - sha256: b9d46faecab38fc8cc286f80bc4d61a3bb5d4ac49e51ed877b4d6706efe57b25 + sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9 url: "https://pub.dev" source: hosted - version: "5.9.1" + version: "5.9.0" dio_smart_retry: dependency: "direct main" description: @@ -165,10 +157,10 @@ packages: dependency: transitive description: name: equatable - sha256: "3e0141505477fd8ad55d6eb4e7776d3fe8430be8e497ccb1521370c3f21a3e2b" + sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" url: "https://pub.dev" source: hosted - version: "2.0.8" + version: "2.0.7" fake_async: dependency: transitive description: @@ -181,10 +173,10 @@ packages: dependency: transitive description: name: ffi - sha256: d07d37192dbf97461359c1518788f203b0c9102cfd2c35a716b823741219542c + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.1.4" file: dependency: transitive description: @@ -248,38 +240,30 @@ 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: "7974313e217a7771557add6ff2238acb63f635317c35fa590d348fb238f00896" + sha256: eff94d2a6fc79fa8b811dde79c7549808c2346037ee107a1121b4a644c745f2a url: "https://pub.dev" source: hosted - version: "17.1.0" + version: "17.0.1" google_fonts: dependency: "direct main" description: name: google_fonts - sha256: bf1fe61d4a53420a94cbbd4326e07702d247757926f6955af9667765a8324413 + sha256: ba03d03bcaa2f6cb7bd920e3b5027181db75ab524f8891c8bc3aa603885b8055 url: "https://pub.dev" source: hosted - version: "8.0.0" + version: "6.3.3" hashlib: dependency: "direct main" description: name: hashlib - sha256: b12381c77d926cc1a55a6c1dbf6fbbc5c97c05b670e89f6ce3bc59fc673f9dd2 + sha256: "408af9bfb16289d433822635f0b6890e4440b74fe7acd40014983abeef6d33f0" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.2.0" hashlib_codecs: dependency: transitive description: @@ -288,14 +272,6 @@ 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: @@ -316,10 +292,10 @@ packages: dependency: transitive description: name: image - sha256: "492bd52f6c4fbb6ee41f781ff27765ce5f627910e1e0cbecfa3d9add5562604c" + sha256: "51555e36056541237b15b57afc31a0f53d4f9aefd9bd00873a6dc0090e54e332" url: "https://pub.dev" source: hosted - version: "4.7.2" + version: "4.6.0" internet_connection_checker: dependency: "direct main" description: @@ -340,10 +316,10 @@ packages: dependency: transitive description: name: json_annotation - sha256: "805fa86df56383000f640384b282ce0cb8431f1a7a2396de92fb66186d8c57df" + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.10.0" + version: "4.9.0" leak_tracker: dependency: transitive description: @@ -372,10 +348,10 @@ packages: dependency: transitive description: name: lints - sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df" + sha256: a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0 url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.0.0" logging: dependency: transitive description: @@ -424,14 +400,6 @@ 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: @@ -448,14 +416,6 @@ 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: @@ -484,10 +444,10 @@ packages: dependency: transitive description: name: path_provider_foundation - sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699" + sha256: "6d13aece7b3f5c5a9731eaf553ff9dcbc2eff41087fd2df587fd0fed9a3eb0c4" url: "https://pub.dev" source: hosted - version: "2.6.0" + version: "2.5.1" path_provider_linux: dependency: transitive description: @@ -552,14 +512,6 @@ 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 @@ -633,10 +585,10 @@ packages: dependency: "direct main" description: name: vibration - sha256: bfb274be6996651d36bf3e3a947d2122767dae255cfb9ce6ce8ee4b38fb56bad + sha256: "1fd51cb0f91c6d512734ca0e282dd87fbc7f389b6da5f03c77709ba2cf8fa901" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.4" vibration_platform_interface: dependency: transitive description: @@ -702,5 +654,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.10.8 <4.0.0" - flutter: ">=3.38.4" + dart: ">=3.9.2 <4.0.0" + flutter: ">=3.35.0" diff --git a/pubspec.yaml b/pubspec.yaml index 2a732ce..3123689 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.10.8 + sdk: ^3.9.2 dependencies: flutter: sdk: flutter - google_fonts: ^8.0.0 + google_fonts: ^6.3.2 go_router: ^17.0.0 gap: ^3.0.1 internet_connection_checker: ^3.0.1 @@ -46,5 +46,3 @@ flutter: - assets/logo.webp - assets/pat-alcala.webp - assets/esign.webp - - assets/esign-mobile.webp - - assets/esign-check.webp