MobilePro #53: ⌚Wear Compose from Android, Flutter Templates 📑, JavaScript☕ and Python🐍 Bundles
We're back with another edition of the _mobilepro and we've got news from Android, Apple and Microsoft - a new wear compose update from Android, WWDC22 in more languages, Xcode subscription from Apple, and Python and Jetpack Compose releases from Microsoft.
This week, we have curated articles that showcase:
The 15 best Flutter templates
How to create Android and iOS apps from NuxtJS
New Flutter and Dart SDKs from AppWrite
Null and Null Safety in Dart
Cross-platform App Development Frameworks
And if you are passionate to keep learning about the mobile app world, don't forget to check out our book offers - this week, we're looking at JavaScript and Python.
As always, check out our survey and tell us what you want us to cover - the _mobilepro only works thanks to its community, so we need the community to tell us what it wants! Please hit the button to share your inputs, first 50 respondents will receive a free best-selling eBook PDF.
Complete Survey, Get a Free PDF!
Thanks,
Apurva Kadam
Associate Editor-in-Chief, Packt
The Complete JavaScript ☕ Bundle
Master the JavaScript skills and functional techniques with this comprehensive bundle for writing cleaner, safer, and performant JavaScript code.
Python Programming 🐍 Masterclass Bundle
Kickstart your career with this ultimate bundle by exploring modern Python through data structures, design patterns, and effective object-oriented techniques.
What’s happening in tech?
The week Android, Apple and Microsoft rolled out these announcements and updates:
Android
Wear Compose stable release – Wear Compose 1.01 stable version is now out! Write Jetpack Compose applications for Wearable devices by providing functionality to support wearable-specific devices, sizes, shapes, and navigation gestures.
Apple
WWDC22 video subtitles now in more languages - You can now watch the Keynote, Platforms State of the Union, and nearly 200 sessions from this year’s Apple Worldwide Developers Conference with Japanese, Korean, and Simplified Chinese subtitles. Available on the web or the Apple Developer app.
Xcode Cloud subscriptions now available - Xcode Cloud, the continuous integration and delivery service accelerates development and delivery. Configure a workflow in Xcode and receive 25 compute hours per month for free until the end of 2023. Subscribe for more compute hours in the Apple Developer app!
iOS 16 beta 8 – The iOS & iPadOS 16 SDK provides support to develop apps for iPhone, iPad, and iPod touch devices running iOS & iPadOS 16 beta 7. The SDK comes bundled with Xcode 14 beta 6, available from Beta Software Downloads.
Microsoft
Python in Visual Studio Code – September 2022 Release – The company announced the September 2022 release of the Visual Studio Code Python and Jupyter extensions. This release includes the following announcements Improved IntelliSense support for Jupyter Notebooks, A new Flake8 extension, and Internship highlight: improved unit test support and notebook image pasting
.NET MAUI Cloud Skills Challenge – Learn .NET MAUI, Get Stickers! – The .NET MAUI Cloud Skills Challenge is a fun and exciting way to learn .NET MAUI and grab the latest .NET MAUI sticker swag! Sign up and finish all the .NET MAUI training modules for a chance to win. The challenge is now extended from August 31 to September 30 so more people can join in!
Dual-screen example adds Jetpack Compose to the experience – This week, two big updates to the dual-screen experience example: a Compose refactor of the catalog page and a brand new order history page were announced. The dual-screen experience example provides an end-to-end experience centered around a traveling guitar salesperson, with options to find fake guitar stores, read a catalog, browse products, place fake guitar orders, and now, view order history.
Weekly Picks
We’ve picked out some interesting articles from the tech world for you:
Deep Dive Into Null and Null Safety in Dart – In this article, you will explore the concept of Null and the beauty of Null safety. If used appropriately, Null safety can help you in writing better and less error-prone codes.
Announcing New Versions for Appwrite's Flutter and Dart SDKs- This blog announces the release of versions 7.0 and 6.1 of the Appwrite SDKs for Flutter and Dart. The new versions add some fixes and update outdated dependencies for both SDKs.
How to create Android and iOS apps from the NuxtJS application using CapacitorJS - In this article, Yevhen Bondar will show how to wrap an existing NuxtJS web application into Android and iOS mobile apps using CapacitorJS.
15 best Flutter Templates 2022 with LivePreview - In this article, Pablo Discobar outlines the top 15 Flutter templates along with their description and features to help you make the right choice to develop your apps.
Top 5 Cross-Platform Development Frameworks – In this blog, Max Pundyk details cross-platform development app frameworks focusing on their significance while highlighting their benefits.
Tutorial of the Week
Kotlin Flows
Flow is a new Kotlin asynchronous stream library that is built on top of Kotlin coroutines. A flow can emit multiple values instead of a single value and over a period of time. Kotlin Flow is ideal to use when you need to return multiple values asynchronously, such as automatic updates from your data source.
Flow is now used in Jetpack libraries such as Room-KTX and Android developers are already using Flow in their applications.
To use Kotlin Flows in your Android project, you have to add coroutines. An easy way to create a flow of objects is to use the flow{}
builder. With the flow{}
builder function, you can add values to the stream by calling emit.
Let’s say in your Android app you have a getTextFromNetwork
function that fetches text from a network endpoint and returns it as a String
object:
fun getTextFromNetwork(): String { ... }
If we want to create a flow of each word of the text, we can do it with the following code:
private fun getWords(): Flow<String> = flow {
getTextFromNetwork().split(" ").forEach {
delay(1_000)
emit(it)
}
}
Flow does not run or emit values until the flow is collected with any terminal operators, such as collect
, launchIn
, or single
. You can use the collect()
function to start the flow and process each value, as follows:
private suspend fun displayWords() {
getWords().collect {
Log.d("flow", it)
}
}
A visual representation of this flow is shown in the following figure:
Figure 1.7 – Kotlin Flow visual representation
As you can see in Figure 1.7, as soon as the getWords()
flow emits a string, the displayWords
function collects the string and displays it immediately on the logs.
In this section, you learned about Kotlin coroutines and flows, the recommended way to carry out asynchronous programming in Android. Coroutines is a Kotlin library for managing long-running tasks in the background. Flow is a new Kotlin asynchronous stream library, built on top of coroutines, that can emit multiple values over a period of time.
This how-to was curated from the book
Simplifying Android Development with Coroutines and Flows
👇 Hit the button to take a deeper dive into the world of Android! 👇
New Book Releases
Discover state management solutions with InheritedWidget and the Provider package
Create responsive and beautiful UIs with the Material and Cupertino libraries
Explore animations, forms, gestures, and backend integration with Supabase
Events and Conferences
iOSDevUK
This conference is about content, community and cost. They have around 30 great speakers a year, mostly in two parallel sessions, giving a wide range of interesting and challenging talks. This is a friendly conference in a friendly place, and you make new friends in the industry. They aim to be affordable for people paying their own attendance, not just for those with corporate budgets. For others, given the place by the seaside, it might be all about Sun, Sand and Swift - come and find out what is best about iOSDevUK for you.
When: September 5-8th, 2022
PyGeekle'22
Geekle started doing online events when offline events were stopped completely. We never stop and we are running the online PyGeekle'22. Our speakers are leading experts from all over the world who are ready to share what challenges Python experts face in their work. Geekle has the unique experience to gather huge tech summits with 5'000+ attendees in different tech domains. Now we hope to make something the world has never seen before for the Python Community.
When: September 6-7th, 2022
App Growth Summit London 2022
App Growth Summit London 2022 will feature a full day of content aimed at helping App Marketers, Brands, and Entertainment & Gaming companies refine their 2022 plans for growth! This invite-only, limited-vendor event is designed to create maximum high-quality connections and in-depth learning opportunities. App Growth Summit London 2022 provides the UK with the latest up-to-date strategies and trends for this rapidly growing mobile app community.
When: September 8th, 2022
See you next week!