saveToLocalStorage method

Future<void> saveToLocalStorage(
  1. BluetoothInfo bluetoothInfo
)

Implementation

Future<void> saveToLocalStorage(BluetoothInfo bluetoothInfo) async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  await prefs.setString(
    'printer-settings',
    jsonEncode(
      {'macAddress': bluetoothInfo.macAdress, 'name': bluetoothInfo.name},
    ),
  );
}