Something went wrong on our end
Select Git revision
Forked from
matograine / vignette
Source project has a limited visibility.
-
matograine authoredmatograine authored
common_elements.dart 5.33 KiB
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:gecko/globals.dart';
import 'package:gecko/models/scale_functions.dart';
import 'package:gecko/models/widgets_keys.dart';
Future<bool?> confirmPopup(BuildContext context, String title) async {
return showDialog<bool>(
context: context,
barrierDismissible: true,
builder: (BuildContext context) {
return AlertDialog(
backgroundColor: backgroundColor,
content: Text(
title,
textAlign: TextAlign.center,
style: scaledTextStyle(fontSize: 18, fontWeight: FontWeight.w500),
),
actions: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TextButton(
key: keyConfirm,
child: Text(
"yes".tr(),
style: scaledTextStyle(
fontSize: 18,
color: const Color(0xffD80000),
),
),
onPressed: () {
Navigator.pop(context, true);
},
),
ScaledSizedBox(width: 20),
TextButton(
child: Text(
"no".tr(),
style:
scaledTextStyle(fontSize: 18, color: Colors.blueAccent),
),
onPressed: () {
Navigator.pop(context, false);
},
),
ScaledSizedBox(height: 70)
],
)
],
);
},
);
}
Future<bool?> confirmPopupCertification(BuildContext context, String question1,
String username, String question2, String address) async {
return showDialog<bool>(
context: context,
barrierDismissible: true,
builder: (BuildContext context) {
return AlertDialog(
backgroundColor: backgroundColor,
content: ScaledSizedBox(
height: 220,
child: Column(
children: [
ScaledSizedBox(height: 10),
Text(
question1,