Frontend first draft
This commit is contained in:
24
frontend/pweb/lib/widgets/footer/labels.dart
Normal file
24
frontend/pweb/lib/widgets/footer/labels.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:pweb/widgets/footer/policies.dart';
|
||||
import 'package:pweb/widgets/footer/support.dart';
|
||||
import 'package:pweb/widgets/vspacer.dart';
|
||||
|
||||
|
||||
class FooterLabels extends StatelessWidget {
|
||||
const FooterLabels({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SupportLabel(),
|
||||
const VSpacer(multiplier: 0.25),
|
||||
const PoliciesLabel(),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
58
frontend/pweb/lib/widgets/footer/policies.dart
Normal file
58
frontend/pweb/lib/widgets/footer/policies.dart
Normal file
@@ -0,0 +1,58 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
class PoliciesLabel extends StatelessWidget {
|
||||
const PoliciesLabel({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context).textTheme;
|
||||
final localizations = AppLocalizations.of(context)!;
|
||||
return Wrap(
|
||||
spacing: 8,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// Navigate to Terms of Service
|
||||
},
|
||||
child: Text(
|
||||
localizations.footerTermsOfService,
|
||||
style: theme.labelSmall?.copyWith(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Text('|'),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// Navigate to Privacy Policy
|
||||
},
|
||||
child: Text(
|
||||
localizations.footerPrivacyPolicy,
|
||||
style: theme.labelSmall?.copyWith(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Text('|'),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// Navigate to Cookie Policy
|
||||
},
|
||||
child: Text(
|
||||
localizations.footerCookiePolicy,
|
||||
style: theme.labelSmall?.copyWith(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
49
frontend/pweb/lib/widgets/footer/support.dart
Normal file
49
frontend/pweb/lib/widgets/footer/support.dart
Normal file
@@ -0,0 +1,49 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:pweb/widgets/hspacer.dart';
|
||||
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
|
||||
class SupportLabel extends StatelessWidget {
|
||||
const SupportLabel({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context).textTheme;
|
||||
final localizations = AppLocalizations.of(context)!;
|
||||
return Row(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'${localizations.footerSupport}: ',
|
||||
style: theme.labelSmall,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// Add your email handling logic here
|
||||
},
|
||||
child: Text(
|
||||
localizations.footerEmail, // Localized email
|
||||
style: theme.labelSmall?.copyWith(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
),
|
||||
const HSpacer(multiplier: 0.25),
|
||||
const Text('|'),
|
||||
const HSpacer(multiplier: 0.25),
|
||||
Text(
|
||||
'${localizations.footerPhoneLabel}: ${localizations.footerPhone}', // Localized phone
|
||||
style: theme.labelSmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
28
frontend/pweb/lib/widgets/footer/widget.dart
Normal file
28
frontend/pweb/lib/widgets/footer/widget.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:pweb/widgets/footer/labels.dart';
|
||||
import 'package:pweb/widgets/logo.dart';
|
||||
import 'package:pweb/widgets/hspacer.dart';
|
||||
|
||||
|
||||
class FooterWidget extends StatelessWidget {
|
||||
const FooterWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => ClipRect(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 16),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const ServiceLogo(),
|
||||
const HSpacer(),
|
||||
const FooterLabels(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user