fix: resolve payments compilation error and remove redundant datasource layer

This commit is contained in:
2026-01-31 21:45:51 +05:30
parent 9eecde2b84
commit 036722791b
25 changed files with 1857 additions and 813 deletions

View File

@@ -1,17 +1,10 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:staff_authentication/staff_authentication.dart';
import 'package:design_system/design_system.dart';
/// A widget that displays the primary action buttons (Sign Up and Log In)
/// for the Get Started page.
class GetStartedActions extends StatelessWidget {
/// Void callback for when the Sign Up button is pressed.
final VoidCallback onSignUpPressed;
/// Void callback for when the Log In button is pressed.
final VoidCallback onLoginPressed;
/// Creates a [GetStartedActions].
const GetStartedActions({
super.key,
required this.onSignUpPressed,
@@ -22,19 +15,37 @@ class GetStartedActions extends StatelessWidget {
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
// Sign Up Button
UiButton.primary(
text: t.staff_authentication.get_started_page.sign_up_button,
children: [
ElevatedButton(
onPressed: onSignUpPressed,
style: ElevatedButton.styleFrom(
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: 12),
// Log In Button
UiButton.secondary(
text: t.staff_authentication.get_started_page.log_in_button,
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,49 +1,75 @@
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';
import 'package:design_system/design_system.dart';
/// A widget that displays the background for the Get Started page.
class GetStartedBackground extends StatelessWidget {
/// Creates a [GetStartedBackground].
const GetStartedBackground({super.key});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(top: 24.0),
return Container(
color: Colors.white,
child: Column(
children: <Widget>[
children: [
const SizedBox(height: 32),
// Logo
Image.asset(UiImageAssets.logoBlue, height: 40),
Image.asset(
UiImageAssets.logoBlue,
height: 40,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
// Hero Image
Container(
width: 288,
height: 288,
margin: const EdgeInsets.only(bottom: 24),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: UiColors.secondaryForeground.withAlpha(
64,
), // 0.5 opacity
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: ClipOval(
child: Image.network(
'https://images.unsplash.com/photo-1577219491135-ce391730fb2c?w=400&h=400&fit=crop&crop=faces',
fit: BoxFit.cover,
),
),
child: Center(
child: Container(
width: 288,
height: 288,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: const Color(0xFF3A4A5A).withOpacity(0.05),
),
padding: const EdgeInsets.all(8.0),
child: ClipOval(
child: Image.network(
'https://images.unsplash.com/photo-1577219491135-ce391730fb2c?w=400&h=400&fit=crop&crop=faces',
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
return Image.asset(UiImageAssets.logoBlue);
},
),
),
const SizedBox(height: 16),
],
),
),
),
// Pagination dots (Visual only)
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: 24,
height: 8,
decoration: BoxDecoration(
color: UiColors.primary,
borderRadius: BorderRadius.circular(4),
),
),
const SizedBox(width: 8),
Container(
width: 8,
height: 8,
decoration: BoxDecoration(
color: UiColors.primary.withOpacity(0.2),
borderRadius: BorderRadius.circular(4),
),
),
const SizedBox(width: 8),
Container(
width: 8,
height: 8,
decoration: BoxDecoration(
color: UiColors.primary.withOpacity(0.2),
borderRadius: BorderRadius.circular(4),
),
),
],
),
],
),
);

View File

@@ -1,37 +1,24 @@
import 'package:flutter/material.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 {
/// Creates a [GetStartedHeader].
const GetStartedHeader({super.key});
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
RichText(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'Krow Workforce',
style: UiTypography.display1b.copyWith(color: UiColors.textPrimary),
textAlign: TextAlign.center,
text: TextSpan(
style: UiTypography.displayM,
children: <InlineSpan>[
TextSpan(
text: t.staff_authentication.get_started_page.title_part1,
),
TextSpan(
text: t.staff_authentication.get_started_page.title_part2,
style: UiTypography.displayMb.textLink,
),
],
),
),
const SizedBox(height: 16),
Text(
t.staff_authentication.get_started_page.subtitle,
'Find flexible shifts that fit your schedule.',
style: UiTypography.body1r.copyWith(color: UiColors.textSecondary),
textAlign: TextAlign.center,
style: UiTypography.body1r.textSecondary,
),
],
);