You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
3.4 KiB
Dart
102 lines
3.4 KiB
Dart
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class ConfirmWithMessageDialog extends StatelessWidget {
|
|
final String message;
|
|
final String okTitle;
|
|
final GestureTapCallback onTap;
|
|
|
|
const ConfirmWithMessageDialog({Key key, this.message, this.okTitle, this.onTap}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SimpleDialog(
|
|
contentPadding: EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 12.0),
|
|
children: [
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
TranslationBase.of(context).confirm,
|
|
style: TextStyle(
|
|
color: Colors.black,
|
|
fontSize: 22,
|
|
letterSpacing: -0.94,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
Text(
|
|
message,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
color: CustomColors.grey,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: -0.48,
|
|
),
|
|
),
|
|
mHeight(20),
|
|
Container(
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Expanded(
|
|
child: InkWell(
|
|
onTap: () {
|
|
Navigator.pop(context);
|
|
},
|
|
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(
|
|
child: InkWell(
|
|
onTap: () {
|
|
Navigator.pop(context);
|
|
onTap();
|
|
},
|
|
child: Container(
|
|
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,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
|
|
],
|
|
)
|
|
],
|
|
);
|
|
}
|
|
}
|