Initial commit
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
import 'package:cargocalculaterapp/core/extension/build_context_extension.dart';
|
||||
import 'package:cargocalculaterapp/core/theme/colors/app_colors.dart';
|
||||
import 'package:cargocalculaterapp/generated/l10n.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
import '../../../../../core/utils/app_utils.dart';
|
||||
|
||||
class DeleteProfileDialog extends StatelessWidget {
|
||||
const DeleteProfileDialog({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Dialog(
|
||||
backgroundColor: context.color.scaffoldBackgroundColor,
|
||||
insetPadding: AppUtils.kPaddingAll16,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 32,
|
||||
left: 16,
|
||||
right: 16,
|
||||
bottom: 24,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
"assets/svg/ic_warning.svg",
|
||||
height: 48,
|
||||
width: 48,
|
||||
),
|
||||
AppUtils.kBoxHeight16,
|
||||
Text(
|
||||
AppLocalization.current.delete_account_desc,
|
||||
style: context.text.secondaryText14,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
AppUtils.kBoxHeight16,
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
borderRadius: AppUtils.kBorderRadius24,
|
||||
child: Ink(
|
||||
decoration: BoxDecoration(
|
||||
color: context.color.scaffoldBackgroundColor,
|
||||
borderRadius: AppUtils.kBorderRadius24,
|
||||
border: Border.all(color: context.color.primaryColor),
|
||||
),
|
||||
height: 56,
|
||||
padding: AppUtils.kPaddingHor16,
|
||||
child: Center(
|
||||
child: Text(
|
||||
AppLocalization.current.cancel,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: context.color.textColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
AppUtils.kBoxWidth16,
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: LightThemeColors.errorColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context, true);
|
||||
},
|
||||
child: Text(AppLocalization.current.delete),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
import 'package:cargocalculaterapp/core/extension/build_context_extension.dart';
|
||||
import 'package:cargocalculaterapp/core/utils/app_utils.dart';
|
||||
import 'package:cargocalculaterapp/generated/l10n.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import '../../../../../core/app_bloc/app_bloc.dart';
|
||||
|
||||
class LanguageDialog extends StatelessWidget {
|
||||
const LanguageDialog({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: context.color.scaffoldBackgroundColor,
|
||||
borderRadius: AppUtils.kBorderRadiusTop24,
|
||||
),
|
||||
child: SafeArea(
|
||||
minimum: AppUtils.kPaddingL16R16T16B24,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
AppLocalization.current.change_language,
|
||||
style: context.text.orderTitle,
|
||||
),
|
||||
AppUtils.kBoxHeight32,
|
||||
InkWell(
|
||||
onTap: () {
|
||||
context.read<AppBloc>().add(const AppChangeLocale("uz"));
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Ink(
|
||||
child: Row(
|
||||
children: [
|
||||
const Image(
|
||||
width: 20,
|
||||
height: 20,
|
||||
image: AssetImage("assets/png/ic_uz.png"),
|
||||
),
|
||||
AppUtils.kBoxWidth16,
|
||||
Text("O'zbek", style: context.text.profileCategory),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
AppUtils.kBoxHeight32,
|
||||
InkWell(
|
||||
onTap: () {
|
||||
context.read<AppBloc>().add(const AppChangeLocale("ru"));
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Ink(
|
||||
child: Row(
|
||||
children: [
|
||||
const Image(
|
||||
width: 20,
|
||||
height: 20,
|
||||
image: AssetImage("assets/png/ic_ru.png"),
|
||||
),
|
||||
AppUtils.kBoxWidth16,
|
||||
Text("Русский", style: context.text.profileCategory),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
AppUtils.kBoxHeight32,
|
||||
InkWell(
|
||||
onTap: () {
|
||||
context.read<AppBloc>().add(const AppChangeLocale("zh"));
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Ink(
|
||||
child: Row(
|
||||
children: [
|
||||
const Image(
|
||||
width: 20,
|
||||
height: 20,
|
||||
image: AssetImage("assets/png/ic_china.png"),
|
||||
),
|
||||
AppUtils.kBoxWidth16,
|
||||
Text("Chinese", style: context.text.profileCategory),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
AppUtils.kBoxHeight16,
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user