Google Builders Weblog: Flutter and Chrome OS: Higher Collectively
Posted by the Flutter and Chrome OS groups
Chrome OS is the quick, easy, and safe working system that powers Chromebooks, together with the Google Pixelbook and thousands and thousands of units utilized by shoppers and college students each day. The newest Flutter launch provides assist for constructing stunning, tailor-made Chrome OS functions, together with wealthy assist for keyboard and mouse, and tooling to make sure that your app runs nicely on a Chromebook. Moreover, Chrome OS is a superb developer workstation for constructing general-purpose Flutter apps, due to its assist for creating and operating Flutter apps domestically on the identical gadget.
Flutter is a good way to construct Chrome OS apps
Since its inception, Flutter has shared lots of the similar ideas as Chrome OS: productive, quick, and exquisite experiences. Flutter permits builders to construct stunning, quick UIs, whereas additionally offering a excessive diploma of developer productiveness, and a totally open-source engine, framework and instruments. Briefly, it’s the best fashionable toolkit for constructing multi-platform apps, together with apps for Chrome OS.
Flutter initially targeted on offering a UI toolkit for constructing apps for cell units, which usually function contact enter and small screens. Nevertheless, we’ve been constructing keyboard and mouse assist into Flutter since earlier than our 1.zero launch final December. And in the present day, we’re happy to announce that Flutter for Chrome OS is now stronger with scroll wheel assist, hover administration, and higher keyboard occasion assist. As well as, Flutter has at all times been nice at permitting you to construct apps that run at any measurement (giant display screen or small), with seamless resizing, as proven right here within the Chrome OS Finest Practices Pattern:
The Chrome OS finest practices pattern in motion
The Chrome OS Hey World pattern is an app constructed with Flutter that’s optimized for Chrome OS. This features a responsive UI to showcase how one can reposition objects and have layouts that reply nicely to adjustments in measurement from cell to desktop.
As a result of Chrome OS runs Android apps, concentrating on Android is the best way to construct Chrome OS apps. Nevertheless, whereas constructing Chrome OS apps on Android has at all times been potential, as described in these tips, it’s typically troublesome to know whether or not your Android app goes to run nicely on Chrome OS. To assist with that drawback, in the present day we’re including a brand new set of lint guidelines to the Flutter tooling to catch violations of crucial of the Chrome OS finest apply tips:
The Flutter Chrome OS lint guidelines in motion
If you’re in a position to put these Chrome OS lint guidelines in place, you’ll shortly be capable to see any issues in your Android app that might hamper it when operating on Chrome OS. To learn to reap the benefits of these guidelines, see the linting docs for Flutter Chrome OS.
However all of that’s just the start — the Flutter instruments mean you can develop and take a look at your apps straight on Chrome OS as nicely.
Chrome OS is a superb developer platform to construct Flutter apps
It doesn’t matter what platform you are concentrating on, Flutter has assist for wealthy IDEs and programming instruments like Android Studio and Visible Studio Code. During the last yr, Chrome OS has been constructing assist for operating the Linux model of those instruments with the beta of Linux on Chrome OS (aka Crostini). And, as a result of Chrome OS additionally helps Android natively, you may configure the Flutter tooling to run your Android apps straight with out an emulator concerned.
The Flutter improvement instruments operating on Chrome OS
All the nice productiveness of Flutter is accessible, together with Stateful Sizzling Reload, seamless resizing, keyboard and mouse assist, and so forth. Current enhancements in Crostini, similar to excessive DPI assist, Crostini file system integration, simpler adb, and so forth, have made this expertise even higher! After all, you don’t have to check in opposition to the Android container operating on Chrome OS; you can even take a look at in opposition to Android units hooked up to your Chrome OS field. Briefly, Chrome OS is the best setting during which to develop and take a look at your Flutter apps, particularly while you’re concentrating on Chrome OS itself.
Prospects love Flutter on Chrome OS
With its distinctive mixture of simplicity, safety, and functionality, Chrome OS is an more and more well-liked platform for enterprise functions. These apps typically work with giant portions of knowledge, whether or not it’s a chart, or a graph for visualization, or lists and varieties for information entry. The assist in Flutter for top of the range graphics, giant display screen structure, and enter options (like textual content choice, tab order and mousewheel), make it a super approach to port cell functions for the enterprise. One purveyor of such apps is AppTree, who use Flutter and Chrome OS to resolve issues for his or her enterprise prospects.
“Making a Chrome OS model of our app took little or no effort. In 10 minutes we tweaked just a few values and now our customers have entry to our app on an entire new class of units. This can be a enormous deal for our enterprise prospects who’ve been wanting entry to our app on Desktop units.”
–Matthew Smith, CTO, AppTree Software program
Through the use of Flutter to focus on Chrome OS, AppTree was in a position to begin with their present Flutter cell app and simply adapt it to reap the benefits of the capabilities of Chrome OS.
Strive Flutter on Chrome OS in the present day!
Should you’d like to focus on Chrome OS with Flutter, you are able to do so in the present day just by putting in the newest model of Flutter. Should you’d prefer to run the Flutter improvement instruments on Chrome OS, you may observe these directions to get began quick. To see a real-world app constructed with Flutter that has been optimized for Chrome OS, take a look at the the Developer Quest pattern that the Flutter DevRel crew launched on the 2019 Google I/O convention. And eventually, don’t neglect to check out the Flutter Chrome OS linting guidelines to guarantee that your Chrome OS apps are following crucial practices.
Flutter and Chrome OS go nice collectively. What are you going to construct?