diff --git a/brew_crew/.flutter-plugins-dependencies b/brew_crew/.flutter-plugins-dependencies new file mode 100644 index 0000000..5b86365 --- /dev/null +++ b/brew_crew/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"cloud_firestore","path":"C:\\\\Users\\\\User1\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\cloud_firestore-0.12.9+4\\\\","dependencies":["firebase_core"]},{"name":"firebase_auth","path":"C:\\\\Users\\\\User1\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth-0.14.0+5\\\\","dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\User1\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-0.4.0+9\\\\","dependencies":[]}],"android":[{"name":"cloud_firestore","path":"C:\\\\Users\\\\User1\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\cloud_firestore-0.12.9+4\\\\","dependencies":["firebase_core"]},{"name":"firebase_auth","path":"C:\\\\Users\\\\User1\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth-0.14.0+5\\\\","dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\User1\\\\AppData\\\\Roaming\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-0.4.0+9\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"cloud_firestore","dependencies":["firebase_core"]},{"name":"firebase_auth","dependencies":["firebase_core"]},{"name":"firebase_core","dependencies":[]}],"date_created":"2021-01-21 16:47:21.133258","version":"1.22.5"} \ No newline at end of file diff --git a/brew_crew/lib/screens/home/brew_tile.dart b/brew_crew/lib/screens/home/brew_tile.dart index 1829e89..0aacc83 100644 --- a/brew_crew/lib/screens/home/brew_tile.dart +++ b/brew_crew/lib/screens/home/brew_tile.dart @@ -1,4 +1,5 @@ import 'package:brew_crew/models/brew.dart'; +import 'package:data_connection_checker/data_connection_checker.dart'; import 'package:flutter/material.dart'; class BrewTile extends StatelessWidget { @@ -20,6 +21,20 @@ class BrewTile extends StatelessWidget { ), title: Text(brew.name), subtitle: Text('Takes ${brew.sugars} sugar(s)'), + trailing: StreamBuilder( + stream: DataConnectionChecker().onStatusChange, + builder: (context, snapshot) { + if (snapshot.data == DataConnectionStatus.connected){ + return Icon(Icons.lens, + color: Colors.green,); + }else if (snapshot.data == DataConnectionStatus.disconnected){ + return Icon(Icons.lens, + color: Colors.red,); + }else + return Icon(Icons.lens, + color: Colors.grey,); + } + ), ), ), ); diff --git a/brew_crew/pubspec.lock b/brew_crew/pubspec.lock index 09f54a1..123e2b7 100644 --- a/brew_crew/pubspec.lock +++ b/brew_crew/pubspec.lock @@ -7,21 +7,35 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.5.0-nullsafety.1" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "2.1.0-nullsafety.1" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety.3" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.2.0-nullsafety.1" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0-nullsafety.1" cloud_firestore: dependency: "direct main" description: @@ -35,7 +49,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.11" + version: "1.15.0-nullsafety.3" cupertino_icons: dependency: "direct main" description: @@ -43,6 +57,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.2" + data_connection_checker: + dependency: "direct main" + description: + name: data_connection_checker + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.4" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0-nullsafety.1" firebase_auth: dependency: "direct main" description: @@ -80,28 +108,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.5" + version: "0.12.10-nullsafety.1" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.7" + version: "1.3.0-nullsafety.3" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0+1" + version: "1.8.0-nullsafety.1" provider: dependency: "direct main" description: @@ -109,13 +130,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.1.0" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" sky_engine: dependency: transitive description: flutter @@ -127,56 +141,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.5" + version: "1.8.0-nullsafety.2" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.3" + version: "1.10.0-nullsafety.1" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0-nullsafety.1" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.0-nullsafety.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0-nullsafety.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.5" + version: "0.2.19-nullsafety.2" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0-nullsafety.3" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.1.0-nullsafety.3" sdks: - dart: ">=2.2.2 <3.0.0" + dart: ">=2.10.0-110 <2.11.0" flutter: ">=1.5.0 <2.0.0" diff --git a/brew_crew/pubspec.yaml b/brew_crew/pubspec.yaml index 29c6834..99e218d 100644 --- a/brew_crew/pubspec.yaml +++ b/brew_crew/pubspec.yaml @@ -23,6 +23,7 @@ dependencies: cloud_firestore: ^0.12.9+4 provider: ^3.1.0 flutter_spinkit: "^4.0.0" + data_connection_checker: ^0.3.4 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons.