61 lines
2 KiB
Dart
61 lines
2 KiB
Dart
|
|
import 'package:flutter/material.dart';
|
||
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||
|
|
import 'package:mnemo_cards/theme/themes.dart';
|
||
|
|
|
||
|
|
import '../../main.dart';
|
||
|
|
|
||
|
|
showErrorDialog(String message) {
|
||
|
|
return showDialog(
|
||
|
|
context: scaffoldKey.currentContext!,
|
||
|
|
builder: (context) {
|
||
|
|
return Center(
|
||
|
|
child: Material(
|
||
|
|
color: Colors.transparent,
|
||
|
|
child: Container(
|
||
|
|
margin: EdgeInsets.all(4.0.h),
|
||
|
|
padding: EdgeInsets.all(4.0.h),
|
||
|
|
height: 200.h,
|
||
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
||
|
|
decoration: BoxDecoration(
|
||
|
|
color: white,
|
||
|
|
border: Border.all(
|
||
|
|
color: Colors.grey.withOpacity(0.5),
|
||
|
|
width: 1,
|
||
|
|
),
|
||
|
|
borderRadius: BorderRadius.circular(12.0),
|
||
|
|
),
|
||
|
|
child: Column(
|
||
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
|
children: [
|
||
|
|
Expanded(
|
||
|
|
child: Center(
|
||
|
|
child: Text(
|
||
|
|
message,
|
||
|
|
textAlign: TextAlign.center,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
GestureDetector(
|
||
|
|
onTap: Navigator.of(context).pop,
|
||
|
|
child: Container(
|
||
|
|
height: 40.h,
|
||
|
|
decoration: BoxDecoration(
|
||
|
|
color: testBlue,
|
||
|
|
border: Border.all(
|
||
|
|
color: Colors.grey.withOpacity(0.5),
|
||
|
|
width: 1,
|
||
|
|
),
|
||
|
|
borderRadius: BorderRadius.circular(8.0),
|
||
|
|
),
|
||
|
|
alignment: Alignment.center,
|
||
|
|
child: Text('Оки'),
|
||
|
|
),
|
||
|
|
)
|
||
|
|
],
|
||
|
|
),
|
||
|
|
),
|
||
|
|
),
|
||
|
|
);
|
||
|
|
});
|
||
|
|
}
|