feat: integrate Google Maps Places Autocomplete for hub address validation

This commit is contained in:
Achintha Isuru
2026-01-31 15:20:59 -05:00
parent f8cd7925f0
commit 1a4a797aa3
2 changed files with 32 additions and 40 deletions

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:design_system/design_system.dart'; import 'package:design_system/design_system.dart';
import 'package:core_localization/core_localization.dart';
class GetStartedActions extends StatelessWidget { class GetStartedActions extends StatelessWidget {
final VoidCallback onSignUpPressed; final VoidCallback onSignUpPressed;
@@ -13,40 +14,15 @@ class GetStartedActions extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final TranslationsStaffAuthenticationGetStartedPageEn i18n =
t.staff_authentication.get_started_page;
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ spacing: UiConstants.space4,
ElevatedButton( children: <Widget>[
onPressed: onSignUpPressed, UiButton.primary(onPressed: onSignUpPressed, text: i18n.sign_up_button),
style: ElevatedButton.styleFrom( UiButton.secondary(onPressed: onLoginPressed, text: i18n.log_in_button),
backgroundColor: UiColors.primary,
foregroundColor: Colors.white,
padding: const EdgeInsets.symmetric(vertical: 16),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
child: Text(
'Create Account',
style: UiTypography.buttonL.copyWith(color: Colors.white),
),
),
const SizedBox(height: 16),
OutlinedButton(
onPressed: onLoginPressed,
style: OutlinedButton.styleFrom(
foregroundColor: UiColors.primary,
side: const BorderSide(color: UiColors.primary),
padding: const EdgeInsets.symmetric(vertical: 16),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
child: Text(
'Log In',
style: UiTypography.buttonL.copyWith(color: UiColors.primary),
),
),
], ],
); );
} }

View File

@@ -1,26 +1,42 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:design_system/design_system.dart'; import 'package:design_system/design_system.dart';
import 'package:staff_authentication/staff_authentication.dart';
/// A widget that displays the welcome text and description on the Get Started page.
class GetStartedHeader extends StatelessWidget { class GetStartedHeader extends StatelessWidget {
/// Creates a [GetStartedHeader].
const GetStartedHeader({super.key}); const GetStartedHeader({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final TranslationsStaffAuthenticationGetStartedPageEn i18n =
t.staff_authentication.get_started_page;
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: <Widget>[
Text( RichText(
'Krow Workforce',
style: UiTypography.display1b.copyWith(color: UiColors.textPrimary),
textAlign: TextAlign.center, textAlign: TextAlign.center,
text: TextSpan(
style: UiTypography.displayM,
children: <InlineSpan>[
TextSpan(
text: i18n.title_part1,
),
TextSpan(
text: i18n.title_part2,
style: UiTypography.displayMb.textLink,
),
],
),
), ),
const SizedBox(height: 16), const SizedBox(height: 16),
Text( Text(
'Find flexible shifts that fit your schedule.', i18n.subtitle,
style: UiTypography.body1r.copyWith(color: UiColors.textSecondary),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: UiTypography.body1r.textSecondary,
), ),
], ],
); );
} }
} }