1621498749
Flutter package for prompting users to update with a native dialog whether using the app store version or any version at the user’s discretion.
When a latest app version is available via user defined logic, a simple alert prompt widget is displayed. With today’s modern app stores, there is little need to persuade users to update because most of them are already using the auto update feature. However, there may be times when an app needs to be updated more quickly than usual, and nagging a user to update will entice the update sooner.
The UI comes in two flavors: Material Design for Android and Cupertino for iOS. The UpdateMaterialAlert widget is used to display the native Android alert prompt, and the UpdateCupertinoAlert widget is used to display the native iOS alert prompt.
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.3
# Add this inside pubspec.yaml
native_updater:
git: https://github.com/loadsmileau/native_updater
Already good to go.
To be able to show your App Name in the Cupertino Alert Dialog, add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist
:
<key>CFBundleDisplayName</key>
<string>YOUR APP NAME</string>
Just add this code whenever you want to display the update alert, and it will handle the rest.
NativeUpdater.displayUpdateAlert(
context,
forceUpdate: true,
);
Or with the optional parameters to customize the alert.
NativeUpdater.displayUpdateAlert(
context,
forceUpdate: true,
appStoreUrl: '<Your App Store URL>',
playStoreUrl: '<Your Play Store URL>',
iOSDescription: '<Your iOS Description>',
iOSUpdateButtonLabel: '<Your iOS Update Button Label>',
iOSCloseButtonLabel: '<Your iOS Close Button Label>',
iOSIgnoreButtonLabel: '<Your iOS Ignore Button Label>',
iOSAlertTitle: '<Your Dialog Title>',
);
context is the location in the tree where this widget builds.
forceUpdate is to tell whether the alert is forcing an update or not. Set to true
if you are forcing an update. Set to false
if you are giving an option to update later.
appStoreUrl is to launch your App Store URL if you’re developing for iOS. Follow this link on how to find your App Store URL.
playStoreUrl is to launch your Play Store URL if you’re developing for Android. Follow this link on how to find your Play Store URL.
iOSDescription is to use your custom alert description on UpdateCupertinoAlert
. The default is <App Name> requires that you update to the latest version. You cannot use this app until it is updated.
or <App Name> recommends that you update to the latest version. You can keep using this app while downloading the update.
iOSUpdateButtonLabel is used to set your custom Update Button Label on UpdateCupertinoAlert
. The default is Update
.
iOSCloseButtonLabel is used to set your custom Close Button Label onUpdateCupertinoAlert
. The default is Close App
.
iOSIgnoreButtonLabel is used to set your custom Ignore Button Label onUpdateCupertinoAlert
. The default is Later
.
iOSAlertTitle is used to set your custom Dialog Title onUpdateCupertinoAlert
. The default is Update Available
.
import 'package:flutter/material.dart';
import 'package:native_updater/native_updater.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'native_updater example',
home: Home(),
);
}
}
class Home extends StatefulWidget {
@override
_HomeState createState() => _HomeState();
}
class _HomeState extends State<Home> {
@override
void initState() {
super.initState();
checkVersion();
}
Future<void> checkVersion() async {
/// For example: You got status code of 412 from the
/// response of HTTP request.
/// Let's say the statusCode 412 requires you to force update
int statusCode = 412;
/// This could be kept in our local
int localVersion = 9;
/// This could get from the API
int serverLatestVersion = 10;
Future.delayed(Duration.zero, () {
if (statusCode == 412) {
NativeUpdater.displayUpdateAlert(
context,
forceUpdate: true,
appStoreUrl: '<Your App Store URL>',
playStoreUrl: '<Your Play Store URL>',
iOSDescription: '<Your iOS description>',
iOSUpdateButtonLabel: 'Upgrade',
iOSCloseButtonLabel: 'Exit',
);
} else if (serverLatestVersion > localVersion) {
NativeUpdater.displayUpdateAlert(
context,
forceUpdate: false,
appStoreUrl: '<Your App Store URL>',
playStoreUrl: '<Your Play Store URL>',
iOSDescription: '<Your description>',
iOSUpdateButtonLabel: 'Upgrade',
iOSIgnoreButtonLabel: 'Next Time',
);
}
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Your App'),
),
body: Center(
child: Text('Testing...'),
),
);
}
}
Force Update
Can Update Later
Author: ofload
Download Link: Download The Source Code
Official Website: https://github.com/ofload/native_updater
License: MIT
#flutter
1598839687
If you are undertaking a mobile app development for your start-up or enterprise, you are likely wondering whether to use React Native. As a popular development framework, React Native helps you to develop near-native mobile apps. However, you are probably also wondering how close you can get to a native app by using React Native. How native is React Native?
In the article, we discuss the similarities between native mobile development and development using React Native. We also touch upon where they differ and how to bridge the gaps. Read on.
Let’s briefly set the context first. We will briefly touch upon what React Native is and how it differs from earlier hybrid frameworks.
React Native is a popular JavaScript framework that Facebook has created. You can use this open-source framework to code natively rendering Android and iOS mobile apps. You can use it to develop web apps too.
Facebook has developed React Native based on React, its JavaScript library. The first release of React Native came in March 2015. At the time of writing this article, the latest stable release of React Native is 0.62.0, and it was released in March 2020.
Although relatively new, React Native has acquired a high degree of popularity. The “Stack Overflow Developer Survey 2019” report identifies it as the 8th most loved framework. Facebook, Walmart, and Bloomberg are some of the top companies that use React Native.
The popularity of React Native comes from its advantages. Some of its advantages are as follows:
Are you wondering whether React Native is just another of those hybrid frameworks like Ionic or Cordova? It’s not! React Native is fundamentally different from these earlier hybrid frameworks.
React Native is very close to native. Consider the following aspects as described on the React Native website:
Due to these factors, React Native offers many more advantages compared to those earlier hybrid frameworks. We now review them.
#android app #frontend #ios app #mobile app development #benefits of react native #is react native good for mobile app development #native vs #pros and cons of react native #react mobile development #react native development #react native experience #react native framework #react native ios vs android #react native pros and cons #react native vs android #react native vs native #react native vs native performance #react vs native #why react native #why use react native
1597014000
Flutter Google cross-platform UI framework has released a new version 1.20 stable.
Flutter is Google’s UI framework to make apps for Android, iOS, Web, Windows, Mac, Linux, and Fuchsia OS. Since the last 2 years, the flutter Framework has already achieved popularity among mobile developers to develop Android and iOS apps. In the last few releases, Flutter also added the support of making web applications and desktop applications.
Last month they introduced the support of the Linux desktop app that can be distributed through Canonical Snap Store(Snapcraft), this enables the developers to publish there Linux desktop app for their users and publish on Snap Store. If you want to learn how to Publish Flutter Desktop app in Snap Store that here is the tutorial.
Flutter 1.20 Framework is built on Google’s made Dart programming language that is a cross-platform language providing native performance, new UI widgets, and other more features for the developer usage.
Here are the few key points of this release:
In this release, they have got multiple performance improvements in the Dart language itself. A new improvement is to reduce the app size in the release versions of the app. Another performance improvement is to reduce junk in the display of app animation by using the warm-up phase.
If your app is junk information during the first run then the Skia Shading Language shader provides for pre-compilation as part of your app’s build. This can speed it up by more than 2x.
Added a better support of mouse cursors for web and desktop flutter app,. Now many widgets will show cursor on top of them or you can specify the type of supported cursor you want.
Autofill was already supported in native applications now its been added to the Flutter SDK. Now prefilled information stored by your OS can be used for autofill in the application. This feature will be available soon on the flutter web.
A new widget for interaction
InteractiveViewer
is a new widget design for common interactions in your app like pan, zoom drag and drop for resizing the widget. Informations on this you can check more on this API documentation where you can try this widget on the DartPad. In this release, drag-drop has more features added like you can know precisely where the drop happened and get the position.
In this new release, there are many pre-existing widgets that were updated to match the latest material guidelines, these updates include better interaction with Slider
and RangeSlider
, DatePicker
with support for date range and time picker with the new style.
pubspec.yaml
formatOther than these widget updates there is some update within the project also like in pubspec.yaml
file format. If you are a flutter plugin publisher then your old pubspec.yaml
is no longer supported to publish a plugin as the older format does not specify for which platform plugin you are making. All existing plugin will continue to work with flutter apps but you should make a plugin update as soon as possible.
Visual Studio code flutter extension got an update in this release. You get a preview of new features where you can analyze that Dev tools in your coding workspace. Enable this feature in your vs code by _dart.previewEmbeddedDevTools_
setting. Dart DevTools menu you can choose your favorite page embed on your code workspace.
The updated the Dev tools comes with the network page that enables network profiling. You can track the timings and other information like status and content type of your** network calls** within your app. You can also monitor gRPC traffic.
Pigeon is a command-line tool that will generate types of safe platform channels without adding additional dependencies. With this instead of manually matching method strings on platform channel and serializing arguments, you can invoke native class and pass nonprimitive data objects by directly calling the Dart
method.
There is still a long list of updates in the new version of Flutter 1.2 that we cannot cover in this blog. You can get more details you can visit the official site to know more. Also, you can subscribe to the Navoki newsletter to get updates on these features and upcoming new updates and lessons. In upcoming new versions, we might see more new features and improvements.
You can get more free Flutter tutorials you can follow these courses:
#dart #developers #flutter #app developed #dart devtools in visual studio code #firebase local emulator suite in flutter #flutter autofill #flutter date picker #flutter desktop linux app build and publish on snapcraft store #flutter pigeon #flutter range slider #flutter slider #flutter time picker #flutter tutorial #flutter widget #google flutter #linux #navoki #pubspec format #setup flutter desktop on windows
1622532470
Hire Flutter App Developers: WebClues Infotech is a Flutter App Development company. Our Flutter mobile app development team can create cross-platform apps for different industry verticals. Our Flutter developers will help you extend your business’s scope by developing enhanced functionality and a feature-rich app. To provide a rich user experience to your users, hire dedicated Flutter app developers from WebClues Infotech today!
#hire flutter app developers #hire dedicated flutter app developer usa #hire flutter app developer usa #hire dedicated flutter app developer #hire flutter developer #flutter app development company
1606986883
Are you looking for the best flutter app development company? Then AppClues Infotech is the leading flutter app development company in USA offering the best service worldwide. We focused on developing hybrid mobile apps on Android & iOS and assures our end-user about exceptional and functionally-rich mobile apps.
For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910
#top flutter app development company in usa #best flutter app development service #best flutter app development company #hire flutter app developers #flutter app development company #expert flutter app development company
1608627556
AppClues Infotech is one of the best flutter app development company in USA & India. Our diverse and experienced team of developers can help you sketch the smartest and quickest solution for your mobile app development projects with the most superior technology.
For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910
#top flutter app development company in usa #best flutter app development service #best flutter app development company #hire flutter app developers #flutter app development company in usa & india #custom flutter app development service