File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ class FunctionsRepository {
6767 }
6868 DebugLogger .instance.printInfo ('Performing action: $action ' , name: name);
6969
70- final Codelessly codelessly = context.read <Codelessly >();
7170 switch (action.type) {
7271 case ActionType .loadFromCloudStorage || ActionType .setCloudStorage:
7372 StatTracker .instance.track (StatType .cloudAction, action.type.name);
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ class StatTracker {
2222
2323 /// Whether this tracker should collect and send stats.
2424 /// Defaults to true. Set to false to disable all tracking for this instance.
25- final bool enabled;
25+ bool enabled = true ;
2626
27- StatTracker ._({ this .enabled = true } );
27+ StatTracker ._();
2828
2929 Uri ? serverUrl;
3030
@@ -47,9 +47,11 @@ class StatTracker {
4747 void init ({
4848 required String projectId,
4949 required Uri serverUrl,
50+ bool enabled = true ,
5051 }) {
5152 this .projectId = projectId;
5253 this .serverUrl = serverUrl;
54+ this .enabled = enabled;
5355
5456 // Send a batch if stats were tracked while this wasn't initialized yet.
5557 if (statBatch.isNotEmpty && ! disabled) {
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ import 'package:provider/provider.dart';
66
77import '../../codelessly_sdk.dart' ;
88import '../logging/debug_logger.dart' ;
9+ import '../logging/error_logger.dart' ;
910import '../logging/stat_tracker.dart' ;
1011import 'codelessly_error_screen.dart' ;
1112import 'codelessly_loading_screen.dart' ;
1213import 'layout_builder.dart' ;
13- import '../logging/error_logger.dart' ;
1414
1515/// Allows wrapping a loaded [Codelessly] layout with any widget for additional
1616/// control over the rendering.
@@ -236,9 +236,6 @@ class _CodelesslyWidgetState extends State<CodelesslyWidget> {
236236 CodelesslyWidgetController get _effectiveController =>
237237 widget.controller ?? _controller! ;
238238
239- Codelessly get _effectiveCodelessly =>
240- _effectiveController.effectiveCodelessly;
241-
242239 /// The [CodelesslyContext] that will hold the data and functions that will be
243240 /// used to render the layout.
244241 ///
You can’t perform that action at this time.
0 commit comments