flutter_wear_plugin icon indicating copy to clipboard operation
flutter_wear_plugin copied to clipboard

Use the wear_plus plugin instead

Open Rexios80 opened this issue 1 year ago • 13 comments
trafficstars

I've been unofficially maintaining this plugin for myself and partners for the past 2 years. Since no one is responding to issues in this repository, I have released wear_plus with the necessary changes to be compatible with a modern Flutter application.

Rexios80 avatar Mar 20 '24 15:03 Rexios80

I've been unofficially maintaining this plugin for myself and partners for the past 2 years. Since no one is responding to issues in this repository, I have released wear_plus with the necessary changes to be compatible with a modern Flutter application.

@Rexios80 Hi, I am developing a launcher for a smart watch that OS is android 8.1.0. in both plugin (wear:1.1.0 and wear_plus:1.2.0), I got those exceptions, so I think the usage of methodChannel in native implementation is incorrect, if not? tell me how fix that. and I have one question about ambient Mode in watch. What is the ambient mode in the watch and when does it occur?

E/flutter ( 6715): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method getShape on channel wear)
E/flutter ( 6715): #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7)
E/flutter ( 6715): <asynchronous suspension>
E/flutter ( 6715): #1      Wear.getShape (package:wear_plus/src/wear.dart:63:15)
E/flutter ( 6715): <asynchronous suspension>
E/flutter ( 6715): #2      _WatchShapeState.initState.<anonymous closure> (package:wear_plus/src/shape_widget.dart:55:35)
E/flutter ( 6715): <asynchronous suspension>
E/flutter ( 6715): 
E/flutter ( 6715): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method isAmbient on channel wear)
E/flutter ( 6715): #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7)
E/flutter ( 6715): <asynchronous suspension>
E/flutter ( 6715): #1      Wear.isAmbient (package:wear_plus/src/wear.dart:74:15)
E/flutter ( 6715): <asynchronous suspension>
E/flutter ( 6715): #2      _AmbientModeState._updateMode (package:wear_plus/src/ambient_widget.dart:90:3)
E/flutter ( 6715): <asynchronous suspension>

ImanGhasemiArani avatar Mar 24 '24 20:03 ImanGhasemiArani

Do not depend on both plugins.

wear_plus is a drop in replacement for the wear plugin

Rexios80 avatar Mar 24 '24 21:03 Rexios80

If you aren't depending on both, the issue is probably that you need to call WidgetsFlutterBinding.ensureInitialized() first

Rexios80 avatar Mar 24 '24 21:03 Rexios80

Ambient mode is when the screen is "inactive" but still on. If you play with the example app and the hand cover gesture this should become obvious.

Rexios80 avatar Mar 24 '24 21:03 Rexios80

Do not depend on both plugins.

wear_plus is a drop in replacement for the wear plugin

I know. I only use one of them at a time. not both

ImanGhasemiArani avatar Mar 25 '24 23:03 ImanGhasemiArani

If you aren't depending on both, the issue is probably that you need to call WidgetsFlutterBinding.ensureInitialized() first

I added this before. but still not working.

ImanGhasemiArani avatar Mar 25 '24 23:03 ImanGhasemiArani

Ambient mode is when the screen is "inactive" but still on. If you play with the example app and the hand cover gesture this should become obvious.

thanks

ImanGhasemiArani avatar Mar 25 '24 23:03 ImanGhasemiArani

Does the example app work?

Rexios80 avatar Mar 26 '24 01:03 Rexios80

Does the example app work?

Unfortunately not.

ImanGhasemiArani avatar Mar 26 '24 17:03 ImanGhasemiArani

The wear_plus example app works as expected for me. Please create an issue in the wear_plus repo with more information. https://github.com/Rexios80/wear_plus

Rexios80 avatar Mar 26 '24 17:03 Rexios80

The wear_plus example app works as expected for me. Please create an issue in the wear_plus repo with more information. https://github.com/Rexios80/wear_plus

I tried to create issue in your repo. but I cant find any way to do that(there is not issue tab in repo).

ImanGhasemiArani avatar Mar 26 '24 21:03 ImanGhasemiArani

Issues are disabled by default in forked repos, my bad. Please try now.

Rexios80 avatar Mar 27 '24 01:03 Rexios80

@Rexios80 thank you so much for doing this! I've just got started with Flutter and was battling with getting this repo to work, yours worked perfectly without needing to modify the project beyond adding the plugin 😄

GeekJosh avatar Jan 12 '25 14:01 GeekJosh