If an application needs anything outside its scope, then it has to request permission to the user or application. The Mobile operating system comes with a set of predefined permissions (System permissions) for certain tasks. All mobile applications can request the required permissions to access a particular service of OS. For example, an application can declare required permissions like network, contact, and GPS.
Sunday, March 29, 2020
Flutter - Permission handler example
If an application needs anything outside its scope, then it has to request permission to the user or application. The Mobile operating system comes with a set of predefined permissions (System permissions) for certain tasks. All mobile applications can request the required permissions to access a particular service of OS. For example, an application can declare required permissions like network, contact, and GPS.
Sunday, March 22, 2020
Flutter - Example of gradient widgets and animaion.
User-friendly interface and good color combination of the app components make a large user base for any application. The gradient is a combination of two or more colors and tints of the same color that creates great user interfaces for application. You can use gradients to create color blends, add volume to vector objects, add a light and shadow effect to the app components.
Monday, March 9, 2020
Flutter - Web app setup with VS Code and Android Studio IDE.
As we know, Flutter is a cross-platform app development toolkit that is created by Google. It has been winning the hearts of developers and businesses across Android and iOS apps. Many renowned companies like Alibaba & Tencent have adopted it to develop native mobile apps for their production apps. Now, Google has officially added web, desktop and Embedded platforms to the world of Flutter app development. So, you can use your existing Flutter knowledge to build other platform applications. You can learn more about the new added platforms support on the official website.
Sunday, February 23, 2020
Flutter - What is Scaffold widget.
Flutter framework provides rich widgets catalogs to create a good looking material application. Here, we can see some of the key features that a material theme app must have:
- A theme for the application.
- App Bar.
- Body.
- Floating Action Button.
- Bottom Navigation Bar.
Wednesday, January 8, 2020
Flutter - Interview questions
What is Dart?
- Dart is a client-optimized, object-oriented, class-based, garbage-collected, programming language that can be used to build mobile, desktop, server, and web applications. Dart can compile to either native code or JavaScript. It supports interfaces, abstract classes, mixins, reified generics, and type inference.
What is Flutter?
- Flutter is a open-source mobile UI framework that is created by Google. It allows us to develop a multi platforms application with one programming language(Dart) and one code-base. It uses own high-performance rendering engine to draw widgets and systems such as animation, gesture, and widgets.
What is the Difference between Stateless and Stateful widget?
- The Stateless widget does not require a mutable state. Stateless widgets are not dynamically changed whenever you update any value. For example, if you want to make a button or text whose title doesn't need to change dynamically, then you can create a separate widget for a button as a Stateless widget.
- The Stateful widget has a mutable state. It means, when you want to make something that you want to change dynamically according to how a user interacts with it, then you can use the Stateful widget. For example, if you want to change the background color of the app on the click of a button, you can make use of a Stateful widget in this case.
Sunday, January 5, 2020
Flutter - Twitter Auth and Login
User authentication is a powerful feature of any application. Once an app identifies the individual users who are using the app. Then you can customize your app’s content that feels as though it was designed with a specific user in mind.
Twitter one of the option that we can use for user authentication in applications. The Twitter API's provide login ability to the application to users. The user can easily login to the app using their twitter account which avoids filling a long sign-up form. With the help of social networks, it's much quicker and easier way of getting users signed into your app using an account they’ve already created with an external authentication provider, such as Facebook or Twitter.
We have written a post for the Facebook login feature for Flutter application: Facebook login and authentication example.
Twitter one of the option that we can use for user authentication in applications. The Twitter API's provide login ability to the application to users. The user can easily login to the app using their twitter account which avoids filling a long sign-up form. With the help of social networks, it's much quicker and easier way of getting users signed into your app using an account they’ve already created with an external authentication provider, such as Facebook or Twitter.
We have written a post for the Facebook login feature for Flutter application: Facebook login and authentication example.
Sunday, December 29, 2019
Flutter - Propagate information with InheritedWidget.
As we know, a Flutter application manages a tree of widgets that sometimes become a very deep tree of widgets. In this big tree, if you want to pass parameters from root to lower widget. You can do it with the help of the constructor that is perfectly fine for accessing data one level down, maybe even two. But if you're widget tree level is deep and you suddenly need the data from an object in your code from root to lower widget. It'll become complex and lead to a lot of boilerplate code for passing context around, as shown below:
In order to provide a solution for this situation, Flutter provides a special widget called InheritedWidget that defines a context at the root of a sub-tree. It can efficiently deliver this context to every widget in that sub-tree. This widget is specially designed to hold data and to provide it throughout the widget tree, irrespective of its depth. InheritedWidget is the base class for widgets that efficiently propagate information down the widgets tree. All widgets part of that sub-tree will have to ability to interact with the data which is exposed by that InheritedWidget.
class RootWidget extends StatelessWidget { Level - 1 final int postId; final int scopeId; RootWidget(this.postId, this.scopeId); Widget build(BuildContext context) { ...To DO return PostItemWidget(postId, scopeId); } } class PostItemWidget extends StatelessWidget { Level - 2 final int postId; final int scopeId; PostItem(this.postId, this.scopeId); Widget build(BuildContext context) { ...To DO return PostMenuWidget(postId, scopeId); } } class PostMenuWidget extends StatelessWidget { Level - 3 final int postId; final int scopeId; PostMenuWidget(this.postId, this.scopeId); Widget build(BuildContext context) { // repeat ... Levels - n
In order to provide a solution for this situation, Flutter provides a special widget called InheritedWidget that defines a context at the root of a sub-tree. It can efficiently deliver this context to every widget in that sub-tree. This widget is specially designed to hold data and to provide it throughout the widget tree, irrespective of its depth. InheritedWidget is the base class for widgets that efficiently propagate information down the widgets tree. All widgets part of that sub-tree will have to ability to interact with the data which is exposed by that InheritedWidget.
Sunday, December 15, 2019
Sunday, November 17, 2019
Flutter vs React Native - What’s best for cross plateform mobile Application.
Today, all the companies creating Android and iOS platforms application to reach maximum end users. To create a native Android and iOS app, they have to maintain two source code that creates a gap between the applications as they are made by different teams. To resolve this, they have to move on the cross-platform apps that have a lot of pros and cons:


Sunday, October 6, 2019
Flutter - Don’t use ‘/’ to prefix with navigation routes
A mobile apps usually have multiple screens or pages. The end-user is presented one screen at a time. The Flutter framework provides us page navigation and routes to manage multiple screens.
We have published a post to manage multiple screens in Flutter application. Flutter- Screen push and pop with Navigator. You can learn complete guidelines to manage routes, push and pop methods of Flutter Framework.
The Flutter frameworks can help you to understand page navigation and manage conditional logic to determine which page to show first for things such as login and onboarding. If you’re using the MaterialApp widget, then you typically set the initialRoute property to specify where you want the app to start as shown below:
We have published a post to manage multiple screens in Flutter application. Flutter- Screen push and pop with Navigator. You can learn complete guidelines to manage routes, push and pop methods of Flutter Framework.
