Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next_gen_ui_demo: Add leak_tracker #1890

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions next_gen_ui_demo/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:gap/gap.dart';
import 'package:leak_tracker/leak_tracker.dart';
import 'package:provider/provider.dart';
import 'package:window_size/window_size.dart';

Expand All @@ -30,6 +31,10 @@ import 'title_screen_5b/title_screen.dart' as title_screen_5b;
import 'title_screen_6/title_screen.dart' as title_screen_6;

void main() {
enableLeakTracking();
MemoryAllocations.instance
.addListener((event) => dispatchObjectEvent(event.toMap()));

if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
WidgetsFlutterBinding.ensureInitialized();
setWindowMinSize(const Size(800, 500));
Expand Down
1 change: 1 addition & 0 deletions next_gen_ui_demo/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies:
flutter_animate: ^4.1.1+1
focusable_control_builder: ^1.0.1+1
gap: ^3.0.0
leak_tracker: ^7.0.4
particle_field: ^1.0.0
provider: ^6.0.5
rnd: ^0.2.0
Expand Down