Skip to content

Instantly share code, notes, and snippets.

@limitedeternity
Last active May 29, 2020 14:32
Show Gist options
  • Save limitedeternity/6cb5dfee161fc45e84c8d13933072760 to your computer and use it in GitHub Desktop.
Save limitedeternity/6cb5dfee161fc45e84c8d13933072760 to your computer and use it in GitHub Desktop.
Replace an ugly white box created by ReorderableList widget on element drag with a normal shadow
--- reorderable_list.dart 2020-05-29 17:21:19.000000000 +0300
+++ reorderable_list.dart 2020-05-29 17:30:48.000000000 +0300
@@ -3,6 +3,7 @@
// found in the LICENSE file.
import 'dart:math';
+import 'dart:ui' show Color;
import 'package:flutter/widgets.dart';
import 'package:flutter/rendering.dart';
@@ -467,6 +468,7 @@
// These constraints will limit the cross axis of the drawn widget.
constraints: constraints,
child: Material(
+ color: Color.fromRGBO(0, 0, 0, 0.1),
elevation: 6.0,
child: toWrapWithSemantics,
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment