ocbo-esign-mobile/lib/pages/index_page.dart

122 lines
4.4 KiB
Dart

import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:go_router/go_router.dart';
import 'package:ocbo_esign_mobile/widgets/image_widget.dart';
import 'package:ocbo_esign_mobile/widgets/menu_widget.dart';
import 'package:ocbo_esign_mobile/widgets/text_widget.dart';
class IndexPage extends StatelessWidget {
const IndexPage({super.key});
@override
Widget build(BuildContext context) {
void gotoApproval() {
context.push('/login');
}
void gotoValidation() {
context.push('/validate');
}
return Scaffold(
resizeToAvoidBottomInset: false,
body: LayoutBuilder(
builder: (context, constraints) {
final screenWidth = constraints.maxWidth;
return Container(
alignment: Alignment.center,
height: MediaQuery.of(context).size.height,
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color.fromRGBO(37, 25, 44, 1),
Color.fromRGBO(22, 33, 44, 1),
Color.fromRGBO(22, 33, 44, 1),
Color.fromRGBO(22, 33, 44, 1),
Color.fromRGBO(25, 46, 41, 1),
],
),
),
child: Center(
child: Column(
children: [
const Gap(88),
const ImageWidget(imagePath: 'assets/esign-mobile.webp', size: 160, measureByHeight: false),
const Gap(20),
const TextWidget(text: "OCBO e-Sign", color: Color.fromRGBO(244, 243, 243, 1), bold: true, size: 34),
Padding(
padding: EdgeInsets.only(right: (screenWidth / 2) - 100),
child: const Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
TextWidget(text: "Mobile", color: Color.fromRGBO(244, 243, 243, 1), bold: false, size: 16),
],
),
),
const Gap(168),
Row(
mainAxisAlignment: MainAxisAlignment.center,
spacing: 32,
children: <Widget>[
MenuWidget(
icon: Icons.person,
text: 'Login',
onPressed: () {
gotoApproval();
},
),
MenuWidget(
icon: Icons.qr_code,
text: 'Validate',
onPressed: () {
gotoValidation();
},
),
],
),
const MaxGap(516),
const Opacity(
opacity: 0.7,
child: Column(
children: [
ImageWidget(imagePath: 'assets/ocbologo.webp', size: 26, measureByHeight: false),
Gap(8),
TextWidget(text: '© 2026 Office of the City Building Official', size: 10),
Gap(8),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TextWidget(
text: "Developed By:",
color: Color.fromRGBO(244, 243, 243, 0.7),
bold: false,
size: 10,
),
Gap(4),
ImageWidget(imagePath: 'assets/pat-alcala.webp', size: 60, measureByHeight: false),
Gap(4),
TextWidget(
text: "Pat Alcala",
color: Color.fromRGBO(244, 243, 243, 0.7),
bold: false,
size: 10,
),
],
),
],
),
),
const Gap(24),
],
),
),
);
},
),
);
}
}