Flutter : Samsung Galaxy Watch 4 Classic - Rotating Bezel - flutter

So, I am using wear plugin for this, the first exciting thing I wanted to try out was scrolling through a ListView or a PageView using the rotating bezel. But that didn't happen. I searched too, but didn't find anything for flutter.
Is setting up a custom method channel the only way for now? Are there any details I'm missing out on?
UPDATE : Native method requires a View object to use view.setOnGenericMotionListener. Since flutter renders it's own views, I can't access it via method channel. Please correct me if I'm wrong and if it's possible to put a listener on the view generated by flutter itself.

Related

Flutter Splash Screen Animation

I want to create a custom animated splash screen like the splash screen of Uber iOS App:
I tried to create two containers and animate them but not even close to what Uber did.
Is there any way to do it programmatically instead of creating the animation and import it within the app?
Your question is not detailed so all I can do is giving a topic to you to train.
Flutter has a nice capability of animating things, but if the animation is too complicated, I prefer pre-built animations like AfterEffect or sth like that.
You can possibly do what you want using AnimatedContainer. But first, you need to gather more than basic animation knowledge in this area, so, here is the topic you need to dig..
One way is using CustomPainter, but it is also possible to use other built-in flutter widgets like explained here: https://flutter.dev/docs/development/ui/animations

What is the best way to make fullscreen for flutter video_player?

Im trying to implement video_player in my Flutter project and need your tips)
So, requirements are: player have to work inline and fullscreen and it must have custom controls.
I've tried to use video_player itself. And there were no problems till I`ve started implementation of fullscreen mode. I did it with help of another special screen for "fullscreen" mode. And had to path current video progress and status (play/pause) there.
Is there any better way to do this without creating new screen and new instance of player for fullscreen?
Chewie? Yes, I've tried it as well. Much better experience of fullscreen. But I've also bumped into some issues. First of all it rotate video into landscape mode in fullscreen. This answer https://github.com/brianegan/chewie/issues/137 helps, but there is still some visible rotation to landscape and then back. not the best experience, i think.
And controls... If you put custom controls outside of Chewie - there are not rendering in fullscreen. If you put them in 'overlay" property - they become static and I don't see the way to update there values (change Icon and set Progress value). Any example of usage "customControls" property?
Has anyone same isuues? Any examples demos or tips?
Thanks for your help!
UPDATE
Chewie
"customControls" are not shown if you set "showControls" to false
A bit confusing as for me
But their update during runtime is still a mystery
UPDATE 2
To make Chewie customControls work with progressbar and play/pause properly you chould path in your controls widget controller and listen for its changes from there

How to make this user interface

I'm trying to learn how to develop Flutter application and I want to know how to make user interface in Flutter like what is shown in the picture
I'm not going to just give you the code to make this UI, but I'll help you. I'd recommend a GridView with a crossAxisCount of 3 so you can align the buttons like this. Then I'd separate out the 0 button and surround it with a Center widget so that it's centered.
If you're just learning, I suggest making simple UIs first to get a grasp of how the framework works, then you can move to intermediate UIs like this one.

How to implement bi-directional scroll in a Flutter app?

Is there any way I can make a screen scroll in multiple directions smoothly? It would be really helpful if someone who has already done it would share how. I've tried using the plugin - https://pub.dev/packages/bidirectional_scroll_view#-analysis-tab-
but it doesn't work smoothly, and is quite slow.
Read the issue at https://github.com/toufikzitouni/flutter-bidirectional_scrollview_plugin/issues/4
It recommends to add Silvers as the plugin is not implementing recycler.

How to make dart Widgets fully transparent to see platform native view under FlutterView?

I want to create a video chat app, using some platform native SDK like WebRTC to implement the video part, using flutter to implement other interactivity, how could I achieve that?
In Android, I try to hook the createFlutterView method, create a FrameLayout to hold the FlutterView and other native views under FlutterView, and make it as Activity's content view by setContentView.
FlutterView is a subclass of SurfaceView, so I can make it transparent like this:
flutterView.setZOrderOnTop(true);
flutterView.getHolder().setFormat(PixelFormat.TRANSPARENT);
To make FlutterView's surface background transparent, I declare android:colorBackground as #00000000 in my theme, according to FlutterView's source code.
With those setup, I can see the view under FlutterView for a short period, after that it's covered by Widgets declared in dart code. I think that short period is the dart code load time.
To verify that, I create a pure Android project with the same views as above, but without any dart code. In that project, views under FlutterView show well all the time.
So, my question is, how to make dart Widgets fully transparent to see platform native view under FlutterView?