Skip to content

Commit

Permalink
add debug view for connectivity type
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Sep 2, 2024
1 parent fb6ca87 commit 7eaf5a4
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
12 changes: 12 additions & 0 deletions lib/Frontend/pages/developer/developer_menu.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
Expand Down Expand Up @@ -130,6 +131,17 @@ class _DeveloperMenuState extends ConsumerState<DeveloperMenu> {
},
),
),
ListTile(
title: const Text("ConnectivityType"),
subtitle: StreamBuilder(
stream: Connectivity().onConnectivityChanged,
builder: (BuildContext context, AsyncSnapshot<List<ConnectivityResult>> snapshot) {
var value = snapshot.data;
String text = value != null ? value.toString() : "unknown";
return Text(text);
},
),
),
const ListTile(
title: Divider(),
),
Expand Down
32 changes: 32 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.5.11"
custom_lint_builder:
dependency: transitive
description:
name: custom_lint_builder
sha256: "0d48e002438950f9582e574ef806b2bea5719d8d14c0f9f754fbad729bcf3b19"
url: "https://pub.dev"
source: hosted
version: "0.5.14"
custom_lint_core:
dependency: transitive
description:
Expand Down Expand Up @@ -830,6 +838,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.1"
hotreloader:
dependency: transitive
description:
name: hotreloader
sha256: ed56fdc1f3a8ac924e717257621d09e9ec20e308ab6352a73a50a1d7a4d9158e
url: "https://pub.dev"
source: hosted
version: "4.2.0"
html:
dependency: transitive
description:
Expand Down Expand Up @@ -911,6 +927,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.19.0"
intl_translation:
dependency: "direct dev"
description:
name: intl_translation
sha256: b858d88b569f3c529e992ba7186aa495f3e862897df60edb932563c619943610
url: "https://pub.dev"
source: hosted
version: "0.20.0"
introduction_screen:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1370,6 +1394,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.0-dev.6"
riverpod_lint:
dependency: "direct dev"
description:
name: riverpod_lint
sha256: a2602c6b7fc34a7e36be63ce6399ed0cab66827b6649ba4382e218df34b72754
url: "https://pub.dev"
source: hosted
version: "2.3.4"
rxdart:
dependency: transitive
description:
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ dev_dependencies:
go_router_builder: ^2.7.1
freezed: ^2.5.7
mockito: ^5.4.4
intl_translation: ^0.20.0

test:
flutter_test:
Expand All @@ -140,7 +141,7 @@ dev_dependencies:
# sdk: flutter

flutter_lints: # Dryer Lint
#riverpod_lint:
riverpod_lint:

flutter:
uses-material-design: true
Expand Down

0 comments on commit 7eaf5a4

Please sign in to comment.