mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-01 04:07:53 +08:00
Remove flutter_runtime_env env
flutter_sentry provides the same feature. I prefer having the minimum amount of external dependencies.
This commit is contained in:
@ -4,6 +4,8 @@ import 'dart:io';
|
|||||||
import 'package:device_info/device_info.dart';
|
import 'package:device_info/device_info.dart';
|
||||||
import 'package:firebase_analytics/observer.dart';
|
import 'package:firebase_analytics/observer.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/foundation.dart' as foundation;
|
||||||
|
|
||||||
import 'package:gitjournal/analytics.dart';
|
import 'package:gitjournal/analytics.dart';
|
||||||
import 'package:gitjournal/screens/filesystem_screen.dart';
|
import 'package:gitjournal/screens/filesystem_screen.dart';
|
||||||
import 'package:gitjournal/screens/folder_listing.dart';
|
import 'package:gitjournal/screens/folder_listing.dart';
|
||||||
@ -15,7 +17,7 @@ import 'package:gitjournal/utils.dart';
|
|||||||
import 'package:gitjournal/utils/logger.dart';
|
import 'package:gitjournal/utils/logger.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:path/path.dart' as p;
|
import 'package:path/path.dart' as p;
|
||||||
import 'package:flutter_runtime_env/flutter_runtime_env.dart' as runtime_env;
|
import 'package:flutter_sentry/flutter_sentry.dart';
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:easy_localization_loader/easy_localization_loader.dart';
|
import 'package:easy_localization_loader/easy_localization_loader.dart';
|
||||||
@ -106,7 +108,7 @@ class JournalApp extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void _enableAnalyticsIfPossible() async {
|
static void _enableAnalyticsIfPossible() async {
|
||||||
JournalApp.isInDebugMode = runtime_env.isInDebugMode();
|
JournalApp.isInDebugMode = foundation.kDebugMode;
|
||||||
|
|
||||||
var isPhysicalDevice = true;
|
var isPhysicalDevice = true;
|
||||||
try {
|
try {
|
||||||
@ -127,7 +129,7 @@ class JournalApp extends StatefulWidget {
|
|||||||
JournalApp.isInDebugMode = true;
|
JournalApp.isInDebugMode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool inFireBaseTestLab = await runtime_env.inFirebaseTestLab();
|
bool inFireBaseTestLab = await FlutterSentry.isFirebaseTestLab();
|
||||||
bool enabled = !JournalApp.isInDebugMode && !inFireBaseTestLab;
|
bool enabled = !JournalApp.isInDebugMode && !inFireBaseTestLab;
|
||||||
|
|
||||||
Log.d("Analytics Collection: $enabled");
|
Log.d("Analytics Collection: $enabled");
|
||||||
|
@ -284,13 +284,6 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.8"
|
version: "1.0.8"
|
||||||
flutter_runtime_env:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: flutter_runtime_env
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.0.3"
|
|
||||||
flutter_sentry:
|
flutter_sentry:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -35,7 +35,6 @@ dependencies:
|
|||||||
dart_git:
|
dart_git:
|
||||||
git: https://github.com/GitJournal/dart_git.git
|
git: https://github.com/GitJournal/dart_git.git
|
||||||
#path: /Users/vishesh/src/gitjournal/dart_git
|
#path: /Users/vishesh/src/gitjournal/dart_git
|
||||||
flutter_runtime_env: ^0.0.3
|
|
||||||
yaml_serializer: ^0.0.6
|
yaml_serializer: ^0.0.6
|
||||||
connectivity: ^0.4.6+1
|
connectivity: ^0.4.6+1
|
||||||
flutter_emoji: ">= 2.0.0"
|
flutter_emoji: ">= 2.0.0"
|
||||||
|
Reference in New Issue
Block a user