Merge branch 'development_new_design_2.0' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan_new_design
commit
3b4e03c618
@ -1,101 +1,85 @@
|
|||||||
import 'package:diplomaticquarterapp/theme/colors.dart';
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
||||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ConfirmWithMessageDialog extends StatelessWidget {
|
class ConfirmWithMessageDialog extends StatelessWidget {
|
||||||
|
final String title;
|
||||||
final String message;
|
final String message;
|
||||||
final String okTitle;
|
final String okTitle;
|
||||||
final GestureTapCallback onTap;
|
final VoidCallback onTap;
|
||||||
|
|
||||||
const ConfirmWithMessageDialog({Key key, this.message, this.okTitle, this.onTap}) : super(key: key);
|
const ConfirmWithMessageDialog({Key key, this.title, @required this.message, this.okTitle, this.onTap}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SimpleDialog(
|
return Dialog(
|
||||||
contentPadding: EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 12.0),
|
backgroundColor: Colors.white,
|
||||||
children: [
|
shape: RoundedRectangleBorder(),
|
||||||
Column(
|
insetPadding: EdgeInsets.only(left: 21, right: 21),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(left: 20, right: 20, top: 18, bottom: 28),
|
||||||
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Row(
|
||||||
TranslationBase.of(context).confirm,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
style: TextStyle(
|
children: [
|
||||||
color: Colors.black,
|
Expanded(
|
||||||
fontSize: 22,
|
child: Padding(
|
||||||
letterSpacing: -0.94,
|
padding: const EdgeInsets.only(top: 16.0),
|
||||||
fontWeight: FontWeight.bold,
|
child: Text(
|
||||||
),
|
title ?? TranslationBase.of(context).confirm,
|
||||||
|
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Color(0xff2B353E), height: 35 / 24, letterSpacing: -0.96),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
icon: Icon(Icons.close),
|
||||||
|
color: Color(0xff2B353E),
|
||||||
|
constraints: BoxConstraints(),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
message,
|
message,
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff808080), letterSpacing: -0.48),
|
||||||
fontSize: 14,
|
|
||||||
color: CustomColors.grey,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
letterSpacing: -0.48,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
mHeight(20),
|
SizedBox(height: 28),
|
||||||
Container(
|
Row(
|
||||||
child: Row(
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
children: [
|
||||||
children: [
|
Expanded(
|
||||||
Expanded(
|
child: DefaultButton(
|
||||||
child: InkWell(
|
TranslationBase.of(context).cancel_nocaps,
|
||||||
onTap: () {
|
() => Navigator.pop(context),
|
||||||
Navigator.pop(context);
|
textColor: Color(0xff2B353E),
|
||||||
},
|
color: Color(0xffEAEAEA),
|
||||||
child: Container(
|
|
||||||
decoration: containerRadius(CustomColors.darkGreyColor, 6),
|
|
||||||
padding: EdgeInsets.all(6),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
TranslationBase.of(context).cancel,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
fontSize: 16,
|
|
||||||
letterSpacing: -0.48,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
mWidth(12),
|
),
|
||||||
Expanded(
|
SizedBox(width: 10),
|
||||||
child: InkWell(
|
Expanded(
|
||||||
onTap: () {
|
child: DefaultButton(
|
||||||
Navigator.pop(context);
|
okTitle ?? TranslationBase.of(context).ok,
|
||||||
onTap();
|
() {
|
||||||
},
|
Navigator.pop(context);
|
||||||
child: Container(
|
onTap();
|
||||||
decoration: containerRadius(CustomColors.accentColor, 6),
|
},
|
||||||
padding: EdgeInsets.all(6),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
okTitle,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 16,
|
|
||||||
letterSpacing: -0.48,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
],
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue