Can I build a Frontend in FlutterFlow then export to Flutter to finish coding? - flutter

I am learning flutter and dart at the moment. I came across FlutterFlow and I was wondering, could I use FlutterFlow to build the UI of the app, then turn around, take the code, and add it to my IDE and finish coding it with Flutter and dart there?

As I found, you can view the code of the UI and copy it from Developer Menu -> View Code as shown in the following image:
You will see the code with a copy button in the top right corner as shown in the following image:
Bounce:
When you click on a widget in the screen, it shows only the code of it to let you focus on its implementation.
Edit:
In the same developer menu, there is a Download Code button which allows you to download the source code of the application but it's not available in the Free Plan, Standard and Pro only.
Lastly: As a piece of personal advice, if you are learning Flutter, then stay away from tools like FlutterFlow until you reach a good level in Flutter Development, so these tools become just an acceleration for your work, not too highly dependent on them.

Yes, it's possible. You must either be using the "standard" plan to be able to export the source code of the app or, if you just need a tool to create the UI for a flutter app, you can then use the playground area of flutterflow to have access to the source code of that view.

Related

flutter, after push a native viewController from flutter, is this possible display more content above native viewController with flutter again?

I have a native viewController which implement from a framework, I can't directly change it into flutter view.
So I think I can:
Display the UI in native ViewController(a 3rd party native video player) from flutter main app.
Then I need display some extra content(for example user avatar, some text message and so on) above/on native ViewController
But I would prefer implement this extra content with flutter, if it's possible?
Is this good approach ? If not, then I think have to do the things bellow:
Display the UI in native ViewController(a video player) from flutter main app.
Then display some extra content with native code.
PS: why I can't change the native VideController into flutter ? it's because it integration with a native video player which integration cache logic and I can't change the source code in that.
According to [1] it is fine to have some component native, because there just are not all features in new cross platform frameworks like flutter.
According to [2] you could use Decorators from Container to show content in layers, taken that you can show the native content embedded to the Flutter code. In that case, definitely use approach 1.
However, I could only find platform-channels type of solution from Flutter documentation [4] to do native code execution and there it states for example this:
To comply with channels’ UI thread requirement, you may need to jump from a background thread to Android’s UI thread to execute a channel method.
and in other post [3] on platform-channels:
When the user clicks back I want to navigate back to flutter [..]
Both imply everything that is native happens in native thread and view, so I don't see possibility other than your second approach, where all is native.
So, all depends how you fit the native element to Flutter. If you embed, use Flutter for overlays, otherwise do all native. I think good way to measure this is that if you see anything from Flutter generated code when inside the native viewer, you have chances to overlay, otherwise just go native.
[1] Open native UIViewController in Flutter
[2] https://cogitas.net/overlay-text-icon-image-flutter/
[3] How to change the root view controller back to flutter from native iOS?
[4] https://flutter.dev/docs/development/platform-integration/platform-channels

How to develop a menu where the current route remains laterally to the menu

I am new to developing apps flutter, but I want to develop a menu where the current tab is sample within the menu itself, I do not know how to explain, and if it is possible, but could not find a similar tutorial and do not know if there is any specific name for this type of menu, could someone help me with this?
It would be something in the style of this design ... but in my case just show the current page there, is possible in flutter?
You can use this package https://pub.dev/packages/hidden_drawer_menu
github https://github.com/RafaelBarbosatec/hidden_drawer_menu
full example code https://github.com/RafaelBarbosatec/hidden_drawer_menu/tree/master/example
or https://pub.dev/packages/kf_drawer
github https://github.com/qqmikey/kf_drawer
hidden_drawer_menu
kf_drawer

Web view is too slow

Web view takes more than 4 sec to load the webpage. The same page takes less than 2 sec in Native app. Is there a way to speedup the load time. I tried both Official webview_flutter and flutter_webview_plugin.
If you app relies on WebView, just choose other tools: Swift for iOS & Kotlin for Android.
Here is why:
WebView actually does not load pages slow. Instead, creating the WebView widget is slow;
In order to solve 1, you might want use a cached WebView. Unfortunately, that is not easy. Layout changes (e.g. animation) might trigger a WebView "recreating" (the cached WebView becomes invalid/staled). And the "recreating" is very slow;
Flutter's widgets depend on "state" outside of the widgets, and widgets' creating are supposed to be fast/simple. Unfortunately, WebView (which is not a native widget) is not the case. WebView has its complex internal "state", a recreation simple discard everything and you returns to the WebView's initial state (initial URL). And it is very slow (Creating time + LoadTime: Network overhead);
It is very hard to create a "external state" outside a WebView, therefore after a WebView's recreating it cannot resume from the external state;
Since WebView's recreating is very slow, it totally kills animation and gives user a very bad experience. A solution might be put a WebView as your main page and never try to animate to a new WebView (just like a Wiki App Demo in YouTube).
Conclusion:
So, now, WebView in flutter is not ready and please don't consider use it seriously.
Discussion:
Flutter's widgets design is quite "unusual" since they are basically immutable. States outside widgets (external state) are used. When state changes, instead of modify the widget, Flutter choose to create a new widget based on the new state. Therefore, widgets are deigned to be light weighted so they can be created/destroyed very quickly. Unfortunately, WebView cannot fall into this category. WebView is as complex as the whole Flutter framework, so it cannot be a native widget but a plug-in. And WebView has its own internal state which is not compatible with the framework, which results in keep on being destroyed/recreated by the framework.
I am not sure why Flutter's widgets are designed in this way, maybe it is easier/faster for creating the framework? I saw some complex examples (~100 lines) using Redux/BLOC/Steam just in order to "change" a widget, which might just need a one-line of code in other frameworks.
Performance is also an issue. Rebuild a complex widgets tree is slow. Then you need writing a lot of code (Redux/BLOC/Stream/ScoppedModel...) in order to implement a partial widgets tree build.
Even for a very simple app, performance of Flutter is still not as good as native (https://thoughtbot.com/blog/examining-performance-differences-between-native-flutter-and-react-native-mobile-development). In fact, I'd like considering Flutter as "native" since it is compiled into machine code instead of Java's ByteCode.
Finally:
I am a new Flutter learner and start playing with Flutter for a couple of weeks. The widgets framework and the WebView plug-in just made me headache. A lot of time spent on the UI interface instead of the core logic of my app.
I am not saying Flutter is not good. Actually, I think it is the best cross-platform framework for iOS/Android. It just might be something (e.g. complex external widget like WebView) was not being taken into consideration while the framework was being designed. Hope the Flutter team can find a solution for this, maybe a special case for handling a complex external plug-in?
I will keep on learning/playing with Flutter.
And now Hybrid-Composition is default in webview_flutter 3.0.0:
https://pub.dev/packages/webview_flutter/changelog
Just tried it on my side and since it's not perfect, it's much more faster
cheers!
Updated to webview_flutter 1.0.x and adopted Hybrid-Composition. It performances much better on Android now.
Announcement: announcing-flutter-1-22-44f146009e5f
How to: webview_flutter
Docs: Hybrid-Composition

How to create android app running on top of another app

I want to develop a program like button savior (which runs on top of a another app and we can press menu, back buttons on top of a running app). So user do not need to press hardware buttons to access menu, back functionalities.
I want to do the same but to do it I have to run a app on top of another app.
How can I do this?
-Lasith.
Take a look at Robotium: http://code.google.com/p/robotium/
It seems to be doing what you want to do. You can take a look at the code and figure out how to do it.
Well i think that what you are looking for is creating something like Input Method (IME), there is a good tutorial to start with on Android Docs, another thing you can do is to create an activity which contains your virtual controller, distribute that as a lib and then if someone need it they can downloads and register your component into their project, something like what AdMobs does.

How can you have a page with a button that change views that is not a table view? (iPhone Developing)

I asked a similar question and someone gave me a tutorial link. But, the link made me use a table view and it looks bad with all the lines and stuff. So how do I just make a view with a button and background and stuff (Please write steps in 1.2.3.. format and it would be nice if you attached the code needed too.)???
It's really difficult to fit that kind of project into a comment field, and, in any case, the best way to learn is to get your hands dirty.
Take a look at the Utility sample project that is built into Xcode. Create a new project in Xcode, and under the iPhone Application templates, select Utility Application. This template project uses a button to switch between two views.