Pages

Showing posts with label Flutter. Show all posts
Showing posts with label Flutter. Show all posts

Friday, March 22, 2024

News : Flutter on Fedora 40 - the run debug info.

The run command comes with info about the running process, see:
[mythcat@fedora examples]$ ../flutter/bin/flutter run
Launching lib/main.dart on Linux in debug mode...
Building Linux application...                                           
Syncing files to device Linux...                                 1,488ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on Linux is available at: http://127.0.0.1:38903/k8tmzU7n0NQ=/
The Flutter DevTools debugger and profiler on Linux is available at:
http://127.0.0.1:9100?uri=http://127.0.0.1:38903/k8tmzU7n0NQ=/
If you open that URL you will see this type of informations:

Sunday, March 17, 2024

News : Flutter on Fedora 40.

Flutter transforms the development process. Build, test, and deploy beautiful mobile, web, desktop, and embedded experiences from a single codebase.
Read more on the official webpage.
Theoretically, Flutter can be used much easier in the Fedora 40 Linux distribution than in a Windows operating system.
The Windows installation method requires more complicated steps with the use of S.D.K. and settings of Android Studio I.D.E. .
Here are the steps you need to follow for a default installation.
[mythcat@fedora ~]$ mkdir ~/FlutterProjects
[mythcat@fedora ~]$ cd FlutterProjects/
[mythcat@fedora ~]$ wget https://storage.googleapis.com/flutter_infra_release/releases
/stable/linux/flutter_linux_3.3.10-stable.tar.xz
[mythcat@fedora ~]$ tar xf flutter_linux_3.3.10-stable.tar.xz
[mythcat@fedora ~]$
...

[mythcat@fedora FlutterProjects]$ ./flutter/bin/flutter doctor

┌─────────────────────────────────────────────────────────┐
│ A new version of Flutter is available!                  │
│                                                         │
│ To update to the latest version, run "flutter upgrade". │
└─────────────────────────────────────────────────────────┘
...

      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✗] Chrome - develop for the web (Cannot find Chrome executable at
    google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] VS Code (version 1.87.2)
[✓] Connected device (1 available)
[✓] HTTP Host Availability

! Doctor found issues in 3 categories.
[mythcat@fedora FlutterProjects]$ ./flutter/bin/flutter upgrade

...

    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] VS Code (version 1.87.2)
[✓] Connected device (1 available)
[✓] Network resources

! Doctor found issues in 4 categories.

[mythcat@fedora FlutterProjects]$ ./flutter/bin/flutter config --enable-linux-desktop
Setting "enable-linux-desktop" value to "true".

You may need to restart any open editors for them to read new settings.

[mythcat@fedora FlutterProjects]$ mkdir examples
[mythcat@fedora FlutterProjects]$ cd examples/

[mythcat@fedora examples]$ ../flutter/bin/flutter create .
Creating project ....
Resolving dependencies... (5.1s)
Got dependencies.
Wrote 129 files.

All done!
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider:
https://www.youtube.com/c/flutterdev

In order to run your application, type:

  $ cd .
  $ flutter run

Your application code is in ./lib/main.dart.

[mythcat@fedora examples]$ cd .
[mythcat@fedora examples]$ ls
analysis_options.yaml  ios    macos         README.md  windows
android                lib    pubspec.lock  test
examples.iml           linux  pubspec.yaml  web
[mythcat@fedora examples]$ ../flutter/bin/flutter run
The result is this simple default example:

Saturday, June 23, 2018

Fedora 28 : Starting develop with Flutter .

