Skip to content

Commit

Permalink
revert formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Molchanovsky committed Nov 7, 2023
1 parent 151416d commit fc46ddc
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions flutter_mobx/lib/src/observer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ class Observer extends StatelessObserverWidget {
final String? debugConstructingStackFrame;

@override
String getName() => super.getName() + (debugConstructingStackFrame != null ? '\n$debugConstructingStackFrame' : '');
String getName() =>
super.getName() +
(debugConstructingStackFrame != null
? '\n$debugConstructingStackFrame'
: '');

@override
Widget build(BuildContext context) => builderOptimized?.call(context, child) ?? builder!.call(context);
Expand Down Expand Up @@ -92,10 +96,16 @@ class Observer extends StatelessObserverWidget {
// regex)
.skip(3)
// Search for the first non-constructor frame
.firstWhere((frame) => !_constructorStackFramePattern.hasMatch(frame), orElse: () => '');

final stackFrameCore = _stackFrameCleanUpPattern.firstMatch(rawStackFrame)?.group(1);
final cleanedStackFrame = stackFrameCore == null ? null : 'Observer constructed from: $stackFrameCore';
.firstWhere(
(frame) =>
!_constructorStackFramePattern.hasMatch(frame),
orElse: () => '');

final stackFrameCore =
_stackFrameCleanUpPattern.firstMatch(rawStackFrame)?.group(1);
final cleanedStackFrame = stackFrameCore == null
? null
: 'Observer constructed from: $stackFrameCore';

stackFrame = cleanedStackFrame;
}
Expand Down

0 comments on commit fc46ddc

Please sign in to comment.