how to send server-side source code in Flutter (Code Push) - flutter

Is it possible to write a flutter code and save it inside server and then send it to a flutter application and implement this code .. Is this possible?
You can take a look at this:
https://pub.dev/packages/flutter_code_push
I tried a lot of things and got this package, but I couldn't use it on Windows devices.
flutter_code_push 1.0.2

Might be what you want.
Isolate.spawnUri can run compiled code.
https://github.com/dart-lang/sdk/issues/50158

Related

Save images for my web server in SPIFFS on esp32-S2

Hi it's my first time using esp32-S2 because now its not recommended to use esp32. I'm looking for saving images in SPIFFS for my web server. In esp32 i used to use esp32fs plugin (https://github.com/me-no-dev/arduino-esp32fs-plugin) but it doesn't work for esp32-S2. I would like to know if there is any plugin like esp32fs and if not how can i save my images (I'm using arduinoIDE 1.8.19). I've been searching but i didn't found anything. Any orientation is welcomed. Thank you for your time and assistance.
You can try my ESP32_FSWebServer_DRD or ESP_FSWebServer example of ESP_WiFiManager library
Follow the instructions in ESP_FSWebServer Example
You can use either deprecated SPIFFS or the better LittleFS

Best way to share supabase code between dart flutter and non-flutter dart applications?

Supabase provides supabase-dart for non-flutter applications and provides supabase-flutter for flutter applications. (The pubspec in supabase-flutter apears to use the supabase-dart package.)
I have dart code files that comprise a data access layer (for the postgres db) written for supabase. I'd like to share the dart code files between a non-flutter, server written in dart and a mobile app that of course is in flutter.
The imports in each code file of the flutter app all use:
import 'package:supabase_flutter/supabase_flutter.dart';
So, I didn't necessarily want to bring those code files into the non-flutter, dart server because they use supabase_flutter.
I have the exact same code files in the non-flutter, dart server but I replaced the imports with:
import 'package:supabase/supabase.dart';
And, it works fine, but I have to maintain two versions of essentially the same file.
For these shared files, is it ok to just use the non-flutter import in both the flutter and non-flutter apps?
(I have tried some combinations of this and things seem to work, but I don't know if there is something I need to be concerned about on this since the docs say to use one package for flutter and the other for non-flutter.)
For these shared files, is it ok to just use the non-flutter import in both the flutter and non-flutter apps?
Short answer yes.
supabase_flutter package is just supabase package wrapped with some Flutter specific code mainly to bring auth persistence, so you should be fine importing supabase package for some common pieces!

Fluter/Dart code loading over network

Recently, I watched the first introduction of Flutter originally named Sky on Youtube https://www.youtube.com/watch?time_continue=10&v=PnIWl33YMwA .
At 1:54 Eric Seidel says something like this - This all is loaded over the network. Dart code of the network. What happenend to it in Flutter?
Is it possible to load Dart code like new versions directly over the network without using the AppStore?
I'm not sure Eric was talking about the data or the actual code. It does sound like he meant both.
It may have been possible to load code over the network because on these early days they shipped the dart VM on releases and code was JIT compiled. Since late 2015 Flutter moved to Dart's AOT compilation (see this video).
So no, it's not possible to update your flutter apps through the network.
This all is loaded over the network. Dart code of the network
After watching the video, I got the context of the line. It means the data getting fetched from the network and the code written is in the Dart rather than Java.

Passing command line arguments to a flutter app

Is package:args ArgParser compatible with flutter apps? I see on Github that it is used several times in some Flutter tools, but I'm not sure it's used in any of the sample apps.
If it is not compatible, is there another way to pass configuration options to my app at compile time as part of its build rule?
package:args operates on List<String>, which can come from anywhere. For example, I've used it in a browser app, in which the arguments came from Chrome's JS console. If you are OK with using the HostMessages API, then the following might work for you:
On Android, turn Intent.getExtras into List<String> and pass it to package:args. Similarly, this answer may help on the iOS side.

Use protractor for desktop application testing

I have installed application on my desktop.I want to do the automation testing of this application with the use of protractor scripts.Please provide the suggestions.
Depends on what type of application you want to test. ProtractorJS is not the best tool for desktop app testing - since it designed for web-apps.
But if your desktop app built on electronjs - that changes the picture. In this case you can try to use this tutorial - https://github.com/electron/electron/blob/master/docs/tutorial/using-selenium-and-webdriver.md
Protractor provides method .wrapDriver() http://www.protractortest.org/#/api?view=Browser.wrapDriver
So i think you can try to wrap that driver from tutorial into protractor instance and work with it. I never tried that, and unfortunately you should try by your own, since it is not a common use-case of protractor.