added x.svg for close dialogue button

This commit is contained in:
Rylee Davis 2023-05-15 18:34:14 -06:00
parent 264313abfa
commit 05dc4bdd94
3 changed files with 81 additions and 0 deletions

4
assets/images/svg/x.svg Normal file
View File

@ -0,0 +1,4 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15 5L5 15" stroke="#8A95B2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5 5L15 15" stroke="#8A95B2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 311 B

View File

@ -0,0 +1,45 @@
import 'package:flutter/material.dart';
class DrifterDialog extends StatelessWidget {
const DrifterDialog({
Key? key,
this.child,
this.maxWidth = 150,
this.maxHeight = 150,
}) : super(key: key);
final Widget? child;
final double maxWidth;
final double maxHeight;
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
ConstrainedBox(
constraints: BoxConstraints(
maxWidth: maxWidth,
maxHeight: maxHeight,
),
child: Material(
color: Colors.transparent,
borderRadius: BorderRadius.circular(
20,
),
child: Container(
decoration: BoxDecoration(
// color: Theme.of(context).extension<StackColors>()!.popupBG,
borderRadius: BorderRadius.circular(
20,
),
),
child: child,
),
),
),
],
);
}
}

View File

@ -0,0 +1,32 @@
/// work for close dialogue button
// Row(
// mainAxisAlignment: MainAxisAlignment.end,
// children: [
// Container(
// height: 30,
// width: 30,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(1000),
// color: Colors.grey[350],
// // boxShadow: shadows,
// ),
// child: MaterialButton(
// onPressed: () {
// Navigator.of(context).pop();
// },
// splashColor: Colors.grey[400],
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(1000),
// ),
// padding: EdgeInsets.all(2.0),
// child: SvgPicture.asset(
// Assets.svg.x,
// // height: ,
// // width: 35,
// color: Colors.grey[700],
// ),
// ),
// ),
// ],
// ),