changed color theme to be black and added the ability to enter the amount in the recipient’s currency

This commit is contained in:
Arseni
2026-03-02 17:41:41 +03:00
parent 17e08ff26f
commit 6bb3ab5063
41 changed files with 618 additions and 239 deletions

View File

@@ -6,25 +6,42 @@ import 'package:pweb/generated/i18n/app_localizations.dart';
class FileFormatSampleDownloadButton extends StatelessWidget {
const FileFormatSampleDownloadButton({
super.key,
required this.theme,
required this.l10n,
required this.onPressed,
});
final ThemeData theme;
final AppLocalizations l10n;
final VoidCallback onPressed;
final double buttonWidth = 220;
@override
Widget build(BuildContext context) {
final linkStyle = theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.primary,
final theme = Theme.of(context);
final l10n = AppLocalizations.of(context)!;
final textStyle = theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.onPrimary,
fontWeight: FontWeight.w500,
);
return TextButton(
onPressed: onPressed,
style: TextButton.styleFrom(padding: EdgeInsets.zero),
child: Text(l10n.downloadSampleCSV, style: linkStyle),
return Align(
alignment: Alignment.center,
child: SizedBox(
width: buttonWidth,
child: FilledButton(
onPressed: onPressed,
style: FilledButton.styleFrom(
backgroundColor: theme.colorScheme.primary,
foregroundColor: theme.colorScheme.onPrimary,
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
),
child: Text(
l10n.downloadSampleCSV,
textAlign: TextAlign.center,
style: textStyle,
),
),
),
);
}
}

View File

@@ -6,15 +6,12 @@ import 'package:pweb/generated/i18n/app_localizations.dart';
class FileFormatSampleHeader extends StatelessWidget {
const FileFormatSampleHeader({
super.key,
required this.theme,
required this.l10n,
});
final ThemeData theme;
final AppLocalizations l10n;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final l10n = AppLocalizations.of(context)!;
final titleStyle = theme.textTheme.bodyLarge?.copyWith(
fontSize: 18,
fontWeight: FontWeight.w600,

View File

@@ -8,15 +8,14 @@ import 'package:pweb/generated/i18n/app_localizations.dart';
class FileFormatSampleTable extends StatelessWidget {
const FileFormatSampleTable({
super.key,
required this.l10n,
required this.rows,
});
final AppLocalizations l10n;
final List<CsvPayoutRow> rows;
@override
Widget build(BuildContext context) {
final l10n = AppLocalizations.of(context)!;
return DataTable(
columnSpacing: 20,
columns: [

View File

@@ -9,29 +9,20 @@ import 'package:pweb/pages/dashboard/payouts/multiple/sections/sample/header.dar
import 'package:pweb/pages/dashboard/payouts/multiple/sections/sample/table.dart';
import 'package:pweb/utils/download.dart';
import 'package:pweb/generated/i18n/app_localizations.dart';
class FileFormatSampleSection extends StatelessWidget {
const FileFormatSampleSection({super.key});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final l10n = AppLocalizations.of(context)!;
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
FileFormatSampleHeader(theme: theme, l10n: l10n),
FileFormatSampleHeader(),
const SizedBox(height: 12),
FileFormatSampleTable(l10n: l10n, rows: sampleRows),
FileFormatSampleTable(rows: sampleRows),
const SizedBox(height: 10),
FileFormatSampleDownloadButton(
theme: theme,
l10n: l10n,
onPressed: _downloadSampleCsv,
),
FileFormatSampleDownloadButton(onPressed: _downloadSampleCsv),
],
);
}