Skip to content

Conversation

@tools400
Copy link

@tools400 tools400 commented Dec 23, 2024

Pull Request

This pull request fixes some problems that I noticed when learning flutter_reactive_ble.

Preparation

Steps I took for launching the app:

  • Cloned the project to my Windows PC
  • Executed command flutter config --jdk-dir="c:\Program Files\Java\jdk-17 for setting the Java version
  • Executed command flutter pub get for resolving dependencies

Fix problem that app cannot be started

Commit: Update SDK version for starting the app.

  • Select Start Debugging (VSCode) to launch the app
  • Error: FAILURE: Build failed with an exception.

Example error message:

Dependency 'androidx.fragment:fragment:1.7.1' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.

Fix error on LateInitializationError exception

Commit: Fix 'LateInitializationError' exception.

Steps to reproduce the problem:

  • Start App
  • Start Scan
  • Select any device
  • Tap the 'back' arrow to return to the device list
  • Error: LateError (LateInitializationError: Field '_connection@141363709' has not been initialized.)

Fix problem that characteristics cannot be expanded

Commit: Fix expanding characteristics.

Steps to reproduce the problem:

  • Start App
  • Start Scan
  • Select any device
  • Tap the Connect buton
  • Tap the Discover Services button
  • Tap the down arrow on a characteristics card to expand the card
  • Error: card is not expanded

Fix another error on LateInitializationError exception

Commit: Fix another 'LateInitializationError' exception.

Steps to reproduce the problem:

  • Start App
  • Start Scan
  • Select any device
  • Tap the Discover Services button
  • Tap the down arrow on a characteristics card to expand the card
  • Tap the characteristics card to open the Select an operation dialog
  • Tap the close button
  • Error: LateError (LateInitializationError: Field 'subscribeStream' has not been initialized.)


// ignore: cancel_subscriptions
late StreamSubscription<ConnectionStateUpdate> _connection;
StreamSubscription<ConnectionStateUpdate>? _connection;
Copy link
Collaborator

@Taym95 Taym95 Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will close this, since #889 just got merged and contains these chnages

@Taym95 Taym95 closed this Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants