Download Flutter Mac

Flutter is an SDK that you download and unpack onto a directory in your Mac. There is no automatic uninstall process in the same way that there is no automatic install process.

5 Install Flutter and Dart. Open Android Studio select plugins and search for Flutter. I have already installed but here you just have to click on the install button. It will take permissions to install the Dart plugin as well. Just allow and after you install flutter and dart restart the android studio. Important: If you’re installing on a Mac with the latest Apple M1 processor, you may find these supplementary notes useful reading as we complete support for the new Apple Silicon architecture. Get the Flutter SDK. Download the following installation bundle to get the latest stable release of the Flutter SDK.

In this tutorial, we are going to install flutter SDK, to be precise setting up flutter SDK and running our very first Flutter example. It is super easy to install flutter, please follow the below mentioned steps and we are good to go.

1 Download Flutter SDK

To download the Flutter SDK. You have to follow the Flutter SDK download link. Select your operating system. I am Mac user so I will follow the MacOS guide but it is same for Windows and Linux.

After choosing the right operating system. You will see this button to download the SDK. Click to download the SDK.

2 Unzip The Downloaded SDK

Now simply find unzip the downloaded SDK, unzip where you feel it will stay intact.

Download flutter mac

3 Platform Setup

As we already know flutter code build a mobile application both for Android and iOS. If you are a MacOS user then please install Xcode and set up a simulator. Steps are pretty simple. Go to App Store search for Xcode, install and create a simulator.

For Android install Android Studio, open AVD manager and set up an android emulator. If you are interested to test the code on a real device don’t forget to Enable Developer options and USB debugging. And on Windows install USB driver as well.

4 Setup Editor

You can create apps in Flutter using any rich text editor either its Sublime or VS Code. With these editors, you have to set up the command line tools. The most widely used are Visual Studio Code and IntelliJ.

I would prefer to build flutter apps in Android Studio. Everything is pretty easy and stable with the android studio.

Flutter ios simulator

5 Install Flutter and Dart

Flutter

Open Android Studio select plugins and search for Flutter. I have already installed but here you just have to click on the install button. It will take permissions to install the Dart plugin as well. Just allow and after you install flutter and dart restart the android studio.

Create Project

Now you will able to see “Start a new Flutter project” click on it to create a new project. Here is another important but very simple thing. Set the flutter SDK path, you just have to give the SDK path where we unzipped it in the 2 step.

Download Flutter Sdk Macos

Write the app name and choose the location where you want to save this project. Select the next button. On the next screen if you have a website write the website name or otherwise write anything. You can update this information later on as well. Hit the next button and choose Flutter application (1st option) and finish.

Run the Application

Now we are ready to test a real application on an emulator. Click on 1 st icon and create an emulator of your own choice. Click on the 2nd icon: If you have attached a real device or iOS simulator you can choose on which device you want to install. I have an iOS simulator I will test on it.

Output

Here we have a default sample running application. It time to build something great. Happy Coding 😉

The Flutter barcode SDK series is coming to the end. This week, we switch the coding environment to macOS to finish the rest of the plugin platforms - iOS and macOS - using Swift.

The Series of Flutter Barcode SDK

Download

  • Dynamsoft Barcode Reader

Flutter Barcode and QR Code Plugin for iOS

Mac

As always, we add the iOS template to the existing plugin project first:

The command generates a flutter_barcode_sdk.podspec file for build configuration and a Classes folder containing code implementation.

You can either set vendored_frameworks or dependency for linking in flutter_barcode_sdk.podspec. The difference is vendored_frameworks are the paths of the framework bundles shipped with the plugin, whereas setting dependency triggers pod install if the framework is not locally cached. If you have trouble in building the project with dependency, vendored_frameworks could be the alternative. The only problem of using vendored_frameworks is you cannot publish the package to pub.dev if the package size is over 100 MB.

Next, we open Classes/SwiftFlutterBarcodeSdkPlugin.swift file to start coding.

Here is the code snippet for importing and initializing Dynamsoft Barcode Reader:

The organization ID 200001 authorizes developers to use the SDK for 7 days.

The public func handle() function is used to handle Flutter method call:

We can implement the corresponding methods as follows:

Before testing the plugin, we have to open example/ios/Runner.xcworkspace in Xcode to configure the signing certificate. After that, we can run flutter run in terminal to launch the barcode scanner demo app. No extra Flutter code needed, because the Dart code for UI is shared between Android and iOS:

Flutter Barcode and QR Code Plugin for macOS

Once the Flutter barcode plugin is done for iOS, developing the plugin for macOS is much easier. Probably you have noticed that there is no framework for macOS but only dylib. To utilize the barcode SDK for macOS, we need to create a bridging header.

Here are the steps:

  1. Add the Flutter macOS template to the current plugin project:

  2. Create a bridging header macos/Runner/Runner-Bridging-Header.h:

    Set the path of the bridging header in Xcode:

  3. Copy the Swift code from ios/Classes/SwiftFlutterBarcodeSdkPlugin.swift to macos/Classes/FlutterBarcodeSdkPlugin.swift.

Download Flutter Mac Os

Although the macOS application can now run successfully, it will fail to access files due to the sandbox restriction. To enable loadings file via file path string, we disable the entitlementcom.apple.security.app-sandbox in example/macos/Runner/DebugProfile.entitlements:

Finally, the Flutter macOS barcode reader can work perfectly. Let’s test it with a distorted QR Code image:

Ending

Download Flutter 1.22.4 For Mac

So far, the Flutter barcode SDK has covered Windows, Linux, macOS, iOS, Android, and web. It will also support Fuchsia OS in the near future.

Download Flutter On Mac

Source Code