Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tilucasoli committed Oct 17, 2024
1 parent 02bb501 commit 28c1706
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions packages/remix/lib/src/components/toast/toast_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import 'package:flutter/widgets.dart';
import 'package:mix/mix.dart';

class ToastLayer extends StatefulWidget {
const ToastLayer({super.key, required this.body});
const ToastLayer({super.key, required this.child});

final Widget body;
final Widget child;

@override
ToastLayerState createState() => ToastLayerState();
Expand Down Expand Up @@ -100,7 +100,7 @@ class ToastLayerState extends State<ToastLayer> implements ToastActions {
},
child: toastWidget,
),
widget.body,
widget.child,
],
);
}
Expand Down Expand Up @@ -143,6 +143,7 @@ class ToastEntry {
final Duration reverseAnimationDuration;
final Curve? animationCurve;
final Curve? reverseAnimationCurve;

const ToastEntry({
required this.builder,
this.showDuration = const Duration(seconds: 4),
Expand Down
2 changes: 1 addition & 1 deletion packages/remix/lib/src/components/toast/toast_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ToastStyle extends SpecStyle<ToastSpecUtility> {

final mainFlexStyle = $.mainFlex.chain
..direction.horizontal()
..mainAxisAlignment.start()
..mainAxisAlignment.spaceBetween()
..mainAxisSize.min()
..gap(16);

Expand Down
2 changes: 1 addition & 1 deletion packages/remix/lib/src/layout/scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Scaffold extends StatelessWidget {
$box.color(color ?? const Color(0xFFFFFFFF)),
$on.dark($box.color(colorOnDark ?? const Color(0xFF000000))),
),
child: ToastLayer(body: body),
child: ToastLayer(child: body),
);
}
}

0 comments on commit 28c1706

Please sign in to comment.