Skip to content

Commit

Permalink
Merge pull request #17 from sharedstreets/ble
Browse files Browse the repository at this point in the history
ble module merge
  • Loading branch information
russbiggs authored Feb 1, 2021
2 parents 242c2a0 + aa528ae commit 491a035
Show file tree
Hide file tree
Showing 10 changed files with 583 additions and 12 deletions.
5 changes: 4 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.CAMERA" />
<application
android:name="io.flutter.app.FlutterApplication"
android:label="curbwheel_flutter"
Expand Down Expand Up @@ -44,5 +43,9 @@
<meta-data
android:name="flutterEmbedding"
android:value="2" />

</application>
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
</manifest>
1 change: 1 addition & 0 deletions android/settings_aar.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ':app'
19 changes: 16 additions & 3 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
PODS:
- Flutter (1.0.0)
- flutter_blue (0.0.1):
- Flutter
- flutter_blue/Protos (= 0.0.1)
- flutter_blue/Protos (0.0.1):
- Flutter
- Protobuf (~> 3.11.4)
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- MTBBarcodeScanner (5.0.11)
- path_provider (0.0.1):
- Flutter
- Protobuf (3.11.4)
- qr_code_scanner (0.2.0):
- Flutter
- MTBBarcodeScanner
- shared_preferences (0.0.1):
- Flutter
- sqflite (0.0.1):
- sqflite (0.0.2):
- Flutter
- FMDB (~> 2.7.2)
- FMDB (>= 2.7.5)

DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_blue (from `.symlinks/plugins/flutter_blue/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
Expand All @@ -26,10 +34,13 @@ SPEC REPOS:
trunk:
- FMDB
- MTBBarcodeScanner
- Protobuf

EXTERNAL SOURCES:
Flutter:
:path: Flutter
flutter_blue:
:path: ".symlinks/plugins/flutter_blue/ios"
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
qr_code_scanner:
Expand All @@ -41,12 +52,14 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_blue: eeb381dc4727a0954dede73515f683865494b370
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
Protobuf: 176220c526ad8bd09ab1fb40a978eac3fef665f7
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904

PODFILE CHECKSUM: a75497545d4391e2d394c3668e20cfb1c2bbd4aa

Expand Down
10 changes: 10 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Need BLE permission to connect to wheel.</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Need BLE permission to connect to wheel.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Need Location permission to map curb.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Need Location permission to map curb.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Need Location permission to map curb.</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand Down
19 changes: 16 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import 'package:curbwheel/service/bluetooth_service.dart';
import 'package:curbwheel/ui/splash/splash_screen.dart';

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'database/database.dart';
void main() => runApp(CurbWheel());

void main() => runApp(MultiProvider(providers: [
ChangeNotifierProvider(create: (BuildContext context) => BleConnection()),
ChangeNotifierProxyProvider<BleConnection, WheelCounter>(
create: (BuildContext context) => WheelCounter(),
update: (BuildContext context, BleConnection bleConnection,
WheelCounter existingWheelCounter) =>
existingWheelCounter.updateConnection(bleConnection),
)
], child: CurbWheel()));

class CurbWheel extends StatelessWidget {
@override
Expand All @@ -16,7 +26,10 @@ class CurbWheel extends StatelessWidget {
fontFamily: 'Raleway',
primaryColor: Colors.black,
textTheme: TextTheme(
headline1: TextStyle(fontSize: 52.0, fontWeight: FontWeight.bold, color:Colors.black),
headline1: TextStyle(
fontSize: 52.0,
fontWeight: FontWeight.bold,
color: Colors.black),
subtitle2: TextStyle(fontSize: 14, fontStyle: FontStyle.italic),
bodyText2: TextStyle(fontSize: 14.0, fontFamily: 'Hind'),
),
Expand All @@ -25,4 +38,4 @@ class CurbWheel extends StatelessWidget {
),
);
}
}
}
Loading

0 comments on commit 491a035

Please sign in to comment.