TF-1487 Apply linter rule
This commit is contained in:
@@ -3,17 +3,17 @@ import 'dart:async';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
_Dispatcher logHistory = _Dispatcher("");
|
||||
final logHistory = _Dispatcher("");
|
||||
|
||||
void log(String? value) {
|
||||
String v = value ?? "";
|
||||
logHistory.value = v + "\n" + logHistory.value;
|
||||
if (kReleaseMode == false) {
|
||||
logHistory.value = "$v\n${logHistory.value}";
|
||||
if (kDebugMode) {
|
||||
print(v);
|
||||
}
|
||||
}
|
||||
|
||||
void logError(String? value) => log("[ERROR] " + (value ?? ""));
|
||||
void logError(String? value) => log("[ERROR] ${value ?? ""}");
|
||||
|
||||
// Take from: https://flutter.dev/docs/testing/errors
|
||||
void initLogger(VoidCallback runApp) {
|
||||
|
||||
@@ -33,4 +33,4 @@ class _Benchmark {
|
||||
}
|
||||
}
|
||||
|
||||
final _Benchmark bench = _Benchmark();
|
||||
final bench = _Benchmark();
|
||||
@@ -1,11 +1,12 @@
|
||||
import 'package:flutter/foundation.dart' as Foundation;
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
abstract class BuildUtils {
|
||||
static const bool isDebugMode = Foundation.kDebugMode;
|
||||
static const bool isDebugMode = kDebugMode;
|
||||
|
||||
static const bool isReleaseMode = Foundation.kReleaseMode;
|
||||
static const bool isReleaseMode = kReleaseMode;
|
||||
|
||||
static const bool isWeb = Foundation.kIsWeb;
|
||||
static const bool isWeb = kIsWeb;
|
||||
|
||||
static const bool isProfileMode = Foundation.kProfileMode;
|
||||
static const bool isProfileMode = kProfileMode;
|
||||
}
|
||||
@@ -34,8 +34,8 @@ class FpsManager {
|
||||
final List<FpsCallback> _fpsCallbacks = [];
|
||||
|
||||
/// Temporarily save 120 frames
|
||||
static const int _queue_capacity = 120;
|
||||
final ListQueue framesQueue = ListQueue<FrameTiming>(_queue_capacity);
|
||||
static const int queueCapacity = 120;
|
||||
final ListQueue framesQueue = ListQueue<FrameTiming>(queueCapacity);
|
||||
|
||||
void addFpsCallback(FpsCallback callback) {
|
||||
_fpsCallbacks.add(callback);
|
||||
@@ -69,7 +69,7 @@ class FpsManager {
|
||||
for (FrameTiming timing in timings) {
|
||||
framesQueue.addFirst(timing);
|
||||
}
|
||||
while (framesQueue.length > _queue_capacity) {
|
||||
while (framesQueue.length > queueCapacity) {
|
||||
framesQueue.removeLast();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user