63 lines
2 KiB
Dart
63 lines
2 KiB
Dart
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';
|
|
|
|
class IndexPage extends StatelessWidget {
|
|
const IndexPage({super.key});
|
|
|
|
@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: <Widget>[
|
|
CircleWidget(
|
|
icon: Icons.thumb_up,
|
|
text: 'Approval',
|
|
onPressed: () {
|
|
gotoApproval();
|
|
},
|
|
),
|
|
CircleWidget(
|
|
icon: Icons.qr_code,
|
|
text: 'Validate',
|
|
onPressed: () {
|
|
gotoValidation();
|
|
},
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|