Flutter : Install2025/03/21 |
Install Flutter. |
|
[1] | |
[2] | Install Chrome. |
[root@dlp ~]#
[root@dlp ~]# dnf -y install curl git clang cmake zip unzip pkg-config liberation-fonts libblkid gtk3-devel dnf -y install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
|
[3] | Install Flutter. |
[root@dlp ~]# snap install flutter --classic flutter 0+git.1fa6fd6 from Flutter Team✓ installed |
[4] | Log in to desktop as any user and run Android Studio, then click [Plugins] in the left pane. |
![]() |
[5] | Select [Flutter] and click the [Install] button. |
![]() |
[6] | Click the [Restart IDE] button to restart Android Studio. |
![]() |
[7] | On the main Android Studio screen, click [More Actios] in the right pane and select [SDK Manager] in the menu. |
![]() |
[8] | Move to the [SDK Tools] tab and check a box [Android SDK Command-line Tools], then click the [OK] button. |
![]() |
[9] | After the installation is complete, click the [Finish] button. |
![]() |
[10] | Run the terminal and enter the command [flutter doctor --android-licenses]. The terms of use will be displayed, so read them carefully, understand them, and agree to all of them. |
![]() |
![]() |
[11] | Finally, enter the command [flutter doctor]. If it displays [No issues found!], the installation is complete. |
![]() |
[12] | Create a test application from the command line to verify that it works. |
[cent@dlp ~]$ flutter create testapp Creating project testapp... Resolving dependencies in `testapp`... Downloading packages... Got dependencies in `testapp`. Wrote 130 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 testapp $ flutter run Your application code is in testapp/lib/main.dart.[cent@dlp ~]$ cd testapp
[cent@dlp testapp]$
vi lib/main.dart mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ // line 107 : add Hello World text const Text( 'Hello Flutter World!', style: TextStyle( fontSize: 48, fontWeight: FontWeight.bold, color: Colors.red, ) ), const Text('You have pushed the button this many times:'), Text( '$_counter', style: Theme.of(context).textTheme.headlineMedium, ),[cent@dlp testapp]$ flutter run -d web-server --web-hostname=0.0.0.0 --web-port=43101 Launching lib/main.dart on Web Server in debug mode... Waiting for connection from debug service on Web Server... 14.0s lib/main.dart is being served at http://0.0.0.0:43101 The web-server device requires the Dart Debug Chrome extension for debugging. Consider using the Chrome or Edge devices for an improved development workflow. To hot restart changes while running, press "r" or "R". For a more detailed help message, press "h". To quit, press "q". |
Access to the web from any client computer to verify it works normally. |
![]() |
|