Skip to content

Commit

Permalink
Update constractor for CompassXEvent to private
Browse files Browse the repository at this point in the history
  • Loading branch information
natsuk4ze committed Mar 27, 2024
1 parent 770b425 commit d6770f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/compassx_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:flutter/foundation.dart';
/// See the [wiki](https://github.com/natsuk4ze/compassx/wiki) for details.
@immutable
final class CompassXEvent {
const CompassXEvent({
const CompassXEvent._({
required this.heading,
required this.accuracy,
required this.shouldCalibrate,
Expand Down Expand Up @@ -41,7 +41,7 @@ final class CompassXEvent {
final bool shouldCalibrate;

/// Factory for the map data obtained from the stream of [EventChannel].
factory CompassXEvent.fromMap(dynamic map) => CompassXEvent(
factory CompassXEvent.fromMap(dynamic map) => CompassXEvent._(
heading: map['heading'] as double,
accuracy: map['accuracy'] as double,
shouldCalibrate: map['shouldCalibrate'] as bool,
Expand Down

0 comments on commit d6770f5

Please sign in to comment.