diff --git a/.fvmrc b/.fvmrc index 1497f2f..e3b4d76 100644 --- a/.fvmrc +++ b/.fvmrc @@ -1,5 +1,5 @@ { - "flutter": "3.38.3", + "flutter": "3.35.4", "runPubGetOnSdkChanges": true, "updateVscodeSettings": true, "updateGitIgnore": true diff --git a/.vscode/settings.json b/.vscode/settings.json index d332d93..73ece3e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "dart.flutterSdkPath": ".fvm/versions/3.38.3" -} \ No newline at end of file + "dart.flutterSdkPath": ".fvm/versions/3.35.4" +} diff --git a/lib/main.dart b/lib/main.dart index f919ad0..b9a5654 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,8 +1,6 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; -import 'package:ocbo_esign_validator/pages/approval_page.dart'; import 'package:ocbo_esign_validator/pages/index_page.dart'; -import 'package:ocbo_esign_validator/pages/validate_page.dart'; void main() { runApp(const MyApp()); @@ -10,11 +8,7 @@ void main() { final _router = GoRouter( initialLocation: '/', - routes: [ - GoRoute(name: 'index', path: '/', builder: (context, state) => const IndexPage()), - GoRoute(name: 'approval', path: '/approval', builder: (context, state) => const ApprovalPage()), - GoRoute(name: 'validate', path: '/validate', builder: (context, state) => const ValidatePage()), - ], + routes: [GoRoute(name: 'index', path: '/', builder: (context, state) => const IndexPage())], ); class MyApp extends StatelessWidget { diff --git a/lib/pages/approval_page.dart b/lib/pages/approval_page.dart deleted file mode 100644 index 3361250..0000000 --- a/lib/pages/approval_page.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter/material.dart'; - -class ApprovalPage extends StatelessWidget { - const ApprovalPage({super.key}); - - @override - Widget build(BuildContext context) { - return Scaffold(); - } -} diff --git a/lib/pages/index_page.dart b/lib/pages/index_page.dart index 723a6a8..5f632e1 100644 --- a/lib/pages/index_page.dart +++ b/lib/pages/index_page.dart @@ -1,7 +1,5 @@ import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; -import 'package:go_router/go_router.dart'; -import 'package:ocbo_esign_validator/widgets/circle_widget.dart'; import 'package:ocbo_esign_validator/widgets/image_widget.dart'; import 'package:ocbo_esign_validator/widgets/text_widget.dart'; @@ -10,52 +8,17 @@ class IndexPage extends StatelessWidget { @override Widget build(BuildContext context) { - void gotoApproval() { - context.push('/approval'); - } - - void gotoValidation() { - context.push('/validate'); - } - return Scaffold( - resizeToAvoidBottomInset: false, - body: Container( - alignment: Alignment.center, - height: MediaQuery.of(context).size.height, - decoration: const BoxDecoration(color: Color.fromRGBO(21, 31, 42, 1)), - child: Center( - child: Column( - children: [ - const Gap(88), - const ImageWidget(imagePath: 'assets/logo.png', size: 140, measureByHeight: true), - const Gap(20), - const TextWidget(text: "OCBO e-Sign", color: Color.fromARGB(255, 244, 243, 243), bold: true, size: 32), - const Gap(2), - const TextWidget(text: "Mobile", color: Color.fromARGB(255, 244, 243, 243), bold: true), - const Gap(200), - Row( - mainAxisAlignment: MainAxisAlignment.center, - spacing: 32, - children: [ - CircleWidget( - icon: Icons.thumb_up, - text: 'Approval', - onPressed: () { - gotoApproval(); - }, - ), - CircleWidget( - icon: Icons.qr_code, - text: 'Validate', - onPressed: () { - gotoValidation(); - }, - ), - ], - ), - ], - ), + body: Center( + child: Column( + children: [ + const Gap(88), + const ImageWidget(imagePath: 'assets/logo.png', size: 140, measureByHeight: true), + const Gap(20), + const TextWidget(text: "OCBO e-Sign", color: Colors.black, bold: true, size: 32), + const Gap(2), + const TextWidget(text: "Mobile", color: Colors.black, bold: true), + ], ), ), ); diff --git a/lib/pages/validate_page.dart b/lib/pages/validate_page.dart deleted file mode 100644 index 03da366..0000000 --- a/lib/pages/validate_page.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter/material.dart'; - -class ValidatePage extends StatelessWidget { - const ValidatePage({super.key}); - - @override - Widget build(BuildContext context) { - return Scaffold(); - } -} diff --git a/lib/widgets/circle_widget.dart b/lib/widgets/circle_widget.dart deleted file mode 100644 index 45cb499..0000000 --- a/lib/widgets/circle_widget.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:gap/gap.dart'; -import 'package:ocbo_esign_validator/widgets/text_widget.dart'; - -class CircleWidget extends StatelessWidget { - final IconData? icon; - final String text; - final VoidCallback onPressed; - - const CircleWidget({super.key, required this.icon, required this.text, required this.onPressed}); - - @override - Widget build(BuildContext context) { - return InkWell( - onTap: onPressed, - child: Container( - padding: EdgeInsets.all(16), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(16), - color: Colors.white10, - border: Border.all(color: const Color.fromARGB(77, 255, 255, 255)), - ), - width: 120, - height: 120, - child: Column( - children: [ - const Gap(8), - Icon(icon, color: Colors.white, size: 32), - const Gap(8), - TextWidget(text: text, size: 16), - ], - ), - ), - ); - } -} diff --git a/lib/widgets/image_widget.dart b/lib/widgets/image_widget.dart index 89e59ef..5d7db95 100644 --- a/lib/widgets/image_widget.dart +++ b/lib/widgets/image_widget.dart @@ -5,30 +5,20 @@ class ImageWidget extends StatelessWidget { final double size; final bool measureByHeight; final bool? network; - const ImageWidget({ - super.key, - required this.imagePath, - required this.size, - required this.measureByHeight, - this.network, - }); + const ImageWidget( + {super.key, required this.imagePath, required this.size, required this.measureByHeight, this.network}); @override Widget build(BuildContext context) { return (network == true) ? (measureByHeight) - ? Image.network( - imagePath, - height: size, - cacheHeight: (size * MediaQuery.of(context).devicePixelRatio).round(), - ) - : Image.network( - imagePath, - width: size, - cacheWidth: (size * MediaQuery.of(context).devicePixelRatio).round(), - ) + ? Image.network(imagePath, + height: size, cacheHeight: (size * MediaQuery.of(context).devicePixelRatio).round()) + : Image.network(imagePath, + width: size, cacheWidth: (size * MediaQuery.of(context).devicePixelRatio).round()) : (measureByHeight) - ? Image.asset(imagePath, height: size, cacheHeight: (size * MediaQuery.of(context).devicePixelRatio).round()) - : Image.asset(imagePath, width: size, cacheWidth: (size * MediaQuery.of(context).devicePixelRatio).round()); + ? Image.asset(imagePath, + height: size, cacheHeight: (size * MediaQuery.of(context).devicePixelRatio).round()) + : Image.asset(imagePath, width: size, cacheWidth: (size * MediaQuery.of(context).devicePixelRatio).round()); } } diff --git a/lib/widgets/text_widget.dart b/lib/widgets/text_widget.dart index bb3bce9..58e2f5a 100644 --- a/lib/widgets/text_widget.dart +++ b/lib/widgets/text_widget.dart @@ -25,6 +25,6 @@ class TextWidget extends StatelessWidget { return title == true ? Text(text, style: GoogleFonts.outfit(textStyle: textStyle)) - : Text(text, style: GoogleFonts.roboto(textStyle: textStyle)); + : Text(text, style: GoogleFonts.inter(textStyle: textStyle)); } } diff --git a/pubspec.lock b/pubspec.lock index 976abd6..4aa8965 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -236,10 +236,10 @@ packages: dependency: transitive description: name: meta - sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.16.0" nm: dependency: transitive description: @@ -377,10 +377,10 @@ packages: dependency: transitive description: name: test_api - sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" url: "https://pub.dev" source: hosted - version: "0.7.7" + version: "0.7.6" typed_data: dependency: transitive description: