feat(proj): init

This commit is contained in:
vl.arkhangelskii
2026-09-21 04:06:43 +03:00
commit c956b94983
1076 changed files with 50876 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import 'package:flutter/cupertino.dart';
import 'package:please_pay_me/core/config/app_config.dart';
import 'package:please_pay_me/core/config/env_file.dart';
import 'package:please_pay_me/ui/ui.dart';
import 'package:url_launcher/url_launcher.dart';
abstract final class LegalLinks {
static const offer = '/legal/offer';
static const privacy = '/legal/privacy';
static const consent = '/legal/consent';
static const cookies = '/legal/cookies';
static Uri resolve(String cabinetUrl, String path) {
final base = cabinetUrl.isEmpty ? AppConfig.productionOrigin : cabinetUrl;
return Uri.parse('${normalizeUrl(base)}$path');
}
}
Future<void> openLegalDocument(BuildContext context, Uri uri) async {
final opened = await launchUrl(uri, mode: LaunchMode.externalApplication);
if (!opened && context.mounted) {
await showAppToast(context, message: 'Не удалось открыть документ');
}
}