spea_mobile_socket_conn 1.0.21

  • Readme
  • Changelog
  • Installing
  • 36

spea_mobile_socket_conn #

Simple package to connect via wifi to a spea machine.

Getting Started #

  • Show main dialog with saved profile list and add profile button:

    Socket socket = await SpeaMobileClient.showProfileList()
    
  • Write String to server:

    socket.write(myString);
    
  • Override handler:

    doneHandler() --> callback when socket close or end suddenly
    
    errorHandler(error) --> callback when errors occur
    
    dataHandler(data) --> callback when a string is received
    
  • IOS setup:

    add this key in ios Info.plist
    
    <key>io.flutter.embedded_views_preview</key>
    <true/>
    

[0.0.1] - 07.08.2019 #

  • Simple way to connect to spea equipment.

[0.0.2] - 07.08.2019 #

  • Bug fix ##[0.0.3] - 07.08.2019
  • Bug fix 2 ##[0.0.4] - 07.08.2019
  • Bug fix 3 ##[0.0.6] - 03.09.2019
  • Use a new lib for android wifi connection, last lib bring user to settings and do not connect automatically to wifi network. ##[0.0.7] - 03.09.2019
  • Stable version

##[0.0.8]

  • Auto connect after scanning a new profile

##[0.0.9]

  • Now is a Widget and not a Dialog

##[0.0.10]

  • Added "afterConnect" callback

##[0.0.11]

  • Added "Add profile" list tile to listView

##[0.0.12]

  • Centered and added onTap handler for "Add Profile" listTile

##[0.0.13]

  • Fix bugs

##[0.0.14]

  • Return to prev version but use dismissable and listTile

##[0.0.15]

  • Better UI

##[0.0.16]

  • Again better UI

##[0.0.17]

  • Again better UI x2

##[0.0.18]

  • Again better UI x2

##[1.0.0]

  • Automatic connect when return from QRCode scan

##[1.0.1]

  • Bug fix

##[1.0.2]

  • Bug fix

##[1.0.3]

  • Bug fix foir tryToConnect after saving the profile

##[1.0.4]

  • Bug fix foir tryToConnect after saving the profile

##[1.0.5]

  • Bug fix foir tryToConnect after saving the profile 2

##[1.0.6]

  • Bug fix foir tryToConnect after saving the profile 3

##[1.0.7]

  • Stable version

##[1.0.8]

  • Added title to profile list

##[1.0.9]

  • Added style to title

##[1.0.10]

  • Added method getMachineLabel() , is static and let the user retrieve the machine label specified in Profile u are trying to connect to.

##[1.0.11]

  • Better error message

##[1.0.12]

  • Do not ask name for profile but use label value in config QRCode

##[1.0.13]

  • Toast when profile saved

##[1.0.14]

  • Bug Fix

##[1.0.15]

  • Autoconnect

##[1.0.16]

  • BugFix of 1.0.15

##[1.0.17]

  • BugFix of 1.0.15

##[1.0.18]

  • BugFix of 1.0.15

##[1.0.19]

  • BugFix of 1.0.15

##[1.0.20]

  • Added more padding to Dialog Title

##[1.0.21]

  • Wait until wifi is connected to specific ssid

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  spea_mobile_socket_conn: ^1.0.21

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:spea_mobile_socket_conn/spea_mobile_socket_conn.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
18
Health:
Code health derived from static analysis. [more]
74
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
23
Overall:
Weighted score of the above. [more]
36
Learn more about scoring.

We analyzed this package on Apr 6, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health issues and suggestions

Fix lib/spea_mobile_socket_conn.dart. (-25.75 points)

Analysis of lib/spea_mobile_socket_conn.dart failed with 1 error, 2 hints:

line 387 col 23: A value of type 'WifiConnectionStatus' can't be assigned to a variable of type 'String'.

line 34 col 25: The value of the local variable 'map' isn't used.

line 179 col 10: This function has a return type of 'Future', but doesn't end with a return statement.

Maintenance issues and suggestions

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://spea.com was unreachable.

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (fluttertoast).

The package description is too short. (-17 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and spea_mobile_socket_conn.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
connectivity ^0.4.3+5 0.4.8+2
flutter 0.0.0
fluttertoast ^3.1.3 3.1.3 4.0.1
shared_preferences ^0.5.3+1 0.5.6+3
spea_mobile_qrcode ^0.0.3 0.0.3
wifi ^0.1.5 0.1.5
wifi_configuration ^1.0.3 1.2.1
Transitive dependencies
collection 1.14.11 1.14.12
connectivity_macos 0.1.0+2
connectivity_platform_interface 1.0.3
flutter_web_plugins 0.0.0
meta 1.1.8
plugin_platform_interface 1.0.2
qr_code_scanner 0.0.12
shared_preferences_macos 0.0.1+6
shared_preferences_platform_interface 1.0.3
shared_preferences_web 0.1.2+4
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test