Today I started with another programming language Dart and Flutter.
The development team tell us about Flutter:
Flutter is Google's mobile UI framework for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.
You can read more about this on official webpage:
About linux setup you can read here.
You need also to download the Android Studio I.D.E from official webpage.
You need to install some packages using dnf tool:
[mythcat@desk ~]# dnf install libstdc++.i686
[mythcat@desk ~]#  dnf install curl
Unzip theAndroid Studio I.D.E.into android-studio folder and start it to make settings for android SDK and AVD emulated device:
[mythcat@desk ~]$ cd android-studio/
[mythcat@desk android-studio]$ ls 
bin        gradle                 jre  license      NOTICE.txt
build.txt  Install-Linux-tar.txt  lib  LICENSE.txt  plugins
[mythcat@desk android-studio]$ cd bin/
[mythcat@desk bin]$ ls
appletviewer.policy  idea.properties  printenv.py         studio.sh
format.sh            inspect.sh       restart.py          studio.vmoptions
fsnotifier           lldb             studio64.vmoptions
fsnotifier64         log.xml          studio.png
[mythcat@desk bin]$ ./studio.sh 
Select Plugins to add Dart and Flotter plugins:
You need to install Dart and Flotter plugins, use search:

Download and unarchive the Flutter from official webpage.
Next steps is to set the path for the Flutter and make settings for android licenses:
[mythcat@desk ~]$ export PATH=`pwd`/flutter/bin:$PATH
[mythcat@desk ~]$ cd flutter/
[mythcat@desk flutter]$ ls
analysis_options_repo.yaml  bin              flutter_console.bat  README.md
analysis_options.yaml       CONTRIBUTING.md  LICENSE              version
appveyor.yml                dev              packages
AUTHORS                     examples         PATENTS
[mythcat@desk flutter]$ cd bin/
[mythcat@desk bin]$ ls
cache  flutter  flutter.bat  internal
[mythcat@desk bin]$ ./flutter doctor --android-licenses
Warning: File /home/mythcat/.android/repositories.cfg could not be loaded.      
All SDK package licenses accepted.======] 100% Computing updates...             
[mythcat@desk bin]$ ./flutter doctor 
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.5.1, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.0)
[✓] Android Studio (version 3.1)
[!] Connected devices
    ! No devices available

! Doctor found issues in 1 category.

Use flutter command to get more help :
[mythcat@desk bin]$ ./flutter
Manage your Flutter app development.

Common commands:

  flutter create output directory=""
    Create a new Flutter project in the specified directory.

  flutter run [options]
    Run your Flutter application on an attached device or in an emulator.

Usage: flutter  [arguments]

Global options:
-h, --help            Print this usage information.
-v, --verbose         Noisy logging, including all shell commands executed.
-d, --device-id       Target device id or name (prefixes allowed).
    --version         Reports the version of this tool.
    --bug-report      Captures a bug report file to submit to the Flutter team (contains local paths, device
                      identifiers, and log snippets).

    --flutter-root    The root directory of the Flutter repository (uses $FLUTTER_ROOT if set).

Available commands:
  analyze          Analyze the project's Dart code.
  build            Flutter build commands.
  channel          List or switch flutter channels.
  clean            Delete the build/ directory.
  config           Configure Flutter settings.
  create           Create a new Flutter project.
  devices          List all connected devices.
  doctor           Show information about the installed tooling.
  drive            Runs Flutter Driver tests for the current project.
  emulators        List and launch available emulators.
  format           Format one or more dart files.
  fuchsia_reload   Hot reload on Fuchsia.
  help             Display help information for flutter.
  install          Install a Flutter app on an attached device.
  logs             Show log output for running Flutter apps.
  packages         Commands for managing Flutter packages.
  precache         Populates the Flutter tool's cache of binary artifacts.
  run              Run your Flutter app on an attached device.
  screenshot       Take a screenshot from a connected device.
  stop             Stop your Flutter app on an attached device.
  test             Run Flutter unit tests for the current project.
  trace            Start and stop tracing for a running Flutter app.
  upgrade          Upgrade your copy of Flutter.

Run "flutter help " for more information about a command. 
                                                                                                                                                                                                                                                                                                
Run "flutter help -v" for verbose help output, including less commonly used options.
Restart the Android Studio and create your first Flutter application.
You need to have all settings for your devices or emulated AVD devices to build and develop your android application.