Skip to content

Commit

Permalink
fix datatype convert
Browse files Browse the repository at this point in the history
  • Loading branch information
truonghoangduy committed Oct 20, 2022
1 parent 9c68623 commit f5ed617
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/ble_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class BleRepository {
_listObdCharacteristicStream.add(obdStream.listen((event) {
obd2ReaderState.add(event);
final dataAsString = String.fromCharCodes(event.data);
final obdData = int.parse((dataAsString));
final obdData = double.parse((dataAsString)).toInt();
checkListCore.addCheckListData(event.type, obdData);
}));
}
Expand Down
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Provider(
lazy: false,
create: (BuildContext context) {
return CheckListCore()
..createCheckListStore()
Expand Down

0 comments on commit f5ed617

Please sign in to comment.