Tween

Derived from Animatable<T> and used to generate numbers between any two numbers other than 0 and 1. It can be used along with Animation object by using animate method and passing actual Animation object. AnimationController controller = AnimationController( duration: const Duration(milliseconds: 1000), vsync: this); Animation<int> customTween = IntTween( begin: 0, end: 255).animate(controller); Tween can also… Continue reading Tween

Published
Categorized as Dart Tagged

CurvedAnimation

Similar to AnimationController but supports non-linear animation. CurvedAnimation can be used along with Animation object as below − controller = AnimationController(duration: const Duration(seconds: 2), vsync: this); animation = CurvedAnimation(parent: controller, curve: Curves.easeIn)

Published
Categorized as Dart Tagged

Animation

Generates interpolated values between two numbers over a certain duration. The most common Animation classes are − Animation<double> − interpolate values between two decimal number Animation<Color> − interpolate colors between two color Animation<Size> − interpolate sizes between two size AnimationController − Special Animation object to control the animation itself. It generates new values whenever the application is ready for… Continue reading Animation

Published
Categorized as Dart Tagged

Flutter – Database Concepts (SQLite)

SQLite database is the de-facto and standard SQL based embedded database engine. It is small and time-tested database engine. sqflite package provides a lot of functionality to work efficiently with SQLite database. It provides standard methods to manipulate SQLite database engine. The core functionality provided by sqflite package is as follows − Create / Open… Continue reading Flutter – Database Concepts (SQLite)

Published
Categorized as Dart Tagged

Create a horizontal list

Create a list that scrolls horizontally rather than vertically. The ListView widget supports horizontal lists. Use the standard ListView constructor, passing in a horizontal scrollDirection, which overrides the default vertical direction. ListView(  // This next line does the trick.  scrollDirection: Axis.horizontal,  children: <Widget>[   Container(    width: 160,    color: Colors.red,   ),   Container(    width: 160,    color: Colors.blue,   ),… Continue reading Create a horizontal list

Published
Categorized as Dart Tagged

Scrolling

Flutter has many built-in widgets that automatically scroll and also offers a variety of widgets that you can customize to create specific scrolling behavior. Basic scrolling Many Flutter widgets support scrolling out of the box and do most of the work for you. For example, SingleChildScrollView automatically scrolls its child when necessary. Other useful widgets… Continue reading Scrolling

Published
Categorized as Dart Tagged

Widget state

The framework introduces two major classes of widget: stateful and stateless widgets. Widgets that have no mutable state (they have no class properties that change over time) subclass StatelessWidget. Many built-in widgets are stateless, such as Padding, Text, and Icon. When you create your own widgets, you’ll create Stateless widgets most of the time. On… Continue reading Widget state

Published
Categorized as Dart Tagged

Building widgets

To create a user interface in Flutter, you override the build method on widget objects. All widgets must have a build method, and it must return another widget. For example, if you want to add text to the screen with some padding, you could write it like this: class PaddedText extends StatelessWidget { const PaddedText({super.key}); @override Widget… Continue reading Building widgets

Published
Categorized as Dart Tagged

Flutter – Circular & Linear Progress Indicators

Progress Indicator in any application displays the time which is needed for some tasks to complete such as downloading, installation, uploading, file transfer, etc. This shows the progress of a task or the time to display the length of the processes. In Flutter, progress can be displayed in two ways: CircularProgressIndicator: A CircularProgressIndicator is a… Continue reading Flutter – Circular & Linear Progress Indicators

Icon Class in Flutter

Icon class in Flutter is used to show specific icons in our app. Instead of creating an image for our icon, we can simply use the Icon class for inserting an icon in our app. For using this class you must ensure that you have set uses-material-design: true in the pubsec.yml file of your object.… Continue reading Icon Class in Flutter