Skip to content

Commit

Permalink
Commit from GitHub Actions (Forui Presubmit)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pante committed Aug 29, 2024
1 parent 1b6fb27 commit c0cf2c4
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions forui/lib/src/widgets/popover.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';

import 'package:meta/meta.dart';
import 'package:sugar/sugar.dart' hide Offset;

import 'package:forui/forui.dart';
import 'package:sugar/sugar.dart' hide Offset;

/// A controller that controls whether a [FPopover] is shown or hidden.
final class FPopoverController extends ChangeNotifier {
Expand Down Expand Up @@ -71,9 +71,9 @@ final class FPopoverController extends ChangeNotifier {
/// * [FPopoverStyle] for customizing a popover's appearance.
class FPopover extends StatefulWidget {
static ({Alignment follower, Alignment target}) get _platform => switch (const Runtime().type) {
PlatformType.android || PlatformType.ios => (follower: Alignment.bottomCenter, target: Alignment.topCenter),
_ => (follower: Alignment.topCenter, target: Alignment.bottomCenter),
};
PlatformType.android || PlatformType.ios => (follower: Alignment.bottomCenter, target: Alignment.topCenter),
_ => (follower: Alignment.topCenter, target: Alignment.bottomCenter),
};

/// The controller that shows and hides the follower. It initially hides the follower.
final FPopoverController controller;
Expand Down Expand Up @@ -146,10 +146,8 @@ class FPopover extends StatefulWidget {
Alignment? followerAnchor,
Alignment? targetAnchor,
super.key,
}):
followerAnchor = followerAnchor ?? _platform.follower,
targetAnchor = targetAnchor ?? _platform.target;

}) : followerAnchor = followerAnchor ?? _platform.follower,
targetAnchor = targetAnchor ?? _platform.target;

@override
State<FPopover> createState() => _State();
Expand Down

0 comments on commit c0cf2c4

Please sign in to comment.