dependencies: gradient_widgets: ^0.3.3 flutter_svg: ^0.14.2
import 'package:flutter/material.dart'; import 'package:gradient_widgets/gradient_widgets.dart'; import 'package:flutter_svg/flutter_svg.dart';
class GradientCard extends StatelessWidget { final Widget child; final Gradient gradient; final double height; final Function onTap;
const GradientCard({ Key key, this.child, this.gradient, this.height = 175.0, this.onTap, }) : super(key: key);
@override Widget build(BuildContext context) { return Container( height: height, decoration: BoxDecoration( borderRadius: BorderRadius.circular(15.0), boxShadow: [ BoxShadow( color: Colors.grey.withOpacity(0.8), spreadRadius: 3.0, blurRadius: 5.0, offset: Offset(0, 3), ), ], gradient: gradient, ), child: Material( color: Colors.transparent, child: InkWell( onTap: onTap, child: child, ), ), ); } }
import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:gradient_widgets/gradient_widgets.dart';
class IrregularBottomSheet extends StatefulWidget { @override _IrregularBottomSheetState createState() => _IrregularBottomSheetState(); }
class _IrregularBottomSheetState extends State