Dn-a / flutter_inner_drawer

Inner Drawer is an easy way to create an internal side section (left/right) where you can insert a list-menu or other.
https://pub.dartlang.org/packages/flutter_inner_drawer
MIT License
514 stars 129 forks source link

change backgroundDecoration BoxDecoration -> Decoration; #48

Closed binglingziyu closed 4 years ago

binglingziyu commented 4 years ago
// backgroundDecoration: BoxDecoration(color: Colors.blue ), // default  Theme.of(context).backgroundColor
backgroundDecoration: ShapeDecoration(
  color: Colors.blue,
  shape: ShapeOfViewBorder(
    shape: CustomShape(builder: (rect) {
      Log.i(rect);
      return Path()
        ..moveTo(rect.left, rect.top)
        ..lineTo(rect.left, rect.top + rect.height / 10 * 9)
        ..lineTo(rect.left + rect.width, (rect.top + rect.height) / 3 * 2)
        ..lineTo(rect.left + rect.width, rect.top)
        ..lineTo(rect.left, rect.top);
    }),
  ),
),

WechatIMG48

ShapeOfViewBorderCustomShape