forked from alexvasl/drifter_app
updated dialogs
This commit is contained in:
parent
d7769061c5
commit
c43e182a52
@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:drifter/theme/app_colors.dart';
|
|
||||||
|
|
||||||
import 'ok_button_widget.dart';
|
import 'ok_button_widget.dart';
|
||||||
|
|
||||||
@ -16,70 +15,60 @@ class DeleteKeysDialog extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Dialog(
|
return Dialog(
|
||||||
shape: RoundedRectangleBorder(
|
// shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(12),
|
// borderRadius: BorderRadius.circular(12),
|
||||||
),
|
// ),
|
||||||
child: Container(
|
child: Container(
|
||||||
constraints: const BoxConstraints(maxWidth: 600),
|
constraints: BoxConstraints(
|
||||||
|
maxWidth: 700,
|
||||||
|
maxHeight: 190,
|
||||||
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Padding(
|
||||||
mainAxisSize: MainAxisSize.min,
|
padding: const EdgeInsets.all(16.0),
|
||||||
children: [
|
child: Column(
|
||||||
Container(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 24),
|
children: [
|
||||||
decoration: BoxDecoration(
|
const Text(
|
||||||
borderRadius: BorderRadius.circular(12),
|
"Delete Keys",
|
||||||
color: Colors.redAccent,
|
style: TextStyle(
|
||||||
),
|
fontSize: 28,
|
||||||
child: const Center(
|
fontWeight: FontWeight.bold,
|
||||||
child: Text(
|
color: Colors.black87,
|
||||||
'Delete Keys!',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 28,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 16),
|
||||||
const SizedBox(height: 24),
|
Text(
|
||||||
Padding(
|
"Are you sure you want to delete your keys?",
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
// textAlign: TextAlign.c,
|
||||||
child: Column(
|
style: TextStyle(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.grey[700],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
OkButton(
|
||||||
'Do you want to delete your keys?',
|
onPressed: onNoPressed,
|
||||||
style: TextStyle(
|
label: "No",
|
||||||
fontSize: 18,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Colors.grey[700],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(
|
||||||
Row(
|
width: 8,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
),
|
||||||
children: [
|
OkButton(
|
||||||
TextButton(
|
onPressed: onYesPressed,
|
||||||
onPressed: onNoPressed,
|
label: "Yes",
|
||||||
child: Text(
|
|
||||||
'On',
|
|
||||||
style: TextStyle(color: AppColors.mainDarkBlue),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
OkButton(
|
|
||||||
onPressed: onYesPressed,
|
|
||||||
label: 'YES',
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
)
|
||||||
)
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -16,7 +16,7 @@ class DrifterDialog extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
ConstrainedBox(
|
ConstrainedBox(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
@ -30,7 +30,7 @@ class DrifterDialog extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// color: Theme.of(context).extension<StackColors>()!.popupBG,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:drifter/theme/app_colors.dart';
|
|
||||||
|
|
||||||
import 'ok_button_widget.dart';
|
import 'ok_button_widget.dart';
|
||||||
|
|
||||||
@ -31,35 +30,34 @@ class _KeysExistDialogState extends State<KeysExistDialog> {
|
|||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
constraints: const BoxConstraints(maxWidth: 600),
|
constraints: BoxConstraints(
|
||||||
|
maxWidth: 700,
|
||||||
|
maxHeight: 340,
|
||||||
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Padding(
|
||||||
mainAxisSize: MainAxisSize.min,
|
padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 15.0),
|
||||||
children: [
|
child: Column(
|
||||||
Container(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 24),
|
children: [
|
||||||
decoration: BoxDecoration(
|
Row(
|
||||||
borderRadius: BorderRadius.circular(12),
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
color: AppColors.mainDarkBlue,
|
children: [
|
||||||
),
|
Text(
|
||||||
child: const Center(
|
"Keys",
|
||||||
child: Text(
|
style: TextStyle(
|
||||||
'Keys',
|
fontSize: 28,
|
||||||
style: TextStyle(
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 28,
|
color: Colors.black,
|
||||||
fontWeight: FontWeight.bold,
|
),
|
||||||
color: Colors.white,
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 24),
|
||||||
const SizedBox(height: 24),
|
Column(
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
@ -96,31 +94,53 @@ class _KeysExistDialogState extends State<KeysExistDialog> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
Row(
|
Padding(
|
||||||
mainAxisAlignment: MainAxisAlignment
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
.spaceBetween, // Changed to space between to create space for icon buttons
|
child: Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
IconButton(
|
children: [
|
||||||
onPressed: () {
|
MaterialButton(
|
||||||
setState(() {
|
elevation: 3.0,
|
||||||
_toHex = !_toHex;
|
onPressed: () {
|
||||||
});
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.autorenew_outlined),
|
color: Colors.grey[400],
|
||||||
color: Colors.grey[700],
|
shape: RoundedRectangleBorder(
|
||||||
),
|
borderRadius: BorderRadius.circular(
|
||||||
OkButton(
|
8.0,
|
||||||
onPressed: () {
|
),
|
||||||
Navigator.pop(context);
|
),
|
||||||
},
|
child: Text(
|
||||||
label: 'OK',
|
"Cancel",
|
||||||
),
|
style: TextStyle(
|
||||||
],
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
_toHex
|
||||||
|
? OkButton(
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_toHex = !_toHex;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
label: "Encoded",
|
||||||
|
)
|
||||||
|
: OkButton(
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_toHex = !_toHex;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
label: "Hex",
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user