Flutter and Dart install

Here you'll find a place for solutions and hints.

Please use one of the support subforums below for questions or if you have any issues and need support.

Flutter and Dart install

Postby mitlox » Apr 9th, '24, 08:26

Hi,
How is it possible to install:
* Flutter https://docs.flutter.dev/get-started/install/linux/web
* Dart https://dart.dev/get-dart

Thank you in advance,

Michal
mitlox
 
Posts: 7
Joined: Jan 1st, '24, 13:51

Re: Flutter and Dart install

Postby morgano » Apr 9th, '24, 11:26

Hi

For Dart, as it say on the page you linked one way is to use Docker, which Mageia have.

For Flutter, it is an exercise to follow the guide on that web page, with adaptations for Mageia. I am not the right person for details, but for example i see they mention package xz-utils, which on Mageia is named only xz. (And BTW we do not carry the compromised versions of xz.)

For general ideas on installing software not packaged on Mageia, see https://wiki.mageia.org/en/Ways_to_install_programs

You could also go one step further and use a virtual machine and in that install a system which have packages and guides for the software you want. https://wiki.mageia.org/en/Virtualisation
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1484
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Flutter and Dart install

Postby mitlox » Apr 10th, '24, 12:54

Thank you for your response. Please finde below the following solution:

Dart setup if you don't use Flutter
Code: Select all
$ sudo unzip dartsdk-linux-x64-release.zip -d /usr/local/dart
$ head ~/.bashrc
# .bashrc

# User specific aliases and functions
export PATH="$PATH:/usr/local/dart/dart-sdk/bin"

$ source ~/.bashrc

$ dart --help
A command-line utility for Dart development.

Usage: dart <command|dart-file> [arguments]
...



Flutter comes with Dart. DON'T use the above solution with FLUTTER

Web ( https://docs.flutter.dev/get-started/install/linux/web )
Code: Select all
$ sudo urpmi update -a && sudo urpmi curl git unzip xz-utils zip mesa-libGLU

# Install Chrome (https://wiki.mageia.org/en/Installing_Google_Chrome_in_Mageia)
$ echo Google-chrome-stable $([ "x86_64" = $(uname -m) ] && echo "on 64-bit is "|| echo "on non-64-bit is *not*" ) available
$ sudo urpmi.addmedia --update google-chrome http://dl.google.com/linux/chrome/rpm/stable/x86_64/
$ sudo rpm -import https://dl-ssl.google.com/linux/linux_signing_key.pub
$ rpm -qi gpg-pubkey-7fac5991-*
$ sudo urpmi google-chrome-stable


Desktop (https://docs.flutter.dev/get-started/in ... ux/desktop)
Code: Select all
$ sudo urpmi update -a && sudo urpmi clang cmake git ninja-build pkg-config gtk3-devel libstdc++-devel liblzma-devel


Android (https://docs.flutter.dev/get-started/in ... ux/android)
Flutter for Android requieres some i386 packages which I could not find:
Code: Select all
$ sudo urpmi update -a && sudo urpmi libstdc++6:i386 libz1 libbz2_1
No package named libstdc++6:i386
No package named libbz2_1


Additionally KVM Support (https://forums.mageia.org/en/viewtopic.php?f=41&t=12043)

##Check if your CPU supports hardware virtualization:

Code: Select all
$ egrep -c '(vmx|svm)' /proc/cpuinfo
8

If it is bigger than `0` you can use kvm.

Code: Select all
$ ls /dev/kvm
/dev/kvm


Code: Select all
$ sudo usermod -aG kvm <user name>


Logout, and you are ready to create virtual machines

Installing Flutter SDK

Code: Select all
$ sudo mkdir -p /usr/local/flutter
$ sudo tar xf ~/Downloads/flutter_linux_3.19.5-stable.tar.xz -C /usr/local/flutter
$ head ~/.bashrc
# .bashrc

# User specific aliases and functions
export PATH="/usr/local/flutter/flutter/bin:$PATH"

$ source ~/.bashrc


Download Android Studio (https://developer.android.com/studio)

Code: Select all
$ tar xfvz android-studio-2023.2.1.25-linux.tar.gz
$ mkdir ~/apps/
$ mv android-studio/ ~/apps/
$ ~/apps/android-studio/bin/studio.sh


After install:

1. Do this https://stackoverflow.com/a/71036049/3523406
2. In terminal `$ flutter doctor --android-licenses`
3. In terminal `$ flutter doctor`

Flutter in Andoid Studio:
I opened android studio. A window opened `welcome to android studio`
1. Plugins: Install Flutter (Goolge). Restart IDE.
2. New Flutter Project.
3. On the left in Dart section: Path to Dart SDK `/usr/local/flutter/flutter/bin/cache/dart-sdk`

Please correct any mistake and maybe someone knows how to get Flutter for Android running.
mitlox
 
Posts: 7
Joined: Jan 1st, '24, 13:51


Return to The magician suggests...

Who is online

Users browsing this forum: No registered users and 1 guest

cron