mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-23 17:26:35 +00:00
refactor: Remove 'unused' warnings
This commit is contained in:
parent
b26e22cd4e
commit
b53bb6d4dd
|
@ -7,16 +7,11 @@ import 'package:selfprivacy/logic/cubit/forms/validations/validations.dart';
|
||||||
|
|
||||||
class DnsProviderFormCubit extends FormCubit {
|
class DnsProviderFormCubit extends FormCubit {
|
||||||
DnsProviderFormCubit(this.initializingCubit) {
|
DnsProviderFormCubit(this.initializingCubit) {
|
||||||
//final RegExp regExp = initializingCubit.getDnsProviderApiTokenValidation();
|
|
||||||
apiKey = FieldCubit(
|
apiKey = FieldCubit(
|
||||||
initalValue: '',
|
initalValue: '',
|
||||||
validations: [
|
validations: [
|
||||||
RequiredStringValidation('validations.required'.tr()),
|
RequiredStringValidation('validations.required'.tr()),
|
||||||
/*ValidationModel<String>(
|
LengthStringNotEqualValidation(40)
|
||||||
regExp.hasMatch,
|
|
||||||
'validations.invalid_format'.tr(),
|
|
||||||
),*/
|
|
||||||
//LengthStringNotEqualValidation(40)
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -181,48 +181,44 @@ class InitializingPage extends StatelessWidget {
|
||||||
BlocProvider(
|
BlocProvider(
|
||||||
create: (final context) => DnsProviderFormCubit(initializingCubit),
|
create: (final context) => DnsProviderFormCubit(initializingCubit),
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (final context) {
|
builder: (final context) => Column(
|
||||||
final formCubitState = context.watch<DnsProviderFormCubit>().state;
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
return Column(
|
Image.asset(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
'assets/images/logos/cloudflare.png',
|
||||||
children: [
|
width: 150,
|
||||||
Image.asset(
|
),
|
||||||
'assets/images/logos/cloudflare.png',
|
const SizedBox(height: 10),
|
||||||
width: 150,
|
BrandText.h2('initializing.connect_cloudflare'.tr()),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
BrandText.body2('initializing.manage_domain_dns'.tr()),
|
||||||
|
const Spacer(),
|
||||||
|
CubitFormTextField(
|
||||||
|
formFieldCubit: context.read<DnsProviderFormCubit>().apiKey,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
scrollPadding: const EdgeInsets.only(bottom: 70),
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: 'initializing.cloudflare_api_token'.tr(),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
),
|
||||||
BrandText.h2('initializing.connect_cloudflare'.tr()),
|
const Spacer(),
|
||||||
const SizedBox(height: 10),
|
BrandButton.rised(
|
||||||
BrandText.body2('initializing.manage_domain_dns'.tr()),
|
onPressed: () =>
|
||||||
const Spacer(),
|
context.read<DnsProviderFormCubit>().trySubmit(),
|
||||||
CubitFormTextField(
|
text: 'basis.connect'.tr(),
|
||||||
formFieldCubit: context.read<DnsProviderFormCubit>().apiKey,
|
),
|
||||||
textAlign: TextAlign.center,
|
const SizedBox(height: 10),
|
||||||
scrollPadding: const EdgeInsets.only(bottom: 70),
|
BrandButton.text(
|
||||||
decoration: InputDecoration(
|
onPressed: () => _showModal(
|
||||||
hintText: 'initializing.cloudflare_api_token'.tr(),
|
context,
|
||||||
|
const _HowTo(
|
||||||
|
fileName: 'how_cloudflare',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
title: 'initializing.how'.tr(),
|
||||||
BrandButton.rised(
|
),
|
||||||
onPressed: () =>
|
],
|
||||||
context.read<DnsProviderFormCubit>().trySubmit(),
|
),
|
||||||
text: 'basis.connect'.tr(),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
BrandButton.text(
|
|
||||||
onPressed: () => _showModal(
|
|
||||||
context,
|
|
||||||
const _HowTo(
|
|
||||||
fileName: 'how_cloudflare',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
title: 'initializing.how'.tr(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue