Skip to content

Commit

Permalink
fix: iOS boxShadow flickering; drag divider color; smaller gap betwee…
Browse files Browse the repository at this point in the history
…n token list and appName;
  • Loading branch information
AutoComplete1 committed Nov 11, 2023
1 parent 236dc75 commit ef5ec15
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class _DragTargetDividerState<T extends SortableMixin> extends ConsumerState<Dra

@override
Widget build(BuildContext context) {
Color dividerColor = Colors.transparent;

final body = DragTarget(
onWillAccept: (data) {
if (data is T == false) return false;
Expand Down Expand Up @@ -116,9 +118,11 @@ class _DragTargetDividerState<T extends SortableMixin> extends ConsumerState<Dra
},
builder: (context, accepted, rejected) {
final dividerHeight = expansionController.value * 40 + 1.5;
dividerColor = accepted.isNotEmpty ? Theme.of(context).dividerColor : Colors.transparent;
return Container(
height: dividerHeight,
decoration: BoxDecoration(
color: dividerColor,
borderRadius: BorderRadius.circular(dividerHeight / 4),
),
margin: EdgeInsets.only(left: 8 - expansionController.value * 2, right: 8 - expansionController.value * 2, top: 8, bottom: 8),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class _MainViewTokensListState extends ConsumerState<MainViewTokensList> {
if (sortables.isEmpty) return [];
sortables.sort((a, b) => a.compareTo(b));
// just for small space between appBar and first element
widgets.add(const SizedBox(height: 20));
widgets.add(const SizedBox(height: 2));
for (var i = 0; i < sortables.length; i++) {
final isFirst = i == 0;
final isDraggingTheCurrent = draggingSortable == sortables[i];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,19 @@ class TokenWidgetTile extends StatelessWidget {

@override
Widget build(BuildContext context) => Container(
margin: const EdgeInsets.only(left: 20.0, right: 20.0),
margin: const EdgeInsets.only(left: 20.0, top: 0.1, right: 20.0, bottom: 0.1),
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
bottomLeft: Radius.circular(10),
bottomRight: Radius.circular(10)),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.2),
spreadRadius: 5,
blurRadius: 7,
spreadRadius: 1,
blurRadius: 2,
offset: const Offset(0, 3),
),
],
Expand Down

0 comments on commit ef5ec15

Please sign in to comment.