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

@@ -1,3 +1,5 @@
import 'dart:developer' as developer;
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@@ -6,34 +8,45 @@ import 'package:pshared/provider/organizations.dart';
import 'package:pweb/generated/i18n/app_localizations.dart';
class OrganizationLoader extends StatelessWidget {
final Widget child;
const OrganizationLoader({super.key, required this.child});
@override
Widget build(BuildContext context) => Consumer<OrganizationsProvider>(builder: (context, provider, _) {
if (provider.isLoading) return const Center(child: CircularProgressIndicator());
if (provider.error != null) {
final loc = AppLocalizations.of(context)!;
return Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(loc.errorLogin),
const SizedBox(height: 12),
ElevatedButton(
onPressed: provider.load,
child: Text(loc.retry),
),
],
),
);
}
if ((provider.error == null) && (!provider.isOrganizationSet)) {
return const Center(child: CircularProgressIndicator());
}
return child;
});
Widget build(BuildContext context) => Consumer<OrganizationsProvider>(
builder: (context, provider, _) {
if (provider.isLoading) {
return const Center(child: CircularProgressIndicator());
}
if (provider.error != null) {
assert(() {
developer.log(
'OrganizationLoader: provider.error != null',
name: 'pweb.auth.redirect',
error: provider.error,
);
developer.debugger(
message: 'OrganizationLoader blocked app with error',
);
return true;
}());
final loc = AppLocalizations.of(context)!;
return Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(loc.errorLogin),
const SizedBox(height: 12),
ElevatedButton(onPressed: provider.load, child: Text(loc.retry)),
],
),
);
}
if ((provider.error == null) && (!provider.isOrganizationSet)) {
return const Center(child: CircularProgressIndicator());
}
return child;
},
);
